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 /svx/source/gallery2 | |
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 'svx/source/gallery2')
-rw-r--r-- | svx/source/gallery2/galmisc.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/svx/source/gallery2/galmisc.cxx b/svx/source/gallery2/galmisc.cxx index 570b19ce9e33..b0fa80e914fa 100644 --- a/svx/source/gallery2/galmisc.cxx +++ b/svx/source/gallery2/galmisc.cxx @@ -77,10 +77,11 @@ BitmapEx GalleryResGetBitmapEx( sal_uInt32 nId ) } IMPL_STATIC_LINK_TYPED( - SgaUserDataFactory, MakeUserData, SdrObjFactory*, pObjFactory, void ) + SgaUserDataFactory, MakeUserData, SdrObjUserDataCreatorParams, aParams, SdrObjUserData* ) { - if ( pObjFactory->nInventor == IV_IMAPINFO && pObjFactory->nIdentifier == ID_IMAPINFO ) - pObjFactory->pNewData = new SgaIMapInfo; + if ( aParams.nInventor == IV_IMAPINFO && aParams.nObjIdentifier == ID_IMAPINFO ) + return new SgaIMapInfo; + return nullptr; } GalleryGraphicImportRet GalleryGraphicImport( const INetURLObject& rURL, Graphic& rGraphic, |