diff options
author | Yeliz Taneroğlu <yeliztaneroglu@gmail.com> | 2016-05-01 13:33:41 +0300 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-05-02 08:37:09 +0000 |
commit | 2dc8f1b25c157a597905fb33f1527244baf977f3 (patch) | |
tree | 36caff0528366e271fb8fb88ac66e8bc8003ba6d /xmlscript/source | |
parent | b8c04ea449750b39ab5dc64f91f74688fd9a4d3a (diff) |
tdf#74608 Constructor function for XMLOasisBasicImporter
Change-Id: Iec1c875f6aa34c37ac26a5dac008db547e8965ca
Reviewed-on: https://gerrit.libreoffice.org/24551
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'xmlscript/source')
-rw-r--r-- | xmlscript/source/inc/unoservices.hxx | 9 | ||||
-rw-r--r-- | xmlscript/source/misc/unoservices.cxx | 5 | ||||
-rw-r--r-- | xmlscript/source/xmlflat_imexp/xmlbas_import.cxx | 30 |
3 files changed, 11 insertions, 33 deletions
diff --git a/xmlscript/source/inc/unoservices.hxx b/xmlscript/source/inc/unoservices.hxx index 61e10d9e5b22..bdeea6a3f0e0 100644 --- a/xmlscript/source/inc/unoservices.hxx +++ b/xmlscript/source/inc/unoservices.hxx @@ -57,15 +57,6 @@ OUString SAL_CALL getImplementationName_XMLBasicImporter(); css::uno::Reference<css::uno::XInterface> SAL_CALL create_XMLBasicImporter( css::uno::Reference<css::uno::XComponentContext> const & xContext); - -css::uno::Sequence<OUString> SAL_CALL -getSupportedServiceNames_XMLOasisBasicImporter(); - -OUString SAL_CALL getImplementationName_XMLOasisBasicImporter(); - -css::uno::Reference<css::uno::XInterface> SAL_CALL create_XMLOasisBasicImporter( - css::uno::Reference<css::uno::XComponentContext> const & xContext); - } #endif diff --git a/xmlscript/source/misc/unoservices.cxx b/xmlscript/source/misc/unoservices.cxx index 87eb33e401ea..204d4deb668f 100644 --- a/xmlscript/source/misc/unoservices.cxx +++ b/xmlscript/source/misc/unoservices.cxx @@ -42,11 +42,6 @@ namespace xmlscript getSupportedServiceNames_XMLBasicImporter, ::cppu::createSingleComponentFactory, nullptr, 0 }, - { - create_XMLOasisBasicImporter, getImplementationName_XMLOasisBasicImporter, - getSupportedServiceNames_XMLOasisBasicImporter, ::cppu::createSingleComponentFactory, - nullptr, 0 - }, { nullptr, nullptr, nullptr, nullptr, nullptr, 0 } }; } diff --git a/xmlscript/source/xmlflat_imexp/xmlbas_import.cxx b/xmlscript/source/xmlflat_imexp/xmlbas_import.cxx index 81d7cbdfa6e3..35cdec0b9873 100644 --- a/xmlscript/source/xmlflat_imexp/xmlbas_import.cxx +++ b/xmlscript/source/xmlflat_imexp/xmlbas_import.cxx @@ -510,17 +510,6 @@ void BasicImport::setDocumentLocator( const Reference< xml::sax::XLocator >& /*x return aNames; } - OUString getImplementationName_XMLOasisBasicImporter() - { - return OUString( "com.sun.star.comp.xmlscript.XMLOasisBasicImporter" ); - } - - Sequence< OUString > getSupportedServiceNames_XMLOasisBasicImporter() - { - Sequence< OUString > aNames { "com.sun.star.document.XMLOasisBasicImporter" }; - return aNames; - } - // XMLBasicImporterBase XMLBasicImporterBase::XMLBasicImporterBase( const Reference< XComponentContext >& rxContext, bool bOasis ) @@ -679,12 +668,13 @@ void BasicImport::setDocumentLocator( const Reference< xml::sax::XLocator >& /*x OUString XMLOasisBasicImporter::getImplementationName( ) throw (RuntimeException, std::exception) { - return getImplementationName_XMLOasisBasicImporter(); + return OUString( "com.sun.star.comp.xmlscript.XMLOasisBasicImporter" ); } Sequence< OUString > XMLOasisBasicImporter::getSupportedServiceNames( ) throw (RuntimeException, std::exception) { - return getSupportedServiceNames_XMLOasisBasicImporter(); + Sequence< OUString > aNames { "com.sun.star.document.XMLOasisBasicImporter" }; + return aNames; } // component operations @@ -695,12 +685,14 @@ void BasicImport::setDocumentLocator( const Reference< xml::sax::XLocator >& /*x return static_cast< lang::XTypeProvider * >( new XMLBasicImporter( xContext ) ); } - Reference< XInterface > SAL_CALL create_XMLOasisBasicImporter( - Reference< XComponentContext > const & xContext ) - { - return static_cast< lang::XTypeProvider * >( new XMLOasisBasicImporter( xContext ) ); - } - } // namespace xmlscript +extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL +com_sun_star_comp_xmlscript_XMLOasisBasicImporter( + css::uno::XComponentContext *context, + css::uno::Sequence<css::uno::Any> const &) +{ + return cppu::acquire(new xmlscript::XMLOasisBasicImporter(context)); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |