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

Miklos Vajna (via logerrit) logerrit at kemper.freedesktop.org
Fri Sep 13 07:26:47 UTC 2019


 solenv/bin/native-code.py       |    1 +
 xmloff/inc/facreg.hxx           |    7 -------
 xmloff/source/core/facreg.cxx   |    1 -
 xmloff/source/draw/sdxmlexp.cxx |   13 ++++++++++++-
 xmloff/util/xo.component        |    3 ++-
 5 files changed, 15 insertions(+), 10 deletions(-)

New commits:
commit eefd7c12f71197ffeb8a29528045e97cbf5c6d2a
Author:     Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Thu Sep 12 23:50:32 2019 +0200
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Fri Sep 13 09:26:10 2019 +0200

    xmloff: create XMLDrawExportOOO instances with an uno constructor
    
    See tdf#74608 for motivation.
    
    Change-Id: I3829df0f3f9d81257f06ef3c2f4fbe9af98dd953
    Reviewed-on: https://gerrit.libreoffice.org/78859
    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 aeb73892d64d..3e2edaa26462 100755
--- a/solenv/bin/native-code.py
+++ b/solenv/bin/native-code.py
@@ -281,6 +281,7 @@ core_constructor_list = [
     "com_sun_star_comp_Impress_XMLMetaExporter_get_implementation",
     "com_sun_star_comp_Impress_XMLSettingsExporter_get_implementation",
     "com_sun_star_comp_Impress_XMLExporter_get_implementation",
+    "com_sun_star_comp_Draw_XMLExporter_get_implementation",
     "com_sun_star_comp_Draw_XMLOasisImporter_get_implementation",
     "com_sun_star_comp_Draw_XMLOasisStylesImporter_get_implementation",
     "com_sun_star_comp_Draw_XMLOasisContentImporter_get_implementation",
diff --git a/xmloff/inc/facreg.hxx b/xmloff/inc/facreg.hxx
index bef148811eaa..431bb1126de7 100644
--- a/xmloff/inc/facreg.hxx
+++ b/xmloff/inc/facreg.hxx
@@ -60,14 +60,7 @@ css::uno::Sequence<OUString> XMLDrawSettingsExportOasis_getSupportedServiceNames
 css::uno::Reference<css::uno::XInterface> XMLDrawSettingsExportOasis_createInstance(
     css::uno::Reference<css::lang::XMultiServiceFactory> const & rSMgr);
 
-// draw OOo import
-
 // draw OOo export
-OUString XMLDrawExportOOO_getImplementationName() throw();
-css::uno::Sequence<OUString> XMLDrawExportOOO_getSupportedServiceNames() throw();
-/// @throws css::uno::Exception
-css::uno::Reference<css::uno::XInterface> XMLDrawExportOOO_createInstance(
-    css::uno::Reference<css::lang::XMultiServiceFactory> const & rSMgr);
 OUString XMLDrawStylesExportOOO_getImplementationName() throw();
 css::uno::Sequence<OUString> XMLDrawStylesExportOOO_getSupportedServiceNames() throw();
 /// @throws css::uno::Exception
diff --git a/xmloff/source/core/facreg.cxx b/xmloff/source/core/facreg.cxx
index f25c4262a477..1b79ff004184 100644
--- a/xmloff/source/core/facreg.cxx
+++ b/xmloff/source/core/facreg.cxx
@@ -66,7 +66,6 @@ XMLOFF_DLLPUBLIC void * xo_component_getFactory( const sal_Char * pImplName, voi
         else SINGLEFACTORY( XMLDrawSettingsExportOasis )
 
         // draw OOo export
-        else SINGLEFACTORY( XMLDrawExportOOO )
         else SINGLEFACTORY( XMLDrawStylesExportOOO )
         else SINGLEFACTORY( XMLDrawContentExportOOO )
         else SINGLEFACTORY( XMLDrawMetaExportOOO )
diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx
index c271f26b78db..d874973bc707 100644
--- a/xmloff/source/draw/sdxmlexp.cxx
+++ b/xmloff/source/draw/sdxmlexp.cxx
@@ -2705,13 +2705,24 @@ com_sun_star_comp_Impress_XMLExporter_get_implementation(uno::XComponentContext*
             | SvXMLExportFlags::EMBEDDED));
 }
 
+extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
+com_sun_star_comp_Draw_XMLExporter_get_implementation(uno::XComponentContext* pCtx,
+                                                      uno::Sequence<uno::Any> const& /*rSeq*/)
+{
+    return cppu::acquire(new SdXMLExport(
+        pCtx, "XMLDrawExportOOO", true,
+        SvXMLExportFlags::META | SvXMLExportFlags::STYLES | SvXMLExportFlags::MASTERSTYLES
+            | SvXMLExportFlags::AUTOSTYLES | SvXMLExportFlags::CONTENT | SvXMLExportFlags::SCRIPTS
+            | SvXMLExportFlags::SETTINGS | SvXMLExportFlags::FONTDECLS
+            | SvXMLExportFlags::EMBEDDED));
+}
+
 SERVICE( XMLDrawExportOasis, "com.sun.star.comp.Draw.XMLOasisExporter", "XMLDrawExportOasis", true, SvXMLExportFlags::OASIS|SvXMLExportFlags::META|SvXMLExportFlags::STYLES|SvXMLExportFlags::MASTERSTYLES|SvXMLExportFlags::AUTOSTYLES|SvXMLExportFlags::CONTENT|SvXMLExportFlags::SCRIPTS|SvXMLExportFlags::SETTINGS|SvXMLExportFlags::FONTDECLS|SvXMLExportFlags::EMBEDDED );
 SERVICE( XMLDrawStylesExportOasis, "com.sun.star.comp.Draw.XMLOasisStylesExporter", "XMLDrawStylesExportOasis", true, SvXMLExportFlags::OASIS|SvXMLExportFlags::STYLES|SvXMLExportFlags::MASTERSTYLES|SvXMLExportFlags::AUTOSTYLES|SvXMLExportFlags::FONTDECLS );
 SERVICE( XMLDrawContentExportOasis, "com.sun.star.comp.Draw.XMLOasisContentExporter", "XMLDrawContentExportOasis", true, SvXMLExportFlags::OASIS|SvXMLExportFlags::AUTOSTYLES|SvXMLExportFlags::CONTENT|SvXMLExportFlags::SCRIPTS|SvXMLExportFlags::FONTDECLS );
 SERVICE( XMLDrawMetaExportOasis, "com.sun.star.comp.Draw.XMLOasisMetaExporter", "XMLDrawMetaExportOasis", true, SvXMLExportFlags::OASIS|SvXMLExportFlags::META );
 SERVICE( XMLDrawSettingsExportOasis, "com.sun.star.comp.Draw.XMLOasisSettingsExporter", "XMLDrawSettingsExportOasis", true, SvXMLExportFlags::OASIS|SvXMLExportFlags::SETTINGS );
 
-SERVICE( XMLDrawExportOOO, "com.sun.star.comp.Draw.XMLExporter", "XMLDrawExportOOO", true, SvXMLExportFlags::META|SvXMLExportFlags::STYLES|SvXMLExportFlags::MASTERSTYLES|SvXMLExportFlags::AUTOSTYLES|SvXMLExportFlags::CONTENT|SvXMLExportFlags::SCRIPTS|SvXMLExportFlags::SETTINGS|SvXMLExportFlags::FONTDECLS|SvXMLExportFlags::EMBEDDED );
 SERVICE( XMLDrawStylesExportOOO, "com.sun.star.comp.Draw.XMLStylesExporter", "XMLDrawStylesExportOOO", true, SvXMLExportFlags::STYLES|SvXMLExportFlags::MASTERSTYLES|SvXMLExportFlags::AUTOSTYLES|SvXMLExportFlags::FONTDECLS );
 SERVICE( XMLDrawContentExportOOO, "com.sun.star.comp.Draw.XMLContentExporter", "XMLDrawContentExportOOO", true, SvXMLExportFlags::AUTOSTYLES|SvXMLExportFlags::CONTENT|SvXMLExportFlags::SCRIPTS|SvXMLExportFlags::FONTDECLS );
 SERVICE( XMLDrawMetaExportOOO, "com.sun.star.comp.Draw.XMLMetaExporter", "XMLDrawMetaExportOOO", true, SvXMLExportFlags::META );
diff --git a/xmloff/util/xo.component b/xmloff/util/xo.component
index 1dad34ddd4ff..b0e1095a4525 100644
--- a/xmloff/util/xo.component
+++ b/xmloff/util/xo.component
@@ -58,7 +58,8 @@
   <implementation name="XMLDrawContentExportOasis">
     <service name="com.sun.star.comp.Draw.XMLOasisContentExporter"/>
   </implementation>
-  <implementation name="XMLDrawExportOOO">
+  <implementation name="XMLDrawExportOOO"
+    constructor="com_sun_star_comp_Draw_XMLExporter_get_implementation">
     <service name="com.sun.star.comp.Draw.XMLExporter"/>
   </implementation>
   <implementation name="XMLDrawExportOasis">


More information about the Libreoffice-commits mailing list