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

New commits:
commit bc4ef004b880fde2cdb8aba3c79f8b4a8d5764da
Author:     Miklos Vajna <vmik...@collabora.com>
AuthorDate: Thu Mar 5 21:07:26 2020 +0100
Commit:     Miklos Vajna <vmik...@collabora.com>
CommitDate: Fri Mar 6 09:03:51 2020 +0100

    xmloff: create SchXMLImport_Content instances with an uno constructor
    
    See tdf#74608 for motivation.
    
    Change-Id: I27826e04adbf8ae22c0ce026413c58eb1c6d7db8
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90067
    Tested-by: Jenkins
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>

diff --git a/solenv/bin/native-code.py b/solenv/bin/native-code.py
index aca0aac81ccf..29de9541b995 100755
--- a/solenv/bin/native-code.py
+++ b/solenv/bin/native-code.py
@@ -321,6 +321,7 @@ core_constructor_list = [
     "com_sun_star_comp_Chart_XMLOasisImporter_get_implementation",
     "com_sun_star_comp_Chart_XMLOasisMetaImporter_get_implementation",
     "com_sun_star_comp_Chart_XMLOasisStylesImporter_get_implementation",
+    "com_sun_star_comp_Chart_XMLOasisContentImporter_get_implementation",
 # xmlscript/util/xmlscript.component
     "com_sun_star_comp_xmlscript_XMLBasicExporter",
     "com_sun_star_comp_xmlscript_XMLOasisBasicExporter",
diff --git a/xmloff/inc/facreg.hxx b/xmloff/inc/facreg.hxx
index 6111b0478172..59428841197f 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; }
 } } }
 
-// chart oasis import
-OUString SchXMLImport_Content_getImplementationName() throw();
-css::uno::Sequence<OUString> SchXMLImport_Content_getSupportedServiceNames() 
throw();
-/// @throws css::uno::Exception
-css::uno::Reference<css::uno::XInterface> SchXMLImport_Content_createInstance(
-    css::uno::Reference<css::lang::XMultiServiceFactory> const & rSMgr);
-
 // chart oasis export
 OUString SchXMLExport_Oasis_getImplementationName() throw();
 css::uno::Sequence<OUString> SchXMLExport_Oasis_getSupportedServiceNames() 
throw();
diff --git a/xmloff/source/chart/SchXMLImport.cxx 
b/xmloff/source/chart/SchXMLImport.cxx
index 42a7e0fc8882..2675e3678fba 100644
--- a/xmloff/source/chart/SchXMLImport.cxx
+++ b/xmloff/source/chart/SchXMLImport.cxx
@@ -591,21 +591,6 @@ 
com_sun_star_comp_Chart_XMLOasisImporter_get_implementation(uno::XComponentConte
 
 // multiple storage version: one for content / styles / meta
 
-Sequence< OUString > SchXMLImport_Content_getSupportedServiceNames() throw()
-{
-    return Sequence< OUString > { 
"com.sun.star.comp.Chart.XMLOasisContentImporter" };
-}
-
-OUString SchXMLImport_Content_getImplementationName() throw()
-{
-    return "SchXMLImport.Content";
-}
-
-Reference< uno::XInterface > SchXMLImport_Content_createInstance(const 
Reference< lang::XMultiServiceFactory > & rSMgr)
-{
-    return static_cast<cppu::OWeakObject*>(new SchXMLImport( 
comphelper::getComponentContext(rSMgr), 
SchXMLImport_Content_getImplementationName(), SvXMLImportFlags::CONTENT | 
SvXMLImportFlags::AUTOSTYLES | SvXMLImportFlags::FONTDECLS ));
-}
-
 extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
 com_sun_star_comp_Chart_XMLOasisMetaImporter_get_implementation(
     uno::XComponentContext* pCtx, uno::Sequence<uno::Any> const& /*rSeq*/)
@@ -620,4 +605,13 @@ 
com_sun_star_comp_Chart_XMLOasisStylesImporter_get_implementation(
     return cppu::acquire(new SchXMLImport(pCtx, "SchXMLImport.Styles", 
SvXMLImportFlags::STYLES));
 }
 
+extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
+com_sun_star_comp_Chart_XMLOasisContentImporter_get_implementation(
+    uno::XComponentContext* pCtx, uno::Sequence<uno::Any> const& /*rSeq*/)
+{
+    return cppu::acquire(new SchXMLImport(pCtx, "SchXMLImport.Content",
+                                          SvXMLImportFlags::CONTENT | 
SvXMLImportFlags::AUTOSTYLES
+                                              | SvXMLImportFlags::FONTDECLS));
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/source/core/facreg.cxx b/xmloff/source/core/facreg.cxx
index 9e7602c32853..02e570e25832 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 oasis import
-        SINGLEFACTORY( SchXMLImport_Content )
-
         // chart oasis export
-        else SINGLEFACTORY( SchXMLExport_Oasis )
+        SINGLEFACTORY( SchXMLExport_Oasis )
         else SINGLEFACTORY( SchXMLExport_Oasis_Meta )
         else SINGLEFACTORY( SchXMLExport_Oasis_Styles )
         else SINGLEFACTORY( SchXMLExport_Oasis_Content )
diff --git a/xmloff/util/xo.component b/xmloff/util/xo.component
index 28c57096779e..69c015218d9e 100644
--- a/xmloff/util/xo.component
+++ b/xmloff/util/xo.component
@@ -44,7 +44,8 @@
       
constructor="com_sun_star_comp_Chart_XMLOasisImporter_get_implementation">
     <service name="com.sun.star.comp.Chart.XMLOasisImporter"/>
   </implementation>
-  <implementation name="SchXMLImport.Content">
+  <implementation name="SchXMLImport.Content"
+      
constructor="com_sun_star_comp_Chart_XMLOasisContentImporter_get_implementation">
     <service name="com.sun.star.comp.Chart.XMLOasisContentImporter"/>
   </implementation>
   <implementation name="SchXMLImport.Meta"
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to