summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2020-06-04 21:13:51 +0200
committerMiklos Vajna <vmiklos@collabora.com>2020-06-05 09:11:05 +0200
commitc4bdc37e1a3cc6dea7688057bb33f56c2d6742c3 (patch)
treea35b95818fcdf772504893e81b52743789eef7f1 /xmloff
parent9e07acf3a9b0c9f82734c7bb23e82f7684522f13 (diff)
xmloff: create XMLAutoTextEventImport instances with an uno constructor
See tdf#74608 for motivation. Change-Id: I24f64c9ebc2c86a574f3a76f1e739f61bc458dc7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95536 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/inc/facreg.hxx7
-rw-r--r--xmloff/source/core/facreg.cxx5
-rw-r--r--xmloff/source/text/XMLAutoTextEventImport.cxx21
-rw-r--r--xmloff/util/xo.component3
4 files changed, 8 insertions, 28 deletions
diff --git a/xmloff/inc/facreg.hxx b/xmloff/inc/facreg.hxx
index 82d5d3e73b59..2a98fb344721 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 import
-OUString XMLAutoTextEventImport_getImplementationName() throw();
-css::uno::Sequence<OUString> XMLAutoTextEventImport_getSupportedServiceNames() throw();
-/// @throws css::uno::Exception
-css::uno::Reference<css::uno::XInterface> XMLAutoTextEventImport_createInstance(
- css::uno::Reference<css::lang::XMultiServiceFactory> const & rSMgr);
-
// writer autotext event export OOo
OUString XMLAutoTextEventExportOOO_getImplementationName() throw();
css::uno::Sequence<OUString> XMLAutoTextEventExportOOO_getSupportedServiceNames() throw();
diff --git a/xmloff/source/core/facreg.cxx b/xmloff/source/core/facreg.cxx
index 377f05204c1a..cdc52d6c6a6e 100644
--- a/xmloff/source/core/facreg.cxx
+++ b/xmloff/source/core/facreg.cxx
@@ -54,9 +54,8 @@ XMLOFF_DLLPUBLIC void * xo_component_getFactory( const char * pImplName, void *
const sal_Int32 nImplNameLen = strlen( pImplName );
- // auto text import/export
- SINGLEFACTORY( XMLAutoTextEventImport )
- else SINGLEFACTORY( XMLAutoTextEventExportOOO )
+ // auto text export
+ SINGLEFACTORY( XMLAutoTextEventExportOOO )
if( xFactory.is())
{
diff --git a/xmloff/source/text/XMLAutoTextEventImport.cxx b/xmloff/source/text/XMLAutoTextEventImport.cxx
index 9f74c41ce1b1..bf6b9af0118d 100644
--- a/xmloff/source/text/XMLAutoTextEventImport.cxx
+++ b/xmloff/source/text/XMLAutoTextEventImport.cxx
@@ -91,24 +91,11 @@ SvXMLImportContext* XMLAutoTextEventImport::CreateFastContext(
return nullptr;
}
-
-Sequence< OUString >
- XMLAutoTextEventImport_getSupportedServiceNames()
- throw()
-{
- Sequence<OUString> aSeq { XMLAutoTextEventImport_getImplementationName() };
- return aSeq;
-}
-
-OUString XMLAutoTextEventImport_getImplementationName() throw()
-{
- return "com.sun.star.comp.Writer.XMLOasisAutotextEventsImporter";
-}
-
-Reference< XInterface > XMLAutoTextEventImport_createInstance(
- const Reference< XMultiServiceFactory > & rSMgr)
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
+com_sun_star_comp_Writer_XMLOasisAutotextEventsImporter_get_implementation(
+ css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const&)
{
- return static_cast<cppu::OWeakObject*>(new XMLAutoTextEventImport( comphelper::getComponentContext(rSMgr) ));
+ return cppu::acquire(new XMLAutoTextEventImport(context));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/util/xo.component b/xmloff/util/xo.component
index 0219cc5328ad..2e43c129673d 100644
--- a/xmloff/util/xo.component
+++ b/xmloff/util/xo.component
@@ -216,7 +216,8 @@
<service name="com.sun.star.comp.Writer.XMLOasisAutotextEventsExporter"/>
</implementation>
<implementation
- name="com.sun.star.comp.Writer.XMLOasisAutotextEventsImporter">
+ name="com.sun.star.comp.Writer.XMLOasisAutotextEventsImporter"
+ constructor="com_sun_star_comp_Writer_XMLOasisAutotextEventsImporter_get_implementation">
<service name="com.sun.star.comp.Writer.XMLOasisAutotextEventsImporter"/>
</implementation>
<implementation name="xmloff::AnimationsImport"