summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2019-07-17 21:34:58 +0200
committerMiklos Vajna <vmiklos@collabora.com>2019-07-18 09:08:05 +0200
commit955871e42d79903205cb0eeb7d82c6bb4d397ec1 (patch)
tree28c33cede292e5afa6dec63b3a24618b34800272 /xmloff
parent2a6d510b5bb1503ae12e5ccc921b0ab7032c8e65 (diff)
xmloff: create XMLImportContentImportOasis instances with an uno constructor
See tdf#74608 for motivation. Change-Id: I3b52830ece6fae82af1bc57eb93e3a9ad1eb2aff Reviewed-on: https://gerrit.libreoffice.org/75809 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/inc/facreg.hxx5
-rw-r--r--xmloff/source/core/facreg.cxx1
-rw-r--r--xmloff/source/draw/sdxmlimp.cxx10
-rw-r--r--xmloff/util/xo.component3
4 files changed, 11 insertions, 8 deletions
diff --git a/xmloff/inc/facreg.hxx b/xmloff/inc/facreg.hxx
index d9694e6fc276..8541b7842b17 100644
--- a/xmloff/inc/facreg.hxx
+++ b/xmloff/inc/facreg.hxx
@@ -39,11 +39,6 @@ css::uno::Sequence<OUString> XMLImpressStylesImportOasis_getSupportedServiceName
/// @throws css::uno::Exception
css::uno::Reference<css::uno::XInterface> XMLImpressStylesImportOasis_createInstance(
css::uno::Reference<css::lang::XMultiServiceFactory> const & rSMgr);
-OUString XMLImpressContentImportOasis_getImplementationName() throw();
-css::uno::Sequence<OUString> XMLImpressContentImportOasis_getSupportedServiceNames() throw();
-/// @throws css::uno::Exception
-css::uno::Reference<css::uno::XInterface> XMLImpressContentImportOasis_createInstance(
- css::uno::Reference<css::lang::XMultiServiceFactory> const & rSMgr);
// impress OOo export
OUString XMLImpressExportOOO_getImplementationName() throw();
diff --git a/xmloff/source/core/facreg.cxx b/xmloff/source/core/facreg.cxx
index 8a96b89b29e1..cba072106f97 100644
--- a/xmloff/source/core/facreg.cxx
+++ b/xmloff/source/core/facreg.cxx
@@ -58,7 +58,6 @@ XMLOFF_DLLPUBLIC void * xo_component_getFactory( const sal_Char * pImplName, voi
// impress oasis import
SINGLEFACTORY( XMLImpressStylesImportOasis )
- else SINGLEFACTORY( XMLImpressContentImportOasis )
else SINGLEFACTORY( AnimationsImport )
diff --git a/xmloff/source/draw/sdxmlimp.cxx b/xmloff/source/draw/sdxmlimp.cxx
index cf5616505789..98f23ab34b74 100644
--- a/xmloff/source/draw/sdxmlimp.cxx
+++ b/xmloff/source/draw/sdxmlimp.cxx
@@ -326,7 +326,15 @@ com_sun_star_comp_Draw_XMLOasisSettingsImporter_get_implementation(
SERVICE( XMLImpressStylesImportOasis, "com.sun.star.comp.Impress.XMLOasisStylesImporter", "XMLImpressStylesImportOasis", false, SvXMLImportFlags::STYLES|SvXMLImportFlags::AUTOSTYLES|SvXMLImportFlags::MASTERSTYLES )
-SERVICE( XMLImpressContentImportOasis, "com.sun.star.comp.Impress.XMLOasisContentImporter", "XMLImpressContentImportOasis", false, SvXMLImportFlags::AUTOSTYLES|SvXMLImportFlags::CONTENT|SvXMLImportFlags::SCRIPTS|SvXMLImportFlags::FONTDECLS )
+extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
+com_sun_star_comp_Impress_XMLOasisContentImporter_get_implementation(
+ uno::XComponentContext* pCtx, uno::Sequence<uno::Any> const& /*rSeq*/)
+{
+ return cppu::acquire(new SdXMLImport(pCtx, "XMLImpressContentImportOasis", false,
+ SvXMLImportFlags::AUTOSTYLES | SvXMLImportFlags::CONTENT
+ | SvXMLImportFlags::SCRIPTS
+ | SvXMLImportFlags::FONTDECLS));
+}
extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
com_sun_star_comp_Impress_XMLOasisMetaImporter_get_implementation(
diff --git a/xmloff/util/xo.component b/xmloff/util/xo.component
index 72718cf09bf3..abf03a6e9dfc 100644
--- a/xmloff/util/xo.component
+++ b/xmloff/util/xo.component
@@ -103,7 +103,8 @@
constructor="com_sun_star_comp_Draw_XMLOasisContentImporter_get_implementation">
<service name="com.sun.star.comp.Draw.XMLOasisContentImporter"/>
</implementation>
- <implementation name="XMLImpressContentImportOasis">
+ <implementation name="XMLImpressContentImportOasis"
+ constructor="com_sun_star_comp_Impress_XMLOasisContentImporter_get_implementation">
<service name="com.sun.star.comp.Impress.XMLOasisContentImporter"/>
</implementation>
<implementation name="XMLImpressExportOOO">