From e061e0fc382f12a19575c4ef0132b55ca018a38c Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Wed, 22 May 2019 21:27:35 +0200 Subject: 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 --- xmloff/inc/facreg.hxx | 5 ----- xmloff/source/core/facreg.cxx | 1 - xmloff/source/draw/sdxmlimp.cxx | 10 +++++++++- xmloff/util/xo.component | 5 ++++- 4 files changed, 13 insertions(+), 8 deletions(-) (limited to 'xmloff') 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 XMLImpressSettingsExportOOO_createInst css::uno::Reference const & rSMgr); // draw oasis import -OUString XMLDrawStylesImportOasis_getImplementationName() throw(); -css::uno::Sequence XMLDrawStylesImportOasis_getSupportedServiceNames() throw(); -/// @throws css::uno::Exception -css::uno::Reference XMLDrawStylesImportOasis_createInstance( - css::uno::Reference const & rSMgr); OUString XMLDrawContentImportOasis_getImplementationName() throw(); css::uno::Sequence 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 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 @@ - + + + -- cgit v1.2.3