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

Miklos Vajna (via logerrit) logerrit at kemper.freedesktop.org
Fri May 15 07:28:31 UTC 2020


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

New commits:
commit 8a227630f1b4c8d592f33231977febb944be6a8e
Author:     Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Thu May 14 21:03:36 2020 +0200
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Fri May 15 09:27:51 2020 +0200

    xmloff: create SchXMLExport_Content instances with an uno constructor
    
    See tdf#74608 for motivation.
    
    Change-Id: I49f00c08635e571d75e5190d55cbe1f279566797
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94255
    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 0b439c071e98..f259d0743f43 100755
--- a/solenv/bin/native-code.py
+++ b/solenv/bin/native-code.py
@@ -332,6 +332,7 @@ core_constructor_list = [
     "com_sun_star_comp_Chart_XMLOasisContentExporter_get_implementation",
     "com_sun_star_comp_Chart_XMLExporter_get_implementation",
     "com_sun_star_comp_Chart_XMLStylesExporter_get_implementation",
+    "com_sun_star_comp_Chart_XMLContentExporter_get_implementation",
     "com_sun_star_comp_Chart_XMLOasisStylesImporter_get_implementation",
     "com_sun_star_comp_Chart_XMLOasisContentImporter_get_implementation",
     "com_sun_star_comp_Chart_XMLOasisExporter_get_implementation",
diff --git a/xmloff/inc/facreg.hxx b/xmloff/inc/facreg.hxx
index c97d278dc953..25091efca08e 100644
--- a/xmloff/inc/facreg.hxx
+++ b/xmloff/inc/facreg.hxx
@@ -31,13 +31,6 @@ namespace com::sun::star {
     namespace uno { class XInterface; }
 }
 
-// chart OOo export
-OUString SchXMLExport_Content_getImplementationName() throw();
-css::uno::Sequence<OUString> SchXMLExport_Content_getSupportedServiceNames() throw();
-/// @throws css::uno::Exception
-css::uno::Reference<css::uno::XInterface> SchXMLExport_Content_createInstance(
-    css::uno::Reference<css::lang::XMultiServiceFactory> const & rSMgr);
-
 // meta export OOo
 OUString XMLMetaExportOOO_getImplementationName() throw();
 css::uno::Sequence<OUString> XMLMetaExportOOO_getSupportedServiceNames() throw();
diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx
index 6c2f7b1e4120..2b4549889f2a 100644
--- a/xmloff/source/chart/SchXMLExport.cxx
+++ b/xmloff/source/chart/SchXMLExport.cxx
@@ -3820,19 +3820,13 @@ com_sun_star_comp_Chart_XMLOasisStylesExporter_get_implementation(
                                           SvXMLExportFlags::STYLES | SvXMLExportFlags::OASIS));
 }
 
-Sequence< OUString > SchXMLExport_Content_getSupportedServiceNames() throw()
-{
-    return Sequence< OUString > { "com.sun.star.comp.Chart.XMLContentExporter" };
-}
-
-OUString SchXMLExport_Content_getImplementationName() throw()
-{
-    return "SchXMLExport.Content";
-}
-
-Reference< uno::XInterface > SchXMLExport_Content_createInstance(const Reference< lang::XMultiServiceFactory > & rSMgr)
+extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
+com_sun_star_comp_Chart_XMLContentExporter_get_implementation(
+    uno::XComponentContext* pCtx, uno::Sequence<uno::Any> const& /*rSeq*/)
 {
-    return static_cast<cppu::OWeakObject*>(new SchXMLExport( comphelper::getComponentContext(rSMgr), SchXMLExport_Content_getImplementationName(), SvXMLExportFlags::AUTOSTYLES | SvXMLExportFlags::CONTENT | SvXMLExportFlags::FONTDECLS ));
+    return cppu::acquire(new SchXMLExport(pCtx, "SchXMLExport.Content",
+                                          SvXMLExportFlags::AUTOSTYLES | SvXMLExportFlags::CONTENT
+                                              | SvXMLExportFlags::FONTDECLS));
 }
 
 extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
diff --git a/xmloff/source/core/facreg.cxx b/xmloff/source/core/facreg.cxx
index e874fd89352e..48b12ad2060e 100644
--- a/xmloff/source/core/facreg.cxx
+++ b/xmloff/source/core/facreg.cxx
@@ -54,11 +54,8 @@ XMLOFF_DLLPUBLIC void * xo_component_getFactory( const char * pImplName, void *
 
         const sal_Int32 nImplNameLen = strlen( pImplName );
 
-        // chart OOo export
-        SINGLEFACTORY( SchXMLExport_Content )
-
         // meta import/export OOo
-        else SINGLEFACTORY( XMLMetaExportOOO )
+        SINGLEFACTORY( XMLMetaExportOOO )
 
         // auto text import/export
         else SINGLEFACTORY( XMLAutoTextEventExport )
diff --git a/xmloff/util/xo.component b/xmloff/util/xo.component
index 123b7b4cf224..cbb4efbf5bed 100644
--- a/xmloff/util/xo.component
+++ b/xmloff/util/xo.component
@@ -23,7 +23,8 @@
       constructor="com_sun_star_comp_Chart_XMLExporter_get_implementation">
     <service name="com.sun.star.comp.Chart.XMLExporter"/>
   </implementation>
-  <implementation name="SchXMLExport.Content">
+  <implementation name="SchXMLExport.Content"
+    constructor="com_sun_star_comp_Chart_XMLContentExporter_get_implementation">
     <service name="com.sun.star.comp.Chart.XMLContentExporter"/>
   </implementation>
   <implementation name="SchXMLExport.Oasis.Compact"


More information about the Libreoffice-commits mailing list