[Libreoffice-commits] core.git: solenv/bin xmloff/inc xmloff/source xmloff/util
Miklos Vajna (via logerrit)
logerrit at kemper.freedesktop.org
Fri Apr 24 07:04:07 UTC 2020
solenv/bin/native-code.py | 1 +
xmloff/inc/facreg.hxx | 5 -----
xmloff/source/chart/SchXMLExport.cxx | 16 ++++------------
xmloff/source/core/facreg.cxx | 3 +--
xmloff/util/xo.component | 3 ++-
5 files changed, 8 insertions(+), 20 deletions(-)
New commits:
commit c909cc6a550e78816316e2674639178e95ab2a41
Author: Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Thu Apr 23 21:06:35 2020 +0200
Commit: Miklos Vajna <vmiklos at collabora.com>
CommitDate: Fri Apr 24 09:03:29 2020 +0200
xmloff: create SchXMLExport_Styles instances with an uno constructor
See tdf#74608 for motivation.
Change-Id: Ib15016bf08323936818bd9a26049772d3d6922c1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92824
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 a1dd94fd9626..3ea5f085b66e 100755
--- a/solenv/bin/native-code.py
+++ b/solenv/bin/native-code.py
@@ -330,6 +330,7 @@ core_constructor_list = [
"com_sun_star_comp_Chart_XMLOasisStylesExporter_get_implementation",
"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_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 04176d4fad91..3c473e36da36 100644
--- a/xmloff/inc/facreg.hxx
+++ b/xmloff/inc/facreg.hxx
@@ -32,11 +32,6 @@ namespace com { namespace sun { namespace star {
} } }
// chart OOo export
-OUString SchXMLExport_Styles_getImplementationName() throw();
-css::uno::Sequence<OUString> SchXMLExport_Styles_getSupportedServiceNames() throw();
-/// @throws css::uno::Exception
-css::uno::Reference<css::uno::XInterface> SchXMLExport_Styles_createInstance(
- css::uno::Reference<css::lang::XMultiServiceFactory> const & rSMgr);
OUString SchXMLExport_Content_getImplementationName() throw();
css::uno::Sequence<OUString> SchXMLExport_Content_getSupportedServiceNames() throw();
/// @throws css::uno::Exception
diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx
index 794fe851dc01..c77f99beb1d9 100644
--- a/xmloff/source/chart/SchXMLExport.cxx
+++ b/xmloff/source/chart/SchXMLExport.cxx
@@ -3794,19 +3794,11 @@ com_sun_star_comp_Chart_XMLOasisExporter_get_implementation(uno::XComponentConte
// multiple storage version: one for content / styles / meta
-Sequence< OUString > SchXMLExport_Styles_getSupportedServiceNames() throw()
-{
- return Sequence< OUString > { "com.sun.star.comp.Chart.XMLStylesExporter" };
-}
-
-OUString SchXMLExport_Styles_getImplementationName() throw()
-{
- return "SchXMLExport.Styles";
-}
-
-Reference< uno::XInterface > SchXMLExport_Styles_createInstance(const Reference< lang::XMultiServiceFactory >& rSMgr)
+extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
+com_sun_star_comp_Chart_XMLStylesExporter_get_implementation(
+ uno::XComponentContext* pCtx, uno::Sequence<uno::Any> const& /*rSeq*/)
{
- return static_cast<cppu::OWeakObject*>(new SchXMLExport( comphelper::getComponentContext(rSMgr), SchXMLExport_Styles_getImplementationName(), SvXMLExportFlags::STYLES ));
+ return cppu::acquire(new SchXMLExport(pCtx, "SchXMLExport.Styles", SvXMLExportFlags::STYLES));
}
// Oasis format
diff --git a/xmloff/source/core/facreg.cxx b/xmloff/source/core/facreg.cxx
index 26d8ee422250..e874fd89352e 100644
--- a/xmloff/source/core/facreg.cxx
+++ b/xmloff/source/core/facreg.cxx
@@ -55,8 +55,7 @@ XMLOFF_DLLPUBLIC void * xo_component_getFactory( const char * pImplName, void *
const sal_Int32 nImplNameLen = strlen( pImplName );
// chart OOo export
- SINGLEFACTORY( SchXMLExport_Styles )
- else SINGLEFACTORY( SchXMLExport_Content )
+ SINGLEFACTORY( SchXMLExport_Content )
// meta import/export OOo
else SINGLEFACTORY( XMLMetaExportOOO )
diff --git a/xmloff/util/xo.component b/xmloff/util/xo.component
index ecfa7c2b8762..123b7b4cf224 100644
--- a/xmloff/util/xo.component
+++ b/xmloff/util/xo.component
@@ -42,7 +42,8 @@
constructor="com_sun_star_comp_Chart_XMLOasisStylesExporter_get_implementation">
<service name="com.sun.star.comp.Chart.XMLOasisStylesExporter"/>
</implementation>
- <implementation name="SchXMLExport.Styles">
+ <implementation name="SchXMLExport.Styles"
+ constructor="com_sun_star_comp_Chart_XMLStylesExporter_get_implementation">
<service name="com.sun.star.comp.Chart.XMLStylesExporter"/>
</implementation>
<implementation name="SchXMLImport"
More information about the Libreoffice-commits
mailing list