[Libreoffice-commits] core.git: solenv/bin sw/source sw/util
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri Oct 5 08:28:16 UTC 2018
solenv/bin/native-code.py | 4 +++-
sw/source/filter/ww8/docxexportfilter.cxx | 5 -----
sw/source/filter/ww8/rtfexportfilter.cxx | 14 ++++----------
sw/source/filter/ww8/rtfexportfilter.hxx | 8 --------
sw/util/msword.component | 3 ++-
5 files changed, 9 insertions(+), 25 deletions(-)
New commits:
commit 63a29bd44dfd6d5e58e4111c2e1562d1ee6ee6d0
Author: Miklos Vajna <vmiklos at collabora.co.uk>
AuthorDate: Thu Oct 4 21:56:07 2018 +0200
Commit: Miklos Vajna <vmiklos at collabora.co.uk>
CommitDate: Fri Oct 5 10:27:44 2018 +0200
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 at collabora.co.uk>
diff --git a/solenv/bin/native-code.py b/solenv/bin/native-code.py
index 01dc164c37ed..d0d236e9bc93 100755
--- a/solenv/bin/native-code.py
+++ b/solenv/bin/native-code.py
@@ -256,7 +256,9 @@ core_constructor_list = [
"com_sun_star_comp_oox_FormatDetector_get_implementation",
"com_sun_star_comp_oox_docprop_DocumentPropertiesImporter_get_implementation",
"com_sun_star_comp_oox_ppt_PowerPointImport_get_implementation",
- "com_sun_star_comp_oox_ShapeContextHandler_get_implementation"
+ "com_sun_star_comp_oox_ShapeContextHandler_get_implementation",
+# sw/util/msword.component
+ "com_sun_star_comp_Writer_RtfExport_get_implementation",
]
# edit group for apps, where you can edit documents
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">
More information about the Libreoffice-commits
mailing list