diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2020-04-02 21:34:12 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2020-04-03 09:31:13 +0200 |
commit | 1742d70c696e5adda1edc59d9905d0b6fc321933 (patch) | |
tree | a147544548e435e4f5717788120d9a7849e1193d /xmloff | |
parent | 301133e0a8c0ef761c3067b4d76fd9af114f4a6a (diff) |
xmloff: create SchXMLExport_Oasis_Styles instances with an uno constructor
See tdf#74608 for motivation.
Change-Id: I9eb2702650c94ec064c5403015513efee1e1fe1e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91601
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/inc/facreg.hxx | 5 | ||||
-rw-r--r-- | xmloff/source/chart/SchXMLExport.cxx | 17 | ||||
-rw-r--r-- | xmloff/source/core/facreg.cxx | 3 | ||||
-rw-r--r-- | xmloff/util/xo.component | 3 |
4 files changed, 8 insertions, 20 deletions
diff --git a/xmloff/inc/facreg.hxx b/xmloff/inc/facreg.hxx index 842689322022..6c9fff91ea18 100644 --- a/xmloff/inc/facreg.hxx +++ b/xmloff/inc/facreg.hxx @@ -32,11 +32,6 @@ namespace com { namespace sun { namespace star { } } } // chart oasis export -OUString SchXMLExport_Oasis_Styles_getImplementationName() throw(); -css::uno::Sequence<OUString> SchXMLExport_Oasis_Styles_getSupportedServiceNames() throw(); -/// @throws css::uno::Exception -css::uno::Reference<css::uno::XInterface> SchXMLExport_Oasis_Styles_createInstance( - css::uno::Reference<css::lang::XMultiServiceFactory> const & rSMgr); OUString SchXMLExport_Oasis_Content_getImplementationName() throw(); css::uno::Sequence<OUString> SchXMLExport_Oasis_Content_getSupportedServiceNames() throw(); /// @throws css::uno::Exception diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx index f438fc3abf0c..b38edd87571b 100644 --- a/xmloff/source/chart/SchXMLExport.cxx +++ b/xmloff/source/chart/SchXMLExport.cxx @@ -3798,19 +3798,12 @@ Reference< uno::XInterface > SchXMLExport_Styles_createInstance(const Reference< } // Oasis format -Sequence< OUString > SchXMLExport_Oasis_Styles_getSupportedServiceNames() throw() -{ - return Sequence< OUString > { "com.sun.star.comp.Chart.XMLOasisStylesExporter" }; -} - -OUString SchXMLExport_Oasis_Styles_getImplementationName() throw() -{ - return "SchXMLExport.Oasis.Styles"; -} - -Reference< uno::XInterface > SchXMLExport_Oasis_Styles_createInstance(const Reference< lang::XMultiServiceFactory > & rSMgr) +extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface* +com_sun_star_comp_Chart_XMLOasisStylesExporter_get_implementation( + uno::XComponentContext* pCtx, uno::Sequence<uno::Any> const& /*rSeq*/) { - return static_cast<cppu::OWeakObject*>(new SchXMLExport( comphelper::getComponentContext(rSMgr), SchXMLExport_Oasis_Styles_getImplementationName(), SvXMLExportFlags::STYLES | SvXMLExportFlags::OASIS )); + return cppu::acquire(new SchXMLExport(pCtx, "SchXMLExport.Oasis.Styles", + SvXMLExportFlags::STYLES | SvXMLExportFlags::OASIS)); } Sequence< OUString > SchXMLExport_Content_getSupportedServiceNames() throw() diff --git a/xmloff/source/core/facreg.cxx b/xmloff/source/core/facreg.cxx index 99ca465e9956..0f3f84fb21e0 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 oasis export - SINGLEFACTORY( SchXMLExport_Oasis_Styles ) - else SINGLEFACTORY( SchXMLExport_Oasis_Content ) + SINGLEFACTORY( SchXMLExport_Oasis_Content ) // chart OOo export else SINGLEFACTORY( SchXMLExport ) diff --git a/xmloff/util/xo.component b/xmloff/util/xo.component index 5f78db088f04..a5953b44c4ab 100644 --- a/xmloff/util/xo.component +++ b/xmloff/util/xo.component @@ -36,7 +36,8 @@ constructor="com_sun_star_comp_Chart_XMLOasisMetaExporter_get_implementation"> <service name="com.sun.star.comp.Chart.XMLOasisMetaExporter"/> </implementation> - <implementation name="SchXMLExport.Oasis.Styles"> + <implementation name="SchXMLExport.Oasis.Styles" + constructor="com_sun_star_comp_Chart_XMLOasisStylesExporter_get_implementation"> <service name="com.sun.star.comp.Chart.XMLOasisStylesExporter"/> </implementation> <implementation name="SchXMLExport.Styles"> |