summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2020-04-16 21:19:51 +0200
committerMiklos Vajna <vmiklos@collabora.com>2020-04-17 08:41:32 +0200
commit2ab7643aa652dcbcfe29be41bfd9c8502398dd42 (patch)
tree6d07388f4f554a02035af204aa4d684679800ec5 /xmloff
parent96f77910e86f88c99621a8b17c09fc69f9f1d8f3 (diff)
xmloff: create SchXMLExport (flat OOoXML) instances with an uno constructor
See tdf#74608 for motivation. Change-Id: I67138b848411d91172ceec7af6826841b017cfdc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92390 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/inc/facreg.hxx5
-rw-r--r--xmloff/source/chart/SchXMLExport.cxx21
-rw-r--r--xmloff/source/core/facreg.cxx3
-rw-r--r--xmloff/util/xo.component3
4 files changed, 11 insertions, 21 deletions
diff --git a/xmloff/inc/facreg.hxx b/xmloff/inc/facreg.hxx
index beaf764e3c7d..04176d4fad91 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_getImplementationName() throw();
-css::uno::Sequence<OUString> SchXMLExport_getSupportedServiceNames() throw();
-/// @throws css::uno::Exception
-css::uno::Reference<css::uno::XInterface> SchXMLExport_createInstance(
- css::uno::Reference<css::lang::XMultiServiceFactory> const & rSMgr);
OUString SchXMLExport_Styles_getImplementationName() throw();
css::uno::Sequence<OUString> SchXMLExport_Styles_getSupportedServiceNames() throw();
/// @throws css::uno::Exception
diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx
index 5566c0b2dfd3..794fe851dc01 100644
--- a/xmloff/source/chart/SchXMLExport.cxx
+++ b/xmloff/source/chart/SchXMLExport.cxx
@@ -3768,20 +3768,15 @@ void SchXMLExportHelper_Impl::InitRangeSegmentationProperties( const Reference<
// first version: everything goes in one storage
-Sequence< OUString > SchXMLExport_getSupportedServiceNames() throw()
-{
- return Sequence< OUString > { "com.sun.star.comp.Chart.XMLExporter" };
-}
-
-OUString SchXMLExport_getImplementationName() throw()
-{
- return "SchXMLExport.Compact";
-}
-
-Reference< uno::XInterface > SchXMLExport_createInstance(const Reference< lang::XMultiServiceFactory > & rSMgr)
+extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
+com_sun_star_comp_Chart_XMLExporter_get_implementation(uno::XComponentContext* pCtx,
+ uno::Sequence<uno::Any> const& /*rSeq*/)
{
- // #103997# removed some flags from EXPORT_ALL
- return static_cast<cppu::OWeakObject*>(new SchXMLExport( comphelper::getComponentContext(rSMgr), SchXMLExport_getImplementationName(), SvXMLExportFlags::ALL ^ ( SvXMLExportFlags::SETTINGS | SvXMLExportFlags::MASTERSTYLES | SvXMLExportFlags::SCRIPTS )));
+ return cppu::acquire(
+ new SchXMLExport(pCtx, "SchXMLExport.Compact",
+ SvXMLExportFlags::ALL
+ ^ (SvXMLExportFlags::SETTINGS | SvXMLExportFlags::MASTERSTYLES
+ | SvXMLExportFlags::SCRIPTS)));
}
// Oasis format
diff --git a/xmloff/source/core/facreg.cxx b/xmloff/source/core/facreg.cxx
index 864a7ca8a418..26d8ee422250 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 )
- else SINGLEFACTORY( SchXMLExport_Styles )
+ SINGLEFACTORY( SchXMLExport_Styles )
else SINGLEFACTORY( SchXMLExport_Content )
// meta import/export OOo
diff --git a/xmloff/util/xo.component b/xmloff/util/xo.component
index e92c1cdeb66b..ecfa7c2b8762 100644
--- a/xmloff/util/xo.component
+++ b/xmloff/util/xo.component
@@ -19,7 +19,8 @@
<component loader="com.sun.star.loader.SharedLibrary" environment="@CPPU_ENV@"
prefix="xo" xmlns="http://openoffice.org/2010/uno-components">
- <implementation name="SchXMLExport.Compact">
+ <implementation name="SchXMLExport.Compact"
+ constructor="com_sun_star_comp_Chart_XMLExporter_get_implementation">
<service name="com.sun.star.comp.Chart.XMLExporter"/>
</implementation>
<implementation name="SchXMLExport.Content">