[Libreoffice-commits] core.git: solenv/bin xmloff/inc xmloff/source xmloff/util
Miklos Vajna (via logerrit)
logerrit at kemper.freedesktop.org
Fri May 29 06:42:31 UTC 2020
solenv/bin/native-code.py | 1 +
xmloff/inc/facreg.hxx | 7 -------
xmloff/source/core/facreg.cxx | 3 +--
xmloff/source/text/XMLAutoTextEventExport.cxx | 21 ++++++---------------
xmloff/util/xo.component | 3 ++-
5 files changed, 10 insertions(+), 25 deletions(-)
New commits:
commit c05d3f377054f5a7d4f4fb7bc23b0398d6b19347
Author: Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Thu May 28 21:06:17 2020 +0200
Commit: Miklos Vajna <vmiklos at collabora.com>
CommitDate: Fri May 29 08:41:58 2020 +0200
xmloff: create XMLAutoTextEventExport instances with an uno constructor
See tdf#74608 for motivation.
Change-Id: I068b45302d200ccbde082a748a110324bbbbbaec
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95065
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
diff --git a/solenv/bin/native-code.py b/solenv/bin/native-code.py
index d2165c197ac9..db44ea3c1a51 100755
--- a/solenv/bin/native-code.py
+++ b/solenv/bin/native-code.py
@@ -337,6 +337,7 @@ core_constructor_list = [
"com_sun_star_comp_Chart_XMLOasisStylesImporter_get_implementation",
"com_sun_star_comp_Chart_XMLOasisContentImporter_get_implementation",
"com_sun_star_comp_Chart_XMLOasisExporter_get_implementation",
+ "com_sun_star_comp_Writer_XMLOasisAutotextEventsExporter_get_implementation",
# xmlscript/util/xmlscript.component
"com_sun_star_comp_xmlscript_XMLBasicExporter",
"com_sun_star_comp_xmlscript_XMLOasisBasicExporter",
diff --git a/xmloff/inc/facreg.hxx b/xmloff/inc/facreg.hxx
index e810c5465831..82d5d3e73b59 100644
--- a/xmloff/inc/facreg.hxx
+++ b/xmloff/inc/facreg.hxx
@@ -31,13 +31,6 @@ namespace com::sun::star {
namespace uno { class XInterface; }
}
-// writer autotext event export
-OUString XMLAutoTextEventExport_getImplementationName() throw();
-css::uno::Sequence<OUString> XMLAutoTextEventExport_getSupportedServiceNames() throw();
-/// @throws css::uno::Exception
-css::uno::Reference<css::uno::XInterface> XMLAutoTextEventExport_createInstance(
- css::uno::Reference<css::lang::XMultiServiceFactory> const & rSMgr);
-
// writer autotext event import
OUString XMLAutoTextEventImport_getImplementationName() throw();
css::uno::Sequence<OUString> XMLAutoTextEventImport_getSupportedServiceNames() throw();
diff --git a/xmloff/source/core/facreg.cxx b/xmloff/source/core/facreg.cxx
index 52c719d30d48..377f05204c1a 100644
--- a/xmloff/source/core/facreg.cxx
+++ b/xmloff/source/core/facreg.cxx
@@ -55,8 +55,7 @@ XMLOFF_DLLPUBLIC void * xo_component_getFactory( const char * pImplName, void *
const sal_Int32 nImplNameLen = strlen( pImplName );
// auto text import/export
- SINGLEFACTORY( XMLAutoTextEventExport )
- else SINGLEFACTORY( XMLAutoTextEventImport )
+ SINGLEFACTORY( XMLAutoTextEventImport )
else SINGLEFACTORY( XMLAutoTextEventExportOOO )
if( xFactory.is())
diff --git a/xmloff/source/text/XMLAutoTextEventExport.cxx b/xmloff/source/text/XMLAutoTextEventExport.cxx
index 7ae9eb5ca742..e5e1b220cb1f 100644
--- a/xmloff/source/text/XMLAutoTextEventExport.cxx
+++ b/xmloff/source/text/XMLAutoTextEventExport.cxx
@@ -199,22 +199,13 @@ void XMLAutoTextEventExport::ExportContent_() {}
// methods to support the component registration
-Sequence< OUString > XMLAutoTextEventExport_getSupportedServiceNames()
- throw()
-{
- Sequence<OUString> aSeq { XMLAutoTextEventExport_getImplementationName() };
- return aSeq;
-}
-
-OUString XMLAutoTextEventExport_getImplementationName() throw()
-{
- return "com.sun.star.comp.Writer.XMLOasisAutotextEventsExporter";
-}
-
-Reference< XInterface > XMLAutoTextEventExport_createInstance(
- const Reference< XMultiServiceFactory > & rSMgr)
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
+com_sun_star_comp_Writer_XMLOasisAutotextEventsExporter_get_implementation(
+ css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const&)
{
- return static_cast<cppu::OWeakObject*>(new XMLAutoTextEventExport( comphelper::getComponentContext(rSMgr), XMLAutoTextEventExport_getImplementationName(), SvXMLExportFlags::ALL|SvXMLExportFlags::OASIS));
+ return cppu::acquire(new XMLAutoTextEventExport(
+ context, "com.sun.star.comp.Writer.XMLOasisAutotextEventsExporter",
+ SvXMLExportFlags::ALL | SvXMLExportFlags::OASIS));
}
// methods to support the component registration
diff --git a/xmloff/util/xo.component b/xmloff/util/xo.component
index 9942e90b6a65..0219cc5328ad 100644
--- a/xmloff/util/xo.component
+++ b/xmloff/util/xo.component
@@ -211,7 +211,8 @@
<service name="com.sun.star.comp.Writer.XMLAutotextEventsExporter"/>
</implementation>
<implementation
- name="com.sun.star.comp.Writer.XMLOasisAutotextEventsExporter">
+ name="com.sun.star.comp.Writer.XMLOasisAutotextEventsExporter"
+ constructor="com_sun_star_comp_Writer_XMLOasisAutotextEventsExporter_get_implementation">
<service name="com.sun.star.comp.Writer.XMLOasisAutotextEventsExporter"/>
</implementation>
<implementation
More information about the Libreoffice-commits
mailing list