summaryrefslogtreecommitdiff
path: root/xmlscript
diff options
context:
space:
mode:
authorYeliz Taneroğlu <yeliztaneroglu@gmail.com>2016-05-01 15:45:45 +0300
committerStephan Bergmann <sbergman@redhat.com>2016-05-02 09:56:10 +0000
commit955ca134fd62f809efdf1ce87c8646586871597a (patch)
tree67462ce9df7c1d822666e04ef612aa6ec86c85fa /xmlscript
parent6943396614bb223e05a9de36e7bbc955ed8e6492 (diff)
tdf#74608 Constructor function for XMLBasicImporter
Change-Id: I0a2c74c71d1633427598e793d7c211e5283c7a33 Reviewed-on: https://gerrit.libreoffice.org/24559 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'xmlscript')
-rw-r--r--xmlscript/source/inc/unoservices.hxx7
-rw-r--r--xmlscript/source/misc/unoservices.cxx5
-rw-r--r--xmlscript/source/xmlflat_imexp/xmlbas_import.cxx34
-rw-r--r--xmlscript/util/xmlscript.component3
4 files changed, 13 insertions, 36 deletions
diff --git a/xmlscript/source/inc/unoservices.hxx b/xmlscript/source/inc/unoservices.hxx
index bdeea6a3f0e0..5a8be08f23d2 100644
--- a/xmlscript/source/inc/unoservices.hxx
+++ b/xmlscript/source/inc/unoservices.hxx
@@ -50,13 +50,6 @@ OUString SAL_CALL getImplementationName_XMLBasicExporter();
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_XMLBasicImporter();
-
-OUString SAL_CALL getImplementationName_XMLBasicImporter();
-
-css::uno::Reference<css::uno::XInterface> SAL_CALL create_XMLBasicImporter(
- css::uno::Reference<css::uno::XComponentContext> const & xContext);
}
#endif
diff --git a/xmlscript/source/misc/unoservices.cxx b/xmlscript/source/misc/unoservices.cxx
index 204d4deb668f..0773fa49298d 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_XMLBasicImporter, getImplementationName_XMLBasicImporter,
- getSupportedServiceNames_XMLBasicImporter, ::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 35cdec0b9873..095267b98266 100644
--- a/xmlscript/source/xmlflat_imexp/xmlbas_import.cxx
+++ b/xmlscript/source/xmlflat_imexp/xmlbas_import.cxx
@@ -497,19 +497,6 @@ void BasicImport::setDocumentLocator( const Reference< xml::sax::XLocator >& /*x
return xElement;
}
- // component operations
-
- OUString getImplementationName_XMLBasicImporter()
- {
- return OUString( "com.sun.star.comp.xmlscript.XMLBasicImporter" );
- }
-
- Sequence< OUString > getSupportedServiceNames_XMLBasicImporter()
- {
- Sequence< OUString > aNames { "com.sun.star.document.XMLBasicImporter" };
- return aNames;
- }
-
// XMLBasicImporterBase
XMLBasicImporterBase::XMLBasicImporterBase( const Reference< XComponentContext >& rxContext, bool bOasis )
@@ -645,12 +632,13 @@ void BasicImport::setDocumentLocator( const Reference< xml::sax::XLocator >& /*x
OUString XMLBasicImporter::getImplementationName( ) throw (RuntimeException, std::exception)
{
- return getImplementationName_XMLBasicImporter();
+ return OUString( "com.sun.star.comp.xmlscript.XMLBasicImporter" );
}
Sequence< OUString > XMLBasicImporter::getSupportedServiceNames( ) throw (RuntimeException, std::exception)
{
- return getSupportedServiceNames_XMLBasicImporter();
+ Sequence< OUString > aNames { "com.sun.star.document.XMLBasicImporter" };
+ return aNames;
}
// XMLOasisBasicImporter
@@ -677,17 +665,17 @@ void BasicImport::setDocumentLocator( const Reference< xml::sax::XLocator >& /*x
return aNames;
}
- // component operations
-
- Reference< XInterface > SAL_CALL create_XMLBasicImporter(
- Reference< XComponentContext > const & xContext )
- {
- return static_cast< lang::XTypeProvider * >( new XMLBasicImporter( xContext ) );
- }
-
} // namespace xmlscript
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
+com_sun_star_comp_xmlscript_XMLBasicImporter(
+ css::uno::XComponentContext *context,
+ css::uno::Sequence<css::uno::Any> const &)
+{
+ return cppu::acquire(new xmlscript::XMLBasicImporter(context));
+}
+
+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 &)
diff --git a/xmlscript/util/xmlscript.component b/xmlscript/util/xmlscript.component
index e212b9bc2d6a..23748a0569d9 100644
--- a/xmlscript/util/xmlscript.component
+++ b/xmlscript/util/xmlscript.component
@@ -25,7 +25,8 @@
<implementation name="com.sun.star.comp.xmlscript.XMLBasicExporter">
<service name="com.sun.star.document.XMLBasicExporter"/>
</implementation>
- <implementation name="com.sun.star.comp.xmlscript.XMLBasicImporter">
+ <implementation name="com.sun.star.comp.xmlscript.XMLBasicImporter"
+ constructor="com_sun_star_comp_xmlscript_XMLBasicImporter">
<service name="com.sun.star.document.XMLBasicImporter"/>
</implementation>
<implementation name="com.sun.star.comp.xmlscript.XMLOasisBasicExporter"