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

Miklos Vajna (via logerrit) logerrit at kemper.freedesktop.org
Fri Dec 6 07:51:34 UTC 2019


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

New commits:
commit 6182f1053c1cf98fb3c7129e478e271ea1ee9977
Author:     Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Thu Dec 5 21:13:12 2019 +0100
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Fri Dec 6 08:50:13 2019 +0100

    xmloff: create XMLDrawExportOasis instances with an uno constructor
    
    See tdf#74608 for motivation.
    
    Change-Id: Id8cad1ed02b5fee93184e17ebf80435c01aa3618
    Reviewed-on: https://gerrit.libreoffice.org/84583
    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 533bcd0564c4..5b67a5300bf4 100755
--- a/solenv/bin/native-code.py
+++ b/solenv/bin/native-code.py
@@ -290,6 +290,7 @@ core_constructor_list = [
     "com_sun_star_comp_Draw_XMLOasisMetaExporter_get_implementation",
     "com_sun_star_comp_Draw_XMLOasisContentExporter_get_implementation",
     "com_sun_star_comp_Draw_XMLOasisStylesExporter_get_implementation",
+    "com_sun_star_comp_Draw_XMLOasisExporter_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 a4e8cb50d272..25b2334f0b1b 100644
--- a/xmloff/inc/facreg.hxx
+++ b/xmloff/inc/facreg.hxx
@@ -31,13 +31,6 @@ namespace com { namespace sun { namespace star {
     namespace uno { class XInterface; }
 } } }
 
-// draw oasis export
-OUString XMLDrawExportOasis_getImplementationName() throw();
-css::uno::Sequence<OUString> XMLDrawExportOasis_getSupportedServiceNames() throw();
-/// @throws css::uno::Exception
-css::uno::Reference<css::uno::XInterface> XMLDrawExportOasis_createInstance(
-    css::uno::Reference<css::lang::XMultiServiceFactory> const & rSMgr);
-
 // impress animation import
 OUString AnimationsImport_getImplementationName() throw();
 css::uno::Sequence<OUString> AnimationsImport_getSupportedServiceNames() throw();
diff --git a/xmloff/source/core/facreg.cxx b/xmloff/source/core/facreg.cxx
index 97b7a2b71918..a6018bf06ed6 100644
--- a/xmloff/source/core/facreg.cxx
+++ b/xmloff/source/core/facreg.cxx
@@ -56,9 +56,6 @@ XMLOFF_DLLPUBLIC void * xo_component_getFactory( const sal_Char * pImplName, voi
 
         SINGLEFACTORY( AnimationsImport )
 
-        // draw oasis export
-        else SINGLEFACTORY( XMLDrawExportOasis )
-
         // drawing layer export
         else SINGLEFACTORY( XMLDrawingLayerExport )
 
diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx
index e54af095a2e7..68854c836b68 100644
--- a/xmloff/source/draw/sdxmlexp.cxx
+++ b/xmloff/source/draw/sdxmlexp.cxx
@@ -2772,7 +2772,17 @@ com_sun_star_comp_Draw_XMLOasisStylesExporter_get_implementation(
             | SvXMLExportFlags::AUTOSTYLES | SvXMLExportFlags::FONTDECLS));
 }
 
-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 );
+extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
+com_sun_star_comp_Draw_XMLOasisExporter_get_implementation(uno::XComponentContext* pCtx,
+                                                           uno::Sequence<uno::Any> const& /*rSeq*/)
+{
+    return cppu::acquire(new SdXMLExport(
+        pCtx, "XMLDrawExportOasis", true,
+        SvXMLExportFlags::OASIS | SvXMLExportFlags::META | SvXMLExportFlags::STYLES
+            | SvXMLExportFlags::MASTERSTYLES | SvXMLExportFlags::AUTOSTYLES
+            | SvXMLExportFlags::CONTENT | SvXMLExportFlags::SCRIPTS | SvXMLExportFlags::SETTINGS
+            | SvXMLExportFlags::FONTDECLS | SvXMLExportFlags::EMBEDDED));
+}
 
 SERVICE( XMLDrawingLayerExport, "com.sun.star.comp.DrawingLayer.XMLExporter", "XMLDrawingLayerExport", true, SvXMLExportFlags::OASIS|SvXMLExportFlags::STYLES|SvXMLExportFlags::AUTOSTYLES|SvXMLExportFlags::CONTENT|SvXMLExportFlags::FONTDECLS|SvXMLExportFlags::EMBEDDED );
 SERVICE( XMLImpressClipboardExport, "com.sun.star.comp.Impress.XMLClipboardExporter", "XMLImpressClipboardExport", false, SvXMLExportFlags::OASIS|SvXMLExportFlags::STYLES|SvXMLExportFlags::AUTOSTYLES|SvXMLExportFlags::CONTENT|SvXMLExportFlags::FONTDECLS|SvXMLExportFlags::EMBEDDED );
diff --git a/xmloff/util/xo.component b/xmloff/util/xo.component
index 33db764c0e91..eb218ca12d21 100644
--- a/xmloff/util/xo.component
+++ b/xmloff/util/xo.component
@@ -64,7 +64,8 @@
     constructor="com_sun_star_comp_Draw_XMLExporter_get_implementation">
     <service name="com.sun.star.comp.Draw.XMLExporter"/>
   </implementation>
-  <implementation name="XMLDrawExportOasis">
+  <implementation name="XMLDrawExportOasis"
+    constructor="com_sun_star_comp_Draw_XMLOasisExporter_get_implementation">
     <service name="com.sun.star.comp.Draw.XMLOasisExporter"/>
   </implementation>
   <implementation name="XMLDrawImportOasis"


More information about the Libreoffice-commits mailing list