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

Miklos Vajna (via logerrit) logerrit at kemper.freedesktop.org
Thu Jun 20 07:04:04 UTC 2019


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

New commits:
commit 7c19f35d60ff55faeaea70a5910b612be6446ebf
Author:     Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Wed Jun 19 23:01:04 2019 +0200
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Thu Jun 20 09:02:58 2019 +0200

    xmloff: create XMLImportSettingsImportOasis instances with an uno constructor
    
    See tdf#74608 for motivation.
    
    Change-Id: I3e2afe5184f686180b287078477f095792c9ac12
    Reviewed-on: https://gerrit.libreoffice.org/74384
    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 3be058196778..b2de206b0833 100755
--- a/solenv/bin/native-code.py
+++ b/solenv/bin/native-code.py
@@ -267,6 +267,7 @@ core_constructor_list = [
     "com_sun_star_comp_Impress_XMLOasisContentExporter_get_implementation",
     "com_sun_star_comp_Impress_XMLOasisMetaExporter_get_implementation",
     "com_sun_star_comp_Impress_XMLOasisSettingsExporter_get_implementation",
+    "com_sun_star_comp_Impress_XMLOasisSettingsImporter_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 bc49e6883df2..d3a6317a6775 100644
--- a/xmloff/inc/facreg.hxx
+++ b/xmloff/inc/facreg.hxx
@@ -49,11 +49,6 @@ css::uno::Sequence<OUString> XMLImpressMetaImportOasis_getSupportedServiceNames(
 /// @throws css::uno::Exception
 css::uno::Reference<css::uno::XInterface> XMLImpressMetaImportOasis_createInstance(
     css::uno::Reference<css::lang::XMultiServiceFactory> const & rSMgr);
-OUString XMLImpressSettingsImportOasis_getImplementationName() throw();
-css::uno::Sequence<OUString> XMLImpressSettingsImportOasis_getSupportedServiceNames() throw();
-/// @throws css::uno::Exception
-css::uno::Reference<css::uno::XInterface> XMLImpressSettingsImportOasis_createInstance(
-    css::uno::Reference<css::lang::XMultiServiceFactory> const & rSMgr);
 
 // impress OOo export
 OUString XMLImpressExportOOO_getImplementationName() throw();
diff --git a/xmloff/source/core/facreg.cxx b/xmloff/source/core/facreg.cxx
index 289855108c7e..6e34f4ef64d2 100644
--- a/xmloff/source/core/facreg.cxx
+++ b/xmloff/source/core/facreg.cxx
@@ -60,7 +60,6 @@ XMLOFF_DLLPUBLIC void * xo_component_getFactory( const sal_Char * pImplName, voi
         SINGLEFACTORY( XMLImpressStylesImportOasis )
         else SINGLEFACTORY( XMLImpressContentImportOasis )
         else SINGLEFACTORY( XMLImpressMetaImportOasis )
-        else SINGLEFACTORY( XMLImpressSettingsImportOasis )
 
         else SINGLEFACTORY( AnimationsImport )
 
diff --git a/xmloff/source/draw/sdxmlimp.cxx b/xmloff/source/draw/sdxmlimp.cxx
index 9e170db28ddd..d11c4877b6ee 100644
--- a/xmloff/source/draw/sdxmlimp.cxx
+++ b/xmloff/source/draw/sdxmlimp.cxx
@@ -330,7 +330,13 @@ SERVICE( XMLImpressContentImportOasis, "com.sun.star.comp.Impress.XMLOasisConten
 
 SERVICE( XMLImpressMetaImportOasis, "com.sun.star.comp.Impress.XMLOasisMetaImporter", "XMLImpressMetaImportOasis", false, SvXMLImportFlags::META )
 
-SERVICE( XMLImpressSettingsImportOasis, "com.sun.star.comp.Impress.XMLOasisSettingsImporter", "XMLImpressSettingsImportOasis", false, SvXMLImportFlags::SETTINGS )
+extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
+com_sun_star_comp_Impress_XMLOasisSettingsImporter_get_implementation(
+    uno::XComponentContext* pCtx, uno::Sequence<uno::Any> const& /*rSeq*/)
+{
+    return cppu::acquire(
+        new SdXMLImport(pCtx, "XMLImpressSettingsImportOasis", false, SvXMLImportFlags::SETTINGS));
+}
 
 SdXMLImport::SdXMLImport(
     const css::uno::Reference< css::uno::XComponentContext >& xContext,
diff --git a/xmloff/util/xo.component b/xmloff/util/xo.component
index 0c0ff1976510..5fb27d791ba8 100644
--- a/xmloff/util/xo.component
+++ b/xmloff/util/xo.component
@@ -142,7 +142,8 @@
     constructor="com_sun_star_comp_Draw_XMLOasisSettingsImporter_get_implementation">
     <service name="com.sun.star.comp.Draw.XMLOasisSettingsImporter"/>
   </implementation>
-  <implementation name="XMLImpressSettingsImportOasis">
+  <implementation name="XMLImpressSettingsImportOasis"
+    constructor="com_sun_star_comp_Impress_XMLOasisSettingsImporter_get_implementation">
     <service name="com.sun.star.comp.Impress.XMLOasisSettingsImporter"/>
   </implementation>
   <implementation name="XMLImpressStylesExportOOO">


More information about the Libreoffice-commits mailing list