reportdesign/source/core/sdr/ReportDrawPage.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
New commits: commit c1d38a06752e8f8fd7c79eb1c1a736662e4ccc8b Author: Oliver Specht <oliver.spe...@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 <c...@libreoffice.org> Reviewed-by: Oliver Specht <oliver.spe...@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()) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits