summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2018-10-04 21:56:07 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2018-10-05 10:27:44 +0200
commit63a29bd44dfd6d5e58e4111c2e1562d1ee6ee6d0 (patch)
tree42573b2fec778a10e891b87ed822116a32a21518 /sw
parent4018508f7a3fbcf811fa337188ef530e30e2114e (diff)
sw: create RtfExport instances with an uno constructor
Change-Id: I08cbfa2b9ccc7bc1c5d1ebeb9e06238472b2fa26 Reviewed-on: https://gerrit.libreoffice.org/61393 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/filter/ww8/docxexportfilter.cxx5
-rw-r--r--sw/source/filter/ww8/rtfexportfilter.cxx14
-rw-r--r--sw/source/filter/ww8/rtfexportfilter.hxx8
-rw-r--r--sw/util/msword.component3
4 files changed, 6 insertions, 24 deletions
diff --git a/sw/source/filter/ww8/docxexportfilter.cxx b/sw/source/filter/ww8/docxexportfilter.cxx
index 92ec0d103da9..208f60bb0ec1 100644
--- a/sw/source/filter/ww8/docxexportfilter.cxx
+++ b/sw/source/filter/ww8/docxexportfilter.cxx
@@ -129,11 +129,6 @@ extern "C"
DocxExport_getSupportedServiceNames, ::cppu::createSingleComponentFactory,
nullptr, 0
},
- {
- RtfExport_createInstance, RtfExport_getImplementationName,
- RtfExport_getSupportedServiceNames, ::cppu::createSingleComponentFactory,
- nullptr, 0
- },
{ nullptr, nullptr, nullptr, nullptr, nullptr, 0 }
};
diff --git a/sw/source/filter/ww8/rtfexportfilter.cxx b/sw/source/filter/ww8/rtfexportfilter.cxx
index 292e3e3d1e0d..a1f93980c3e0 100644
--- a/sw/source/filter/ww8/rtfexportfilter.cxx
+++ b/sw/source/filter/ww8/rtfexportfilter.cxx
@@ -96,17 +96,11 @@ void RtfExportFilter::setSourceDocument(const uno::Reference<lang::XComponent>&
// UNO helpers
-OUString RtfExport_getImplementationName() { return OUString(IMPL_NAME_RTFEXPORT); }
-
-uno::Sequence<OUString> RtfExport_getSupportedServiceNames() noexcept
-{
- return uno::Sequence<OUString>{ "com.sun.star.document.ExportFilter" };
-}
-
-uno::Reference<uno::XInterface>
-RtfExport_createInstance(const uno::Reference<uno::XComponentContext>& xCtx)
+extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
+com_sun_star_comp_Writer_RtfExport_get_implementation(uno::XComponentContext* pCtx,
+ uno::Sequence<uno::Any> const& /*rSeq*/)
{
- return static_cast<cppu::OWeakObject*>(new RtfExportFilter(xCtx));
+ return cppu::acquire(new RtfExportFilter(pCtx));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/rtfexportfilter.hxx b/sw/source/filter/ww8/rtfexportfilter.hxx
index 56172b107037..34cf5985c34b 100644
--- a/sw/source/filter/ww8/rtfexportfilter.hxx
+++ b/sw/source/filter/ww8/rtfexportfilter.hxx
@@ -69,14 +69,6 @@ public:
RtfWriter m_aWriter;
};
-OUString RtfExport_getImplementationName();
-css::uno::Sequence<OUString> RtfExport_getSupportedServiceNames() noexcept;
-/// @throws css::uno::Exception
-css::uno::Reference<css::uno::XInterface>
-RtfExport_createInstance(const css::uno::Reference<css::uno::XComponentContext>& xCtx);
-
-#define IMPL_NAME_RTFEXPORT "com.sun.star.comp.Writer.RtfExport"
-
#endif // INCLUDED_SW_SOURCE_FILTER_WW8_RTFEXPORTFILTER_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/util/msword.component b/sw/util/msword.component
index 5ae40de08869..2d07b1a52a7b 100644
--- a/sw/util/msword.component
+++ b/sw/util/msword.component
@@ -18,7 +18,8 @@
-->
<component loader="com.sun.star.loader.SharedLibrary" environment="@CPPU_ENV@"
prefix="msword" xmlns="http://openoffice.org/2010/uno-components">
- <implementation name="com.sun.star.comp.Writer.RtfExport">
+ <implementation name="com.sun.star.comp.Writer.RtfExport"
+ constructor="com_sun_star_comp_Writer_RtfExport_get_implementation">
<service name="com.sun.star.comp.Writer.RtfExport"/>
</implementation>
<implementation name="com.sun.star.comp.Writer.DocxExport">