From b8c04ea449750b39ab5dc64f91f74688fd9a4d3a Mon Sep 17 00:00:00 2001 From: Yeliz Taneroğlu Date: Sat, 30 Apr 2016 15:56:22 +0300 Subject: tdf#74608 Constructor function for XMLOasisBasicExporter Change-Id: If5409621f515918e715e3c0b71ec1b3d6fd1ef92 Reviewed-on: https://gerrit.libreoffice.org/24518 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- xmlscript/source/inc/unoservices.hxx | 8 ------ xmlscript/source/misc/unoservices.cxx | 5 ---- xmlscript/source/xmlflat_imexp/xmlbas_export.cxx | 31 +++++++++--------------- xmlscript/util/xmlscript.component | 3 ++- 4 files changed, 14 insertions(+), 33 deletions(-) (limited to 'xmlscript') diff --git a/xmlscript/source/inc/unoservices.hxx b/xmlscript/source/inc/unoservices.hxx index 6ac388af218e..61e10d9e5b22 100644 --- a/xmlscript/source/inc/unoservices.hxx +++ b/xmlscript/source/inc/unoservices.hxx @@ -50,14 +50,6 @@ OUString SAL_CALL getImplementationName_XMLBasicExporter(); css::uno::Reference SAL_CALL create_XMLBasicExporter( css::uno::Reference const & xContext); -css::uno::Sequence SAL_CALL -getSupportedServiceNames_XMLOasisBasicExporter(); - -OUString SAL_CALL getImplementationName_XMLOasisBasicExporter(); - -css::uno::Reference SAL_CALL create_XMLOasisBasicExporter( - css::uno::Reference const & xContext); - css::uno::Sequence SAL_CALL getSupportedServiceNames_XMLBasicImporter(); diff --git a/xmlscript/source/misc/unoservices.cxx b/xmlscript/source/misc/unoservices.cxx index 8d89cef7e758..87eb33e401ea 100644 --- a/xmlscript/source/misc/unoservices.cxx +++ b/xmlscript/source/misc/unoservices.cxx @@ -37,11 +37,6 @@ namespace xmlscript getSupportedServiceNames_XMLBasicExporter, ::cppu::createSingleComponentFactory, nullptr, 0 }, - { - create_XMLOasisBasicExporter, getImplementationName_XMLOasisBasicExporter, - getSupportedServiceNames_XMLOasisBasicExporter, ::cppu::createSingleComponentFactory, - nullptr, 0 - }, { create_XMLBasicImporter, getImplementationName_XMLBasicImporter, getSupportedServiceNames_XMLBasicImporter, ::cppu::createSingleComponentFactory, diff --git a/xmlscript/source/xmlflat_imexp/xmlbas_export.cxx b/xmlscript/source/xmlflat_imexp/xmlbas_export.cxx index 4f6c49ef28c9..42506440a79a 100644 --- a/xmlscript/source/xmlflat_imexp/xmlbas_export.cxx +++ b/xmlscript/source/xmlflat_imexp/xmlbas_export.cxx @@ -52,17 +52,6 @@ namespace xmlscript return aNames; } - OUString getImplementationName_XMLOasisBasicExporter() - { - return OUString( "com.sun.star.comp.xmlscript.XMLOasisBasicExporter" ); - } - - Sequence< OUString > getSupportedServiceNames_XMLOasisBasicExporter() - { - Sequence< OUString > aNames { "com.sun.star.document.XMLOasisBasicExporter" }; - return aNames; - } - // XMLBasicExporterBase XMLBasicExporterBase::XMLBasicExporterBase( bool bOasis ) @@ -399,12 +388,13 @@ sal_Bool XMLBasicExporterBase::filter( const Sequence< beans::PropertyValue >& / OUString XMLOasisBasicExporter::getImplementationName( ) throw (RuntimeException, std::exception) { - return getImplementationName_XMLOasisBasicExporter(); + return OUString( "com.sun.star.comp.xmlscript.XMLOasisBasicExporter" ); } Sequence< OUString > XMLOasisBasicExporter::getSupportedServiceNames( ) throw (RuntimeException, std::exception) { - return getSupportedServiceNames_XMLOasisBasicExporter(); + Sequence< OUString > aNames { "com.sun.star.document.XMLOasisBasicExporter" }; + return aNames; } // component operations @@ -415,12 +405,15 @@ sal_Bool XMLBasicExporterBase::filter( const Sequence< beans::PropertyValue >& / return static_cast< lang::XTypeProvider * >( new XMLBasicExporter ); } - Reference< XInterface > SAL_CALL create_XMLOasisBasicExporter( - Reference< XComponentContext > const & ) - { - return static_cast< lang::XTypeProvider * >( new XMLOasisBasicExporter ); - } - } // namespace xmlscript +extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL +com_sun_star_comp_xmlscript_XMLOasisBasicExporter( + css::uno::XComponentContext *, + css::uno::Sequence const &) +{ + + return cppu::acquire(new xmlscript::XMLOasisBasicExporter()); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmlscript/util/xmlscript.component b/xmlscript/util/xmlscript.component index 79b518a742e3..298d8745374a 100644 --- a/xmlscript/util/xmlscript.component +++ b/xmlscript/util/xmlscript.component @@ -28,7 +28,8 @@ - + -- cgit