[Libreoffice-commits] core.git: solenv/bin xmloff/inc xmloff/source xmloff/util

Miklos Vajna (via logerrit) logerrit at kemper.freedesktop.org
Thu May 23 07:06:00 UTC 2019


 solenv/bin/native-code.py       |    1 +
 xmloff/inc/facreg.hxx           |    5 -----
 xmloff/source/core/facreg.cxx   |    1 -
 xmloff/source/draw/sdxmlimp.cxx |   10 +++++++++-
 xmloff/util/xo.component        |    5 ++++-
 5 files changed, 14 insertions(+), 8 deletions(-)

New commits:
commit e061e0fc382f12a19575c4ef0132b55ca018a38c
Author:     Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Wed May 22 21:27:35 2019 +0200
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Thu May 23 09:05:05 2019 +0200

    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 at collabora.com>

diff --git a/solenv/bin/native-code.py b/solenv/bin/native-code.py
index 833c85ac246d..4eeae29270de 100755
--- a/solenv/bin/native-code.py
+++ b/solenv/bin/native-code.py
@@ -262,6 +262,7 @@ core_constructor_list = [
     "com_sun_star_comp_Impress_XMLOasisMetaExporter_get_implementation",
     "com_sun_star_comp_Impress_XMLOasisSettingsExporter_get_implementation",
     "com_sun_star_comp_Draw_XMLOasisImporter_get_implementation",
+    "com_sun_star_comp_Draw_XMLOasisStylesImporter_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 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"/>


More information about the Libreoffice-commits mailing list