diff options
Diffstat (limited to 'reportdesign')
-rw-r--r-- | reportdesign/source/ui/inc/dlgedfac.hxx | 2 | ||||
-rw-r--r-- | reportdesign/source/ui/report/dlgedfac.cxx | 26 |
2 files changed, 15 insertions, 13 deletions
diff --git a/reportdesign/source/ui/inc/dlgedfac.hxx b/reportdesign/source/ui/inc/dlgedfac.hxx index bdee50e2b2be..ea529bd8d591 100644 --- a/reportdesign/source/ui/inc/dlgedfac.hxx +++ b/reportdesign/source/ui/inc/dlgedfac.hxx @@ -35,7 +35,7 @@ public: DlgEdFactory(); ~DlgEdFactory(); - DECL_STATIC_LINK_TYPED( DlgEdFactory, MakeObject, SdrObjFactory *, void ); + DECL_STATIC_LINK_TYPED( DlgEdFactory, MakeObject, SdrObjCreatorParams, SdrObject* ); }; } #endif // INCLUDED_REPORTDESIGN_SOURCE_UI_INC_DLGEDFAC_HXX diff --git a/reportdesign/source/ui/report/dlgedfac.cxx b/reportdesign/source/ui/report/dlgedfac.cxx index f1c57ca559e2..09ef7bcb341e 100644 --- a/reportdesign/source/ui/report/dlgedfac.cxx +++ b/reportdesign/source/ui/report/dlgedfac.cxx @@ -44,24 +44,25 @@ DlgEdFactory::~DlgEdFactory() IMPL_STATIC_LINK_TYPED( - DlgEdFactory, MakeObject, SdrObjFactory *, pObjFactory, void ) + DlgEdFactory, MakeObject, SdrObjCreatorParams, aParams, SdrObject* ) { - if ( pObjFactory->nInventor == ReportInventor ) + SdrObject* pNewObj = nullptr; + if ( aParams.nInventor == ReportInventor ) { - switch( pObjFactory->nIdentifier ) + switch( aParams.nObjIdentifier ) { case OBJ_DLG_FIXEDTEXT: - pObjFactory->pNewObj = new OUnoObject( SERVICE_FIXEDTEXT + pNewObj = new OUnoObject( SERVICE_FIXEDTEXT ,OUString("com.sun.star.form.component.FixedText") ,OBJ_DLG_FIXEDTEXT); break; case OBJ_DLG_IMAGECONTROL: - pObjFactory->pNewObj = new OUnoObject( SERVICE_IMAGECONTROL + pNewObj = new OUnoObject( SERVICE_IMAGECONTROL ,OUString("com.sun.star.form.component.DatabaseImageControl") ,OBJ_DLG_IMAGECONTROL); break; case OBJ_DLG_FORMATTEDFIELD: - pObjFactory->pNewObj = new OUnoObject( SERVICE_FORMATTEDFIELD + pNewObj = new OUnoObject( SERVICE_FORMATTEDFIELD ,OUString("com.sun.star.form.component.FormattedField") ,OBJ_DLG_FORMATTEDFIELD); break; @@ -70,9 +71,9 @@ IMPL_STATIC_LINK_TYPED( { OUnoObject* pObj = new OUnoObject( SERVICE_FIXEDLINE ,OUString("com.sun.star.awt.UnoControlFixedLineModel") - ,pObjFactory->nIdentifier); - pObjFactory->pNewObj = pObj; - if ( pObjFactory->nIdentifier == OBJ_DLG_HFIXEDLINE ) + ,aParams.nObjIdentifier); + pNewObj = pObj; + if ( aParams.nObjIdentifier == OBJ_DLG_HFIXEDLINE ) { uno::Reference<beans::XPropertySet> xProp = pObj->getAwtComponent(); xProp->setPropertyValue( PROPERTY_ORIENTATION, uno::makeAny(sal_Int32(0)) ); @@ -80,19 +81,20 @@ IMPL_STATIC_LINK_TYPED( } break; case OBJ_CUSTOMSHAPE: - pObjFactory->pNewObj = new OCustomShape(SERVICE_SHAPE); + pNewObj = new OCustomShape(SERVICE_SHAPE); break; case OBJ_DLG_SUBREPORT: - pObjFactory->pNewObj = new OOle2Obj(SERVICE_REPORTDEFINITION,OBJ_DLG_SUBREPORT); + pNewObj = new OOle2Obj(SERVICE_REPORTDEFINITION,OBJ_DLG_SUBREPORT); break; case OBJ_OLE2: - pObjFactory->pNewObj = new OOle2Obj(OUString("com.sun.star.chart2.ChartDocument"),OBJ_OLE2); + pNewObj = new OOle2Obj(OUString("com.sun.star.chart2.ChartDocument"),OBJ_OLE2); break; default: OSL_FAIL("Unknown object id"); break; } } + return pNewObj; } } |