diff options
author | Oliver Specht <oliver.specht@cib.de> | 2015-10-16 12:31:44 +0200 |
---|---|---|
committer | Oliver Specht <oliver.specht@cib.de> | 2015-10-16 17:35:32 +0000 |
commit | c1d38a06752e8f8fd7c79eb1c1a736662e4ccc8b (patch) | |
tree | 15976898c0f0434dc1690534c41459952630c502 | |
parent | 639854d77bafb19bda031505daad038916a11593 (diff) |
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@libreoffice.org>
Reviewed-by: Oliver Specht <oliver.specht@cib.de>
-rw-r--r-- | reportdesign/source/core/sdr/ReportDrawPage.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/reportdesign/source/core/sdr/ReportDrawPage.cxx b/reportdesign/source/core/sdr/ReportDrawPage.cxx index f34459ccbbb5..6947780e589d 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()) |