diff options
author | Yeliz Taneroğlu <yeliztaneroglu@gmail.com> | 2016-04-30 15:56:22 +0300 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-05-02 08:35:19 +0000 |
commit | b8c04ea449750b39ab5dc64f91f74688fd9a4d3a (patch) | |
tree | 7c1120df61fc31e8cf7c63968cb3c45df52b6687 /xmlscript | |
parent | 7aa67d528b9f543fb61527cae7f0f487426cb414 (diff) |
tdf#74608 Constructor function for XMLOasisBasicExporter
Change-Id: If5409621f515918e715e3c0b71ec1b3d6fd1ef92
Reviewed-on: https://gerrit.libreoffice.org/24518
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'xmlscript')
-rw-r--r-- | xmlscript/source/inc/unoservices.hxx | 8 | ||||
-rw-r--r-- | xmlscript/source/misc/unoservices.cxx | 5 | ||||
-rw-r--r-- | xmlscript/source/xmlflat_imexp/xmlbas_export.cxx | 31 | ||||
-rw-r--r-- | xmlscript/util/xmlscript.component | 3 |
4 files changed, 14 insertions, 33 deletions
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 @@ -51,14 +51,6 @@ css::uno::Reference<css::uno::XInterface> SAL_CALL create_XMLBasicExporter( css::uno::Reference<css::uno::XComponentContext> const & xContext); css::uno::Sequence<OUString> SAL_CALL -getSupportedServiceNames_XMLOasisBasicExporter(); - -OUString SAL_CALL getImplementationName_XMLOasisBasicExporter(); - -css::uno::Reference<css::uno::XInterface> SAL_CALL create_XMLOasisBasicExporter( - css::uno::Reference<css::uno::XComponentContext> const & xContext); - -css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames_XMLBasicImporter(); OUString SAL_CALL getImplementationName_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 @@ -38,11 +38,6 @@ namespace xmlscript nullptr, 0 }, { - create_XMLOasisBasicExporter, getImplementationName_XMLOasisBasicExporter, - getSupportedServiceNames_XMLOasisBasicExporter, ::cppu::createSingleComponentFactory, - nullptr, 0 - }, - { create_XMLBasicImporter, getImplementationName_XMLBasicImporter, getSupportedServiceNames_XMLBasicImporter, ::cppu::createSingleComponentFactory, nullptr, 0 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<css::uno::Any> 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 @@ <implementation name="com.sun.star.comp.xmlscript.XMLBasicImporter"> <service name="com.sun.star.document.XMLBasicImporter"/> </implementation> - <implementation name="com.sun.star.comp.xmlscript.XMLOasisBasicExporter"> + <implementation name="com.sun.star.comp.xmlscript.XMLOasisBasicExporter" + constructor="com_sun_star_comp_xmlscript_XMLOasisBasicExporter"> <service name="com.sun.star.document.XMLOasisBasicExporter"/> </implementation> <implementation name="com.sun.star.comp.xmlscript.XMLOasisBasicImporter"> |