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

Miklos Vajna (via logerrit) logerrit at kemper.freedesktop.org
Fri Nov 22 08:08:53 UTC 2019


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

New commits:
commit d0eb495c6a3eca77a475759298f58a70ab73851f
Author:     Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Thu Nov 21 21:05:28 2019 +0100
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Fri Nov 22 09:08:19 2019 +0100

    xmloff: create XMLDrawStylesExportOasis instances with an uno constructor
    
    See tdf#74608 for motivation.
    
    Change-Id: I68db3d4969e4bd40d1029ca3302bbda0dfe6e718
    Reviewed-on: https://gerrit.libreoffice.org/83432
    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 748f7310f4f6..533bcd0564c4 100755
--- a/solenv/bin/native-code.py
+++ b/solenv/bin/native-code.py
@@ -289,6 +289,7 @@ core_constructor_list = [
     "com_sun_star_comp_Draw_XMLOasisSettingsExporter_get_implementation",
     "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_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 4b00425996b9..a4e8cb50d272 100644
--- a/xmloff/inc/facreg.hxx
+++ b/xmloff/inc/facreg.hxx
@@ -37,11 +37,6 @@ 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);
-OUString XMLDrawStylesExportOasis_getImplementationName() throw();
-css::uno::Sequence<OUString> XMLDrawStylesExportOasis_getSupportedServiceNames() throw();
-/// @throws css::uno::Exception
-css::uno::Reference<css::uno::XInterface> XMLDrawStylesExportOasis_createInstance(
-    css::uno::Reference<css::lang::XMultiServiceFactory> const & rSMgr);
 
 // impress animation import
 OUString AnimationsImport_getImplementationName() throw();
diff --git a/xmloff/source/core/facreg.cxx b/xmloff/source/core/facreg.cxx
index 875e3df0ee46..97b7a2b71918 100644
--- a/xmloff/source/core/facreg.cxx
+++ b/xmloff/source/core/facreg.cxx
@@ -58,7 +58,6 @@ XMLOFF_DLLPUBLIC void * xo_component_getFactory( const sal_Char * pImplName, voi
 
         // draw oasis export
         else SINGLEFACTORY( XMLDrawExportOasis )
-        else SINGLEFACTORY( XMLDrawStylesExportOasis )
 
         // drawing layer export
         else SINGLEFACTORY( XMLDrawingLayerExport )
diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx
index ca706a5c3e5e..e54af095a2e7 100644
--- a/xmloff/source/draw/sdxmlexp.cxx
+++ b/xmloff/source/draw/sdxmlexp.cxx
@@ -2762,8 +2762,17 @@ com_sun_star_comp_Draw_XMLOasisContentExporter_get_implementation(
                                              | SvXMLExportFlags::FONTDECLS));
 }
 
+extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
+com_sun_star_comp_Draw_XMLOasisStylesExporter_get_implementation(
+    uno::XComponentContext* pCtx, uno::Sequence<uno::Any> const& /*rSeq*/)
+{
+    return cppu::acquire(new SdXMLExport(
+        pCtx, "XMLDrawStylesExportOasis", true,
+        SvXMLExportFlags::OASIS | SvXMLExportFlags::STYLES | SvXMLExportFlags::MASTERSTYLES
+            | 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 );
-SERVICE( XMLDrawStylesExportOasis, "com.sun.star.comp.Draw.XMLOasisStylesExporter", "XMLDrawStylesExportOasis", true, SvXMLExportFlags::OASIS|SvXMLExportFlags::STYLES|SvXMLExportFlags::MASTERSTYLES|SvXMLExportFlags::AUTOSTYLES|SvXMLExportFlags::FONTDECLS );
 
 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 ee4dd77f78c7..33db764c0e91 100644
--- a/xmloff/util/xo.component
+++ b/xmloff/util/xo.component
@@ -91,7 +91,8 @@
     constructor="com_sun_star_comp_Draw_XMLStylesExporter_get_implementation">
     <service name="com.sun.star.comp.Draw.XMLStylesExporter"/>
   </implementation>
-  <implementation name="XMLDrawStylesExportOasis">
+  <implementation name="XMLDrawStylesExportOasis"
+    constructor="com_sun_star_comp_Draw_XMLOasisStylesExporter_get_implementation">
     <service name="com.sun.star.comp.Draw.XMLOasisStylesExporter"/>
   </implementation>
   <implementation name="XMLDrawingLayerExport">


More information about the Libreoffice-commits mailing list