diff options
author | Noel Grandin <noel@peralex.com> | 2016-08-22 11:02:36 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-08-23 09:54:16 +0200 |
commit | ba263e124ce263c3c893542062d9c473f5aae589 (patch) | |
tree | 74b99db819c66eb333ab2188df0a65a0b7b8fc2e /sw/source/core/draw | |
parent | 962719df881a8aefdec7f564293d1e0cd42a5540 (diff) |
clean up the SdrObjFactory create callbacks
passing params by setting fields on yourself is just gross
Change-Id: Iee98a9e8e266b56fc886c76eab470ab1ff7ff8e4
Diffstat (limited to 'sw/source/core/draw')
-rw-r--r-- | sw/source/core/draw/dobjfac.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sw/source/core/draw/dobjfac.cxx b/sw/source/core/draw/dobjfac.cxx index 25d96fbe0d91..845c08617195 100644 --- a/sw/source/core/draw/dobjfac.cxx +++ b/sw/source/core/draw/dobjfac.cxx @@ -24,15 +24,16 @@ SwObjectFactory aSwObjectFactory; IMPL_STATIC_LINK_TYPED( - SwObjectFactory, MakeObject, SdrObjFactory*, pObjFactory, void ) + SwObjectFactory, MakeObject, SdrObjCreatorParams, aParams, SdrObject* ) { - if ( pObjFactory->nInventor == SWGInventor ) + if ( aParams.nInventor == SWGInventor ) { // No switch, there's only one at the moment - OSL_ENSURE( pObjFactory->nIdentifier == SwFlyDrawObjIdentifier, + OSL_ENSURE( aParams.nObjIdentifier == SwFlyDrawObjIdentifier, "Wrong inventor or identifier" ); - pObjFactory->pNewObj = new SwFlyDrawObj(); + return new SwFlyDrawObj; } + return nullptr; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |