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

Miklos Vajna (via logerrit) logerrit at kemper.freedesktop.org
Fri May 22 07:34:09 UTC 2020


 solenv/bin/native-code.py                  |    1 +
 xmloff/inc/facreg.hxx                      |    7 -------
 xmloff/source/core/facreg.cxx              |    5 +----
 xmloff/source/meta/MetaExportComponent.cxx |   19 +++++--------------
 xmloff/util/xo.component                   |    3 ++-
 5 files changed, 9 insertions(+), 26 deletions(-)

New commits:
commit e5868f6542af3a1fd87791b2c0d2e8d4f455f831
Author:     Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Thu May 21 21:20:30 2020 +0200
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Fri May 22 09:33:27 2020 +0200

    xmloff: create XMLMetaExportOOO instances with an uno constructor
    
    See tdf#74608 for motivation.
    
    Change-Id: Ie3bed67b736ea3a3c8071336594bcbe54c6618a5
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94651
    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 0d73816288be..f5012b2ff18f 100755
--- a/solenv/bin/native-code.py
+++ b/solenv/bin/native-code.py
@@ -290,6 +290,7 @@ core_constructor_list = [
     "com_sun_star_comp_uui_UUIInteractionRequestStringResolver_get_implementation",
 # xmloff/util/xo.component
     "XMLMetaExportComponent_get_implementation",
+    "XMLMetaExportOOo_get_implementation",
     "XMLMetaImportComponent_get_implementation",
     "XMLVersionListPersistence_get_implementation",
     "com_sun_star_comp_Impress_XMLOasisImporter_get_implementation",
diff --git a/xmloff/inc/facreg.hxx b/xmloff/inc/facreg.hxx
index 25091efca08e..e810c5465831 100644
--- a/xmloff/inc/facreg.hxx
+++ b/xmloff/inc/facreg.hxx
@@ -31,13 +31,6 @@ namespace com::sun::star {
     namespace uno { class XInterface; }
 }
 
-// meta export OOo
-OUString XMLMetaExportOOO_getImplementationName() throw();
-css::uno::Sequence<OUString> XMLMetaExportOOO_getSupportedServiceNames() throw();
-/// @throws css::uno::Exception
-css::uno::Reference<css::uno::XInterface> XMLMetaExportOOO_createInstance(
-    css::uno::Reference<css::lang::XMultiServiceFactory> const & rSMgr);
-
 // writer autotext event export
 OUString XMLAutoTextEventExport_getImplementationName() throw();
 css::uno::Sequence<OUString> XMLAutoTextEventExport_getSupportedServiceNames() throw();
diff --git a/xmloff/source/core/facreg.cxx b/xmloff/source/core/facreg.cxx
index 48b12ad2060e..52c719d30d48 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 );
 
-        // meta import/export OOo
-        SINGLEFACTORY( XMLMetaExportOOO )
-
         // auto text import/export
-        else SINGLEFACTORY( XMLAutoTextEventExport )
+        SINGLEFACTORY( XMLAutoTextEventExport )
         else SINGLEFACTORY( XMLAutoTextEventImport )
         else SINGLEFACTORY( XMLAutoTextEventExportOOO )
 
diff --git a/xmloff/source/meta/MetaExportComponent.cxx b/xmloff/source/meta/MetaExportComponent.cxx
index 61b6e9a85629..228de2fe94e9 100644
--- a/xmloff/source/meta/MetaExportComponent.cxx
+++ b/xmloff/source/meta/MetaExportComponent.cxx
@@ -168,12 +168,6 @@ void XMLMetaExportComponent::ExportAutoStyles_() {}
 void XMLMetaExportComponent::ExportMasterStyles_() {}
 void XMLMetaExportComponent::ExportContent_() {}
 
-uno::Sequence< OUString > XMLMetaExportOOO_getSupportedServiceNames()
-    throw()
-{
-    return uno::Sequence< OUString > { "com.sun.star.document.XMLMetaExporter" };
-}
-
 extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface *
 XMLMetaExportComponent_get_implementation(
     css::uno::XComponentContext *context,
@@ -182,15 +176,12 @@ XMLMetaExportComponent_get_implementation(
     return cppu::acquire(new XMLMetaExportComponent(context, "XMLMetaExportComponent", SvXMLExportFlags::META|SvXMLExportFlags::OASIS));
 }
 
-OUString XMLMetaExportOOO_getImplementationName() throw()
-{
-    return "XMLMetaExportOOo";
-}
-
-uno::Reference< uno::XInterface > XMLMetaExportOOO_createInstance(
-        const uno::Reference< lang::XMultiServiceFactory > & rSMgr)
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
+XMLMetaExportOOo_get_implementation(css::uno::XComponentContext* context,
+                                    css::uno::Sequence<css::uno::Any> const&)
 {
-    return static_cast<cppu::OWeakObject*>(new XMLMetaExportComponent( comphelper::getComponentContext(rSMgr), XMLMetaExportOOO_getImplementationName(), SvXMLExportFlags::META));
+    return cppu::acquire(
+        new XMLMetaExportComponent(context, "XMLMetaExportOOo", SvXMLExportFlags::META));
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/util/xo.component b/xmloff/util/xo.component
index cbb4efbf5bed..9942e90b6a65 100644
--- a/xmloff/util/xo.component
+++ b/xmloff/util/xo.component
@@ -195,7 +195,8 @@
       constructor="XMLMetaExportComponent_get_implementation">
     <service name="com.sun.star.document.XMLOasisMetaExporter"/>
   </implementation>
-  <implementation name="XMLMetaExportOOo">
+  <implementation name="XMLMetaExportOOo"
+    constructor="XMLMetaExportOOo_get_implementation">
     <service name="com.sun.star.document.XMLMetaExporter"/>
   </implementation>
   <implementation name="XMLMetaImportComponent"


More information about the Libreoffice-commits mailing list