solenv/bin/native-code.py | 1 + xmloff/inc/facreg.hxx | 5 ----- xmloff/source/chart/SchXMLExport.cxx | 21 ++++++++------------- xmloff/source/core/facreg.cxx | 3 +-- xmloff/util/xo.component | 3 ++- 5 files changed, 12 insertions(+), 21 deletions(-)
New commits: commit 2ab7643aa652dcbcfe29be41bfd9c8502398dd42 Author: Miklos Vajna <vmik...@collabora.com> AuthorDate: Thu Apr 16 21:19:51 2020 +0200 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Fri Apr 17 08:41:32 2020 +0200 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 <vmik...@collabora.com> diff --git a/solenv/bin/native-code.py b/solenv/bin/native-code.py index b6f86d808537..01380fc3e4e6 100755 --- a/solenv/bin/native-code.py +++ b/solenv/bin/native-code.py @@ -329,6 +329,7 @@ core_constructor_list = [ "com_sun_star_comp_Chart_XMLOasisMetaExporter_get_implementation", "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_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 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"> _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits