diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2020-03-19 21:30:52 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2020-03-20 09:12:12 +0100 |
commit | faddef755d5fe2a6937bbffa6633e3f8b6260c72 (patch) | |
tree | 55e44e63b6a755b814d0aa32fb53fdde04e0274e /xmloff | |
parent | ad4ee3bb3bf99c3b02ddca2318d39a1c0f2469a0 (diff) |
xmloff: create SchXMLExport_Oasis_Meta instances with an uno constructor
See tdf#74608 for motivation.
Change-Id: I7881850e264f421e72389cd51ad1e38e625fb334
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90766
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 | 16 | ||||
-rw-r--r-- | xmloff/source/core/facreg.cxx | 3 | ||||
-rw-r--r-- | xmloff/util/xo.component | 3 |
4 files changed, 8 insertions, 19 deletions
diff --git a/xmloff/inc/facreg.hxx b/xmloff/inc/facreg.hxx index 42a5f5c1b900..842689322022 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_Meta_getImplementationName() throw(); -css::uno::Sequence<OUString> SchXMLExport_Oasis_Meta_getSupportedServiceNames() throw(); -/// @throws css::uno::Exception -css::uno::Reference<css::uno::XInterface> SchXMLExport_Oasis_Meta_createInstance( - css::uno::Reference<css::lang::XMultiServiceFactory> const & rSMgr); OUString SchXMLExport_Oasis_Styles_getImplementationName() throw(); css::uno::Sequence<OUString> SchXMLExport_Oasis_Styles_getSupportedServiceNames() throw(); /// @throws css::uno::Exception diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx index a2716cfd6c1f..f438fc3abf0c 100644 --- a/xmloff/source/chart/SchXMLExport.cxx +++ b/xmloff/source/chart/SchXMLExport.cxx @@ -3845,19 +3845,13 @@ Reference< uno::XInterface > SchXMLExport_Oasis_Content_createInstance(const Ref } // Oasis format -Sequence< OUString > SchXMLExport_Oasis_Meta_getSupportedServiceNames() throw() -{ - return Sequence< OUString > { "com.sun.star.comp.Chart.XMLOasisMetaExporter" }; -} - -OUString SchXMLExport_Oasis_Meta_getImplementationName() throw() -{ - return "SchXMLExport.Oasis.Meta"; -} -Reference< uno::XInterface > SchXMLExport_Oasis_Meta_createInstance(const Reference< lang::XMultiServiceFactory > & rSMgr) +extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface* +com_sun_star_comp_Chart_XMLOasisMetaExporter_get_implementation( + uno::XComponentContext* pCtx, uno::Sequence<uno::Any> const& /*rSeq*/) { - return static_cast<cppu::OWeakObject*>(new SchXMLExport( comphelper::getComponentContext(rSMgr), SchXMLExport_Oasis_Meta_getImplementationName(), SvXMLExportFlags::META | SvXMLExportFlags::OASIS )); + return cppu::acquire(new SchXMLExport(pCtx, "SchXMLExport.Oasis.Meta", + SvXMLExportFlags::META | SvXMLExportFlags::OASIS)); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/core/facreg.cxx b/xmloff/source/core/facreg.cxx index 207ac7c1fd83..99ca465e9956 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_Meta ) - else SINGLEFACTORY( SchXMLExport_Oasis_Styles ) + SINGLEFACTORY( SchXMLExport_Oasis_Styles ) else SINGLEFACTORY( SchXMLExport_Oasis_Content ) // chart OOo export diff --git a/xmloff/util/xo.component b/xmloff/util/xo.component index 6597c3714e38..5f78db088f04 100644 --- a/xmloff/util/xo.component +++ b/xmloff/util/xo.component @@ -32,7 +32,8 @@ <implementation name="SchXMLExport.Oasis.Content"> <service name="com.sun.star.comp.Chart.XMLOasisContentExporter"/> </implementation> - <implementation name="SchXMLExport.Oasis.Meta"> + <implementation name="SchXMLExport.Oasis.Meta" + constructor="com_sun_star_comp_Chart_XMLOasisMetaExporter_get_implementation"> <service name="com.sun.star.comp.Chart.XMLOasisMetaExporter"/> </implementation> <implementation name="SchXMLExport.Oasis.Styles"> |