[Libreoffice-commits] core.git: reportdesign/source
Oliver Specht
oliver.specht at cib.de
Fri Oct 16 10:35:55 PDT 2015
reportdesign/source/core/sdr/ReportDrawPage.cxx | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
New commits:
commit c1d38a06752e8f8fd7c79eb1c1a736662e4ccc8b
Author: Oliver Specht <oliver.specht at cib.de>
Date: Fri Oct 16 12:31:44 2015 +0200
tdf#94965: crash in report wizard fixed
fixed the wrong rtti replacement from 85f93697defd9a812a0cda0bc4e9364e28c0339e
Change-Id: Iaed0f1e452ae0ec2e479c8e9084ffcbabbb595f9
Reviewed-on: https://gerrit.libreoffice.org/19406
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Oliver Specht <oliver.specht at cib.de>
diff --git a/reportdesign/source/core/sdr/ReportDrawPage.cxx b/reportdesign/source/core/sdr/ReportDrawPage.cxx
index f34459c..6947780 100644
--- a/reportdesign/source/core/sdr/ReportDrawPage.cxx
+++ b/reportdesign/source/core/sdr/ReportDrawPage.cxx
@@ -74,7 +74,7 @@ uno::Reference< drawing::XShape > OReportDrawPage::_CreateShape( SdrObject *pOb
OUString sServiceName = pBaseObj->getServiceName();
OSL_ENSURE(!sServiceName.isEmpty(),"No Service Name given!");
- if ( typeid(*pObj) == typeid(OUnoObject) )
+ if (dynamic_cast< const OUnoObject* >(pObj) != nullptr)
{
OUnoObject& rUnoObj = dynamic_cast<OUnoObject&>(*pObj);
if (rUnoObj.GetObjIdentifier() == OBJ_DLG_FIXEDTEXT)
@@ -89,14 +89,14 @@ uno::Reference< drawing::XShape > OReportDrawPage::_CreateShape( SdrObject *pOb
xShape.set(static_cast<cppu::OWeakObject*>(static_cast<SvxShape_UnoImplHelper *>(pShape)),uno::UNO_QUERY);
pShape->setShapeKind(pObj->GetObjIdentifier());
}
- else if ( typeid(*pObj) == typeid(OCustomShape) )
+ else if (dynamic_cast< const OCustomShape* >(pObj) != nullptr)
{
SvxCustomShape* pShape = new SvxCustomShape( pObj );
uno::Reference < drawing::XEnhancedCustomShapeDefaulter > xShape2 = pShape;
xShape.set(xShape2,uno::UNO_QUERY);
pShape->setShapeKind(pObj->GetObjIdentifier());
}
- else if ( typeid(*pObj) == typeid(SdrOle2Obj) )
+ else if (dynamic_cast< const SdrOle2Obj* >(pObj) != nullptr)
{
SdrOle2Obj& rOle2Obj = dynamic_cast<SdrOle2Obj&>(*pObj);
if (!rOle2Obj.GetObjRef().is())
More information about the Libreoffice-commits
mailing list