diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2019-05-22 21:27:35 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2019-05-23 09:05:05 +0200 |
commit | e061e0fc382f12a19575c4ef0132b55ca018a38c (patch) | |
tree | 3d08d73268598719dd1c5506686008a4c8c3be71 /xmloff | |
parent | b18ee082749d94162794cafe8008c3dc31b3ae4f (diff) |
xmloff: create XMLDrawStylesImportOasis instances with an uno constructor
Change-Id: I677c3b184e225c3bac1c56efd5ea46aaa2497d69
Reviewed-on: https://gerrit.libreoffice.org/72810
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/inc/facreg.hxx | 5 | ||||
-rw-r--r-- | xmloff/source/core/facreg.cxx | 1 | ||||
-rw-r--r-- | xmloff/source/draw/sdxmlimp.cxx | 10 | ||||
-rw-r--r-- | xmloff/util/xo.component | 5 |
4 files changed, 13 insertions, 8 deletions
diff --git a/xmloff/inc/facreg.hxx b/xmloff/inc/facreg.hxx index 645446a046b5..feade0f8d5b3 100644 --- a/xmloff/inc/facreg.hxx +++ b/xmloff/inc/facreg.hxx @@ -83,11 +83,6 @@ css::uno::Reference<css::uno::XInterface> XMLImpressSettingsExportOOO_createInst css::uno::Reference<css::lang::XMultiServiceFactory> const & rSMgr); // draw oasis import -OUString XMLDrawStylesImportOasis_getImplementationName() throw(); -css::uno::Sequence<OUString> XMLDrawStylesImportOasis_getSupportedServiceNames() throw(); -/// @throws css::uno::Exception -css::uno::Reference<css::uno::XInterface> XMLDrawStylesImportOasis_createInstance( - css::uno::Reference<css::lang::XMultiServiceFactory> const & rSMgr); OUString XMLDrawContentImportOasis_getImplementationName() throw(); css::uno::Sequence<OUString> XMLDrawContentImportOasis_getSupportedServiceNames() throw(); /// @throws css::uno::Exception diff --git a/xmloff/source/core/facreg.cxx b/xmloff/source/core/facreg.cxx index 5f5e810e035d..994bcbb67f3c 100644 --- a/xmloff/source/core/facreg.cxx +++ b/xmloff/source/core/facreg.cxx @@ -72,7 +72,6 @@ XMLOFF_DLLPUBLIC void * xo_component_getFactory( const sal_Char * pImplName, voi else SINGLEFACTORY( XMLImpressSettingsExportOOO ) // draw oasis import - else SINGLEFACTORY( XMLDrawStylesImportOasis ) else SINGLEFACTORY( XMLDrawContentImportOasis ) else SINGLEFACTORY( XMLDrawMetaImportOasis ) else SINGLEFACTORY( XMLDrawSettingsImportOasis ) diff --git a/xmloff/source/draw/sdxmlimp.cxx b/xmloff/source/draw/sdxmlimp.cxx index 7c661b56267d..6871c537918f 100644 --- a/xmloff/source/draw/sdxmlimp.cxx +++ b/xmloff/source/draw/sdxmlimp.cxx @@ -288,8 +288,16 @@ com_sun_star_comp_Draw_XMLOasisImporter_get_implementation(uno::XComponentContex return cppu::acquire(new SdXMLImport(pCtx, "XMLDrawImportOasis", true, SvXMLImportFlags::ALL)); } +extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface* +com_sun_star_comp_Draw_XMLOasisStylesImporter_get_implementation(uno::XComponentContext* pCtx, + uno::Sequence<uno::Any> const& /*rSeq*/) +{ + return cppu::acquire(new SdXMLImport(pCtx, "XMLDrawStylesImportOasis", true, + SvXMLImportFlags::STYLES | SvXMLImportFlags::AUTOSTYLES + | SvXMLImportFlags::MASTERSTYLES)); +} + SERVICE( XMLImpressStylesImportOasis, "com.sun.star.comp.Impress.XMLOasisStylesImporter", "XMLImpressStylesImportOasis", false, SvXMLImportFlags::STYLES|SvXMLImportFlags::AUTOSTYLES|SvXMLImportFlags::MASTERSTYLES ) -SERVICE( XMLDrawStylesImportOasis, "com.sun.star.comp.Draw.XMLOasisStylesImporter", "XMLImpressStylesImportOasis", true, SvXMLImportFlags::STYLES|SvXMLImportFlags::AUTOSTYLES|SvXMLImportFlags::MASTERSTYLES ) SERVICE( XMLImpressContentImportOasis, "com.sun.star.comp.Impress.XMLOasisContentImporter", "XMLImpressContentImportOasis", false, SvXMLImportFlags::AUTOSTYLES|SvXMLImportFlags::CONTENT|SvXMLImportFlags::SCRIPTS|SvXMLImportFlags::FONTDECLS ) SERVICE( XMLDrawContentImportOasis, "com.sun.star.comp.Draw.XMLOasisContentImporter", "XMLImpressContentImportOasis", true, SvXMLImportFlags::AUTOSTYLES|SvXMLImportFlags::CONTENT|SvXMLImportFlags::SCRIPTS|SvXMLImportFlags::FONTDECLS ) diff --git a/xmloff/util/xo.component b/xmloff/util/xo.component index da91ef68bc99..b4e2fcdf645e 100644 --- a/xmloff/util/xo.component +++ b/xmloff/util/xo.component @@ -144,9 +144,12 @@ <service name="com.sun.star.comp.Impress.XMLOasisStylesExporter"/> </implementation> <implementation name="XMLImpressStylesImportOasis"> - <service name="com.sun.star.comp.Draw.XMLOasisStylesImporter"/> <service name="com.sun.star.comp.Impress.XMLOasisStylesImporter"/> </implementation> + <implementation name="XMLDrawStylesImportOasis" + constructor="com_sun_star_comp_Draw_XMLOasisStylesImporter_get_implementation"> + <service name="com.sun.star.comp.Draw.XMLOasisStylesImporter"/> + </implementation> <implementation name="XMLMetaExportComponent" constructor="XMLMetaExportComponent_get_implementation"> <service name="com.sun.star.document.XMLOasisMetaExporter"/> |