diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2019-01-31 23:16:43 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2019-02-01 08:50:03 +0100 |
commit | e375ad4d4112b98efeb679c560af188de9246f02 (patch) | |
tree | 1c294211e2d02b4518326652ad27e263c1267ea7 | |
parent | 77d6560bc97f2475f67ff5a048efda8cc1d38771 (diff) |
xmloff: create XMLImpressImportOasis instances with an uno constructor
Change-Id: I10cac20b8180c0fc4d7cade2ab3d5de0f9380a88
Reviewed-on: https://gerrit.libreoffice.org/67240
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
-rwxr-xr-x | solenv/bin/native-code.py | 1 | ||||
-rw-r--r-- | xmloff/inc/facreg.hxx | 5 | ||||
-rw-r--r-- | xmloff/source/core/facreg.cxx | 3 | ||||
-rw-r--r-- | xmloff/source/draw/sdxmlimp.cxx | 9 | ||||
-rw-r--r-- | xmloff/util/xo.component | 3 |
5 files changed, 12 insertions, 9 deletions
diff --git a/solenv/bin/native-code.py b/solenv/bin/native-code.py index 31d486c6f6eb..3b531cbfc126 100755 --- a/solenv/bin/native-code.py +++ b/solenv/bin/native-code.py @@ -252,6 +252,7 @@ core_constructor_list = [ "com_sun_star_comp_uui_UUIInteractionHandler_get_implementation", # xmloff/util/xo.component "XMLVersionListPersistence_get_implementation", + "com_sun_star_comp_Impress_XMLOasisImporter_get_implementation", # xmlscript/util/xmlscript.component "com_sun_star_comp_xmlscript_XMLBasicExporter", "com_sun_star_comp_xmlscript_XMLBasicImporter", diff --git a/xmloff/inc/facreg.hxx b/xmloff/inc/facreg.hxx index aac65f11862e..aa30d961c4d1 100644 --- a/xmloff/inc/facreg.hxx +++ b/xmloff/inc/facreg.hxx @@ -34,11 +34,6 @@ namespace com { namespace sun { namespace star { } } } // impress oasis import -OUString XMLImpressImportOasis_getImplementationName() throw(); -css::uno::Sequence<OUString> XMLImpressImportOasis_getSupportedServiceNames() throw(); -/// @throws css::uno::Exception -css::uno::Reference<css::uno::XInterface> XMLImpressImportOasis_createInstance( - css::uno::Reference<css::lang::XMultiServiceFactory> const & rSMgr); OUString XMLImpressStylesImportOasis_getImplementationName() throw(); css::uno::Sequence<OUString> XMLImpressStylesImportOasis_getSupportedServiceNames() throw(); /// @throws css::uno::Exception diff --git a/xmloff/source/core/facreg.cxx b/xmloff/source/core/facreg.cxx index 07646937183e..9d9bd88e59f3 100644 --- a/xmloff/source/core/facreg.cxx +++ b/xmloff/source/core/facreg.cxx @@ -57,8 +57,7 @@ XMLOFF_DLLPUBLIC void * xo_component_getFactory( const sal_Char * pImplName, voi const sal_Int32 nImplNameLen = strlen( pImplName ); // impress oasis import - SINGLEFACTORY( XMLImpressImportOasis ) - else SINGLEFACTORY( XMLImpressStylesImportOasis ) + SINGLEFACTORY( XMLImpressStylesImportOasis ) else SINGLEFACTORY( XMLImpressContentImportOasis ) else SINGLEFACTORY( XMLImpressMetaImportOasis ) else SINGLEFACTORY( XMLImpressSettingsImportOasis ) diff --git a/xmloff/source/draw/sdxmlimp.cxx b/xmloff/source/draw/sdxmlimp.cxx index a792813388ef..3f7950801ae0 100644 --- a/xmloff/source/draw/sdxmlimp.cxx +++ b/xmloff/source/draw/sdxmlimp.cxx @@ -274,7 +274,14 @@ uno::Reference< uno::XInterface > classname##_createInstance(const uno::Referenc return static_cast<cppu::OWeakObject*>(new SdXMLImport( comphelper::getComponentContext(rSMgr), implementationname, draw, flags )); \ } -SERVICE( XMLImpressImportOasis, "com.sun.star.comp.Impress.XMLOasisImporter", "XMLImpressImportOasis", false, SvXMLImportFlags::ALL ) +extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface* +com_sun_star_comp_Impress_XMLOasisImporter_get_implementation( + uno::XComponentContext* pCtx, uno::Sequence<uno::Any> const& /*rSeq*/) +{ + return cppu::acquire( + new SdXMLImport(pCtx, "XMLImpressImportOasis", false, SvXMLImportFlags::ALL)); +} + SERVICE( XMLDrawImportOasis, "com.sun.star.comp.Draw.XMLOasisImporter", "XMLDrawImportOasis", true, SvXMLImportFlags::ALL ) SERVICE( XMLImpressStylesImportOasis, "com.sun.star.comp.Impress.XMLOasisStylesImporter", "XMLImpressStylesImportOasis", false, SvXMLImportFlags::STYLES|SvXMLImportFlags::AUTOSTYLES|SvXMLImportFlags::MASTERSTYLES ) diff --git a/xmloff/util/xo.component b/xmloff/util/xo.component index 273b591396c8..75d33db263c7 100644 --- a/xmloff/util/xo.component +++ b/xmloff/util/xo.component @@ -107,7 +107,8 @@ <implementation name="XMLImpressExportOasis"> <service name="com.sun.star.comp.Impress.XMLOasisExporter"/> </implementation> - <implementation name="XMLImpressImportOasis"> + <implementation name="XMLImpressImportOasis" + constructor="com_sun_star_comp_Impress_XMLOasisImporter_get_implementation"> <service name="com.sun.star.comp.Impress.XMLOasisImporter"/> </implementation> <implementation name="XMLImpressMetaExportOOO"> |