diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2019-07-24 21:26:11 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2019-07-25 09:21:20 +0200 |
commit | 3f471651049a318d7d8917855929e0535daf14b9 (patch) | |
tree | 01c9d58372b16feb38981f236270d9ff0c48beae /xmloff/source | |
parent | 4840880148318dc384e28f9a8df9990b8690a4b6 (diff) |
xmloff: create XMLImportStylesImportOasis instances with an uno constructor
See tdf#74608 for motivation.
Change-Id: I7e56486339d5fd436d4dba723bac8bb9bbed170b
Reviewed-on: https://gerrit.libreoffice.org/76275
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'xmloff/source')
-rw-r--r-- | xmloff/source/core/facreg.cxx | 5 | ||||
-rw-r--r-- | xmloff/source/draw/sdxmlimp.cxx | 23 |
2 files changed, 9 insertions, 19 deletions
diff --git a/xmloff/source/core/facreg.cxx b/xmloff/source/core/facreg.cxx index cba072106f97..0190e6b0d818 100644 --- a/xmloff/source/core/facreg.cxx +++ b/xmloff/source/core/facreg.cxx @@ -56,10 +56,7 @@ XMLOFF_DLLPUBLIC void * xo_component_getFactory( const sal_Char * pImplName, voi const sal_Int32 nImplNameLen = strlen( pImplName ); - // impress oasis import - SINGLEFACTORY( XMLImpressStylesImportOasis ) - - else SINGLEFACTORY( AnimationsImport ) + SINGLEFACTORY( AnimationsImport ) // impress OOo export else SINGLEFACTORY( XMLImpressExportOOO ) diff --git a/xmloff/source/draw/sdxmlimp.cxx b/xmloff/source/draw/sdxmlimp.cxx index d161d68d657b..5b5b1ad63ee2 100644 --- a/xmloff/source/draw/sdxmlimp.cxx +++ b/xmloff/source/draw/sdxmlimp.cxx @@ -260,20 +260,6 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL SdXMLFlatDocContext_Imp } } -#define SERVICE(classname,servicename,implementationname,draw,flags)\ -uno::Sequence< OUString > classname##_getSupportedServiceNames() throw()\ -{\ - return uno::Sequence< OUString > { servicename };\ -}\ -OUString classname##_getImplementationName() throw()\ -{\ - return OUString( implementationname );\ -}\ -uno::Reference< uno::XInterface > classname##_createInstance(const uno::Reference< lang::XMultiServiceFactory > & rSMgr)\ -{\ - return static_cast<cppu::OWeakObject*>(new SdXMLImport( comphelper::getComponentContext(rSMgr), implementationname, draw, flags )); \ -} - extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface* com_sun_star_comp_Impress_XMLOasisImporter_get_implementation( uno::XComponentContext* pCtx, uno::Sequence<uno::Any> const& /*rSeq*/) @@ -324,7 +310,14 @@ com_sun_star_comp_Draw_XMLOasisSettingsImporter_get_implementation( new SdXMLImport(pCtx, "XMLDrawSettingsImportOasis", true, SvXMLImportFlags::SETTINGS)); } -SERVICE( XMLImpressStylesImportOasis, "com.sun.star.comp.Impress.XMLOasisStylesImporter", "XMLImpressStylesImportOasis", false, SvXMLImportFlags::STYLES|SvXMLImportFlags::AUTOSTYLES|SvXMLImportFlags::MASTERSTYLES ) +extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface* +com_sun_star_comp_Impress_XMLOasisStylesImporter_get_implementation( + uno::XComponentContext* pCtx, uno::Sequence<uno::Any> const& /*rSeq*/) +{ + return cppu::acquire(new SdXMLImport(pCtx, "XMLImpressStylesImportOasis", false, + SvXMLImportFlags::STYLES | SvXMLImportFlags::AUTOSTYLES + | SvXMLImportFlags::MASTERSTYLES)); +} extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface* com_sun_star_comp_Impress_XMLOasisContentImporter_get_implementation( |