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

Miklos Vajna (via logerrit) logerrit at kemper.freedesktop.org
Thu Jun 6 07:06:55 UTC 2019


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

New commits:
commit e4be4c2641c0072af25cf1a2b2abc3b1cffa1078
Author:     Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Wed Jun 5 22:50:14 2019 +0200
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Thu Jun 6 09:05:57 2019 +0200

    xmloff: create XMLDrawMetaImportOasis instances with an uno constructor
    
    Change-Id: I6793d227fd5e7f358904083f37ccae825f733fd4
    Reviewed-on: https://gerrit.libreoffice.org/73570
    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 aa3a03d3fd20..e6b8e91a84ea 100755
--- a/solenv/bin/native-code.py
+++ b/solenv/bin/native-code.py
@@ -270,6 +270,7 @@ core_constructor_list = [
     "com_sun_star_comp_Draw_XMLOasisImporter_get_implementation",
     "com_sun_star_comp_Draw_XMLOasisStylesImporter_get_implementation",
     "com_sun_star_comp_Draw_XMLOasisContentImporter_get_implementation",
+    "com_sun_star_comp_Draw_XMLOasisMetaImporter_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 d59e5d463e65..cd73d5ab96e3 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 XMLDrawMetaImportOasis_getImplementationName() throw();
-css::uno::Sequence<OUString> XMLDrawMetaImportOasis_getSupportedServiceNames() throw();
-/// @throws css::uno::Exception
-css::uno::Reference<css::uno::XInterface> XMLDrawMetaImportOasis_createInstance(
-    css::uno::Reference<css::lang::XMultiServiceFactory> const & rSMgr);
 OUString XMLDrawSettingsImportOasis_getImplementationName() throw();
 css::uno::Sequence<OUString> XMLDrawSettingsImportOasis_getSupportedServiceNames() throw();
 /// @throws css::uno::Exception
diff --git a/xmloff/source/core/facreg.cxx b/xmloff/source/core/facreg.cxx
index 446dfadbed10..bb66eea938d9 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( XMLDrawMetaImportOasis )
         else SINGLEFACTORY( XMLDrawSettingsImportOasis )
 
         // draw oasis export
diff --git a/xmloff/source/draw/sdxmlimp.cxx b/xmloff/source/draw/sdxmlimp.cxx
index ac40ce2c6b29..0c502c5b49d6 100644
--- a/xmloff/source/draw/sdxmlimp.cxx
+++ b/xmloff/source/draw/sdxmlimp.cxx
@@ -307,12 +307,19 @@ com_sun_star_comp_Draw_XMLOasisContentImporter_get_implementation(
                                              | SvXMLImportFlags::FONTDECLS));
 }
 
+extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
+com_sun_star_comp_Draw_XMLOasisMetaImporter_get_implementation(
+    uno::XComponentContext* pCtx, uno::Sequence<uno::Any> const& /*rSeq*/)
+{
+    return cppu::acquire(
+        new SdXMLImport(pCtx, "XMLDrawMetaImportOasis", true, SvXMLImportFlags::META));
+}
+
 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( XMLImpressMetaImportOasis, "com.sun.star.comp.Impress.XMLOasisMetaImporter", "XMLImpressMetaImportOasis", false, SvXMLImportFlags::META )
-SERVICE( XMLDrawMetaImportOasis, "com.sun.star.comp.Draw.XMLOasisMetaImporter", "XMLImpressMetaImportOasis", true, SvXMLImportFlags::META )
 
 SERVICE( XMLImpressSettingsImportOasis, "com.sun.star.comp.Impress.XMLOasisSettingsImporter", "XMLImpressSettingsImportOasis", false, SvXMLImportFlags::SETTINGS )
 SERVICE( XMLDrawSettingsImportOasis, "com.sun.star.comp.Draw.XMLOasisSettingsImporter", "XMLImpressSettingsImportOasis", true, SvXMLImportFlags::SETTINGS )
diff --git a/xmloff/util/xo.component b/xmloff/util/xo.component
index 638270ae9c97..2c96a6971e99 100644
--- a/xmloff/util/xo.component
+++ b/xmloff/util/xo.component
@@ -124,8 +124,11 @@
     constructor="com_sun_star_comp_Impress_XMLOasisMetaExporter_get_implementation">
     <service name="com.sun.star.comp.Impress.XMLOasisMetaExporter"/>
   </implementation>
-  <implementation name="XMLImpressMetaImportOasis">
+  <implementation name="XMLDrawMetaImportOasis"
+    constructor="com_sun_star_comp_Draw_XMLOasisMetaImporter_get_implementation">
     <service name="com.sun.star.comp.Draw.XMLOasisMetaImporter"/>
+  </implementation>
+  <implementation name="XMLImpressMetaImportOasis">
     <service name="com.sun.star.comp.Impress.XMLOasisMetaImporter"/>
   </implementation>
   <implementation name="XMLImpressSettingsExportOOO">


More information about the Libreoffice-commits mailing list