summaryrefslogtreecommitdiff
path: root/xmlscript
diff options
context:
space:
mode:
authorYeliz Taneroğlu <yeliztaneroglu@gmail.com>2016-05-01 13:46:53 +0300
committerStephan Bergmann <sbergman@redhat.com>2016-05-02 09:56:22 +0000
commitd46bfe13675735caf6d7fbf11ed2d1f5d30a49cd (patch)
tree8975dee375acc65791b226d100d52161deffe15c /xmlscript
parent955ca134fd62f809efdf1ce87c8646586871597a (diff)
tdf#74608 Constructor function for XMLBasicExporter
Change-Id: Ib4721b3f67956a8da48851841ef86bb7b79df1e7 Reviewed-on: https://gerrit.libreoffice.org/24553 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'xmlscript')
-rw-r--r--xmlscript/source/inc/unoservices.hxx8
-rw-r--r--xmlscript/source/misc/unoservices.cxx5
-rw-r--r--xmlscript/source/xmlflat_imexp/xmlbas_export.cxx35
-rw-r--r--xmlscript/util/xmlscript.component3
4 files changed, 13 insertions, 38 deletions
diff --git a/xmlscript/source/inc/unoservices.hxx b/xmlscript/source/inc/unoservices.hxx
index 5a8be08f23d2..de330a74ad3e 100644
--- a/xmlscript/source/inc/unoservices.hxx
+++ b/xmlscript/source/inc/unoservices.hxx
@@ -42,14 +42,6 @@ OUString SAL_CALL getImplementationName_DocumentHandlerImpl();
css::uno::Reference<css::uno::XInterface> SAL_CALL create_DocumentHandlerImpl(
css::uno::Reference<css::uno::XComponentContext> const & xContext);
-css::uno::Sequence<OUString> SAL_CALL
-getSupportedServiceNames_XMLBasicExporter();
-
-OUString SAL_CALL getImplementationName_XMLBasicExporter();
-
-css::uno::Reference<css::uno::XInterface> SAL_CALL create_XMLBasicExporter(
- css::uno::Reference<css::uno::XComponentContext> const & xContext);
-
}
#endif
diff --git a/xmlscript/source/misc/unoservices.cxx b/xmlscript/source/misc/unoservices.cxx
index 0773fa49298d..00ca4d074b93 100644
--- a/xmlscript/source/misc/unoservices.cxx
+++ b/xmlscript/source/misc/unoservices.cxx
@@ -32,11 +32,6 @@ namespace xmlscript
getSupportedServiceNames_DocumentHandlerImpl, ::cppu::createSingleComponentFactory,
nullptr, 0
},
- {
- create_XMLBasicExporter, getImplementationName_XMLBasicExporter,
- getSupportedServiceNames_XMLBasicExporter, ::cppu::createSingleComponentFactory,
- nullptr, 0
- },
{ nullptr, nullptr, nullptr, nullptr, nullptr, 0 }
};
}
diff --git a/xmlscript/source/xmlflat_imexp/xmlbas_export.cxx b/xmlscript/source/xmlflat_imexp/xmlbas_export.cxx
index 42506440a79a..c6fa807f1208 100644
--- a/xmlscript/source/xmlflat_imexp/xmlbas_export.cxx
+++ b/xmlscript/source/xmlflat_imexp/xmlbas_export.cxx
@@ -38,20 +38,6 @@ using namespace ::com::sun::star::uno;
namespace xmlscript
{
-
- // component operations
-
- OUString getImplementationName_XMLBasicExporter()
- {
- return OUString( "com.sun.star.comp.xmlscript.XMLBasicExporter" );
- }
-
- Sequence< OUString > getSupportedServiceNames_XMLBasicExporter()
- {
- Sequence< OUString > aNames { "com.sun.star.document.XMLBasicExporter" };
- return aNames;
- }
-
// XMLBasicExporterBase
XMLBasicExporterBase::XMLBasicExporterBase( bool bOasis )
@@ -365,12 +351,13 @@ sal_Bool XMLBasicExporterBase::filter( const Sequence< beans::PropertyValue >& /
OUString XMLBasicExporter::getImplementationName( ) throw (RuntimeException, std::exception)
{
- return getImplementationName_XMLBasicExporter();
+ return OUString( "com.sun.star.comp.xmlscript.XMLBasicExporter" );
}
Sequence< OUString > XMLBasicExporter::getSupportedServiceNames( ) throw (RuntimeException, std::exception)
{
- return getSupportedServiceNames_XMLBasicExporter();
+ Sequence< OUString > aNames { "com.sun.star.document.XMLBasicExporter" };
+ return aNames;
}
// XMLOasisBasicExporter
@@ -397,17 +384,17 @@ sal_Bool XMLBasicExporterBase::filter( const Sequence< beans::PropertyValue >& /
return aNames;
}
- // component operations
-
- Reference< XInterface > SAL_CALL create_XMLBasicExporter(
- Reference< XComponentContext > const & )
- {
- return static_cast< lang::XTypeProvider * >( new XMLBasicExporter );
- }
-
} // namespace xmlscript
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
+com_sun_star_comp_xmlscript_XMLBasicExporter(
+ css::uno::XComponentContext *,
+ css::uno::Sequence<css::uno::Any> const &)
+{
+ return cppu::acquire(new xmlscript::XMLBasicExporter());
+}
+
+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 &)
diff --git a/xmlscript/util/xmlscript.component b/xmlscript/util/xmlscript.component
index 23748a0569d9..a9bfffb15438 100644
--- a/xmlscript/util/xmlscript.component
+++ b/xmlscript/util/xmlscript.component
@@ -22,7 +22,8 @@
<implementation name="com.sun.star.comp.xml.input.SaxDocumentHandler">
<service name="com.sun.star.xml.input.SaxDocumentHandler"/>
</implementation>
- <implementation name="com.sun.star.comp.xmlscript.XMLBasicExporter">
+ <implementation name="com.sun.star.comp.xmlscript.XMLBasicExporter"
+ constructor="com_sun_star_comp_xmlscript_XMLBasicExporter">
<service name="com.sun.star.document.XMLBasicExporter"/>
</implementation>
<implementation name="com.sun.star.comp.xmlscript.XMLBasicImporter"