From 69236a7aa17da34399e4d204ddb659d67a51fbf4 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Wed, 29 May 2019 21:29:30 +0200 Subject: xmloff: create XMLDrawContentImportOasis instances with an uno constructor Change-Id: I2d0bcc8d48ce0a4253b5deff11736b292e4f9e69 Reviewed-on: https://gerrit.libreoffice.org/73188 Tested-by: Jenkins Reviewed-by: Miklos Vajna --- xmloff/inc/facreg.hxx | 5 ----- xmloff/source/core/facreg.cxx | 1 - xmloff/source/draw/sdxmlimp.cxx | 11 ++++++++++- xmloff/util/xo.component | 5 ++++- 4 files changed, 14 insertions(+), 8 deletions(-) (limited to 'xmloff') diff --git a/xmloff/inc/facreg.hxx b/xmloff/inc/facreg.hxx index feade0f8d5b3..d59e5d463e65 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 XMLDrawContentImportOasis_getImplementationName() throw(); -css::uno::Sequence XMLDrawContentImportOasis_getSupportedServiceNames() throw(); -/// @throws css::uno::Exception -css::uno::Reference XMLDrawContentImportOasis_createInstance( - css::uno::Reference const & rSMgr); OUString XMLDrawMetaImportOasis_getImplementationName() throw(); css::uno::Sequence XMLDrawMetaImportOasis_getSupportedServiceNames() throw(); /// @throws css::uno::Exception diff --git a/xmloff/source/core/facreg.cxx b/xmloff/source/core/facreg.cxx index 994bcbb67f3c..446dfadbed10 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( XMLDrawContentImportOasis ) else SINGLEFACTORY( XMLDrawMetaImportOasis ) else SINGLEFACTORY( XMLDrawSettingsImportOasis ) diff --git a/xmloff/source/draw/sdxmlimp.cxx b/xmloff/source/draw/sdxmlimp.cxx index 6871c537918f..ac40ce2c6b29 100644 --- a/xmloff/source/draw/sdxmlimp.cxx +++ b/xmloff/source/draw/sdxmlimp.cxx @@ -297,10 +297,19 @@ com_sun_star_comp_Draw_XMLOasisStylesImporter_get_implementation(uno::XComponent | SvXMLImportFlags::MASTERSTYLES)); } +extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface* +com_sun_star_comp_Draw_XMLOasisContentImporter_get_implementation( + uno::XComponentContext* pCtx, uno::Sequence const& /*rSeq*/) +{ + return cppu::acquire(new SdXMLImport(pCtx, "XMLDrawContentImportOasis", true, + SvXMLImportFlags::AUTOSTYLES | SvXMLImportFlags::CONTENT + | SvXMLImportFlags::SCRIPTS + | SvXMLImportFlags::FONTDECLS)); +} + SERVICE( XMLImpressStylesImportOasis, "com.sun.star.comp.Impress.XMLOasisStylesImporter", "XMLImpressStylesImportOasis", false, 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 ) SERVICE( XMLImpressMetaImportOasis, "com.sun.star.comp.Impress.XMLOasisMetaImporter", "XMLImpressMetaImportOasis", false, SvXMLImportFlags::META ) SERVICE( XMLDrawMetaImportOasis, "com.sun.star.comp.Draw.XMLOasisMetaImporter", "XMLImpressMetaImportOasis", true, SvXMLImportFlags::META ) diff --git a/xmloff/util/xo.component b/xmloff/util/xo.component index b4e2fcdf645e..638270ae9c97 100644 --- a/xmloff/util/xo.component +++ b/xmloff/util/xo.component @@ -99,8 +99,11 @@ constructor="com_sun_star_comp_Impress_XMLOasisContentExporter_get_implementation"> - + + + -- cgit