summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2019-05-29 21:29:30 +0200
committerMiklos Vajna <vmiklos@collabora.com>2019-05-30 08:43:32 +0200
commit69236a7aa17da34399e4d204ddb659d67a51fbf4 (patch)
treed0f65bde2177ce336eafcbfcfcbab7ec3a0c5d95
parent6bb241ccc61c6904efec95978fa17e33c0eb1df3 (diff)
xmloff: create XMLDrawContentImportOasis instances with an uno constructor
Change-Id: I2d0bcc8d48ce0a4253b5deff11736b292e4f9e69 Reviewed-on: https://gerrit.libreoffice.org/73188 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
-rwxr-xr-xsolenv/bin/native-code.py1
-rw-r--r--xmloff/inc/facreg.hxx5
-rw-r--r--xmloff/source/core/facreg.cxx1
-rw-r--r--xmloff/source/draw/sdxmlimp.cxx11
-rw-r--r--xmloff/util/xo.component5
5 files changed, 15 insertions, 8 deletions
diff --git a/solenv/bin/native-code.py b/solenv/bin/native-code.py
index 405f98fd71d3..9545c5ef9108 100755
--- a/solenv/bin/native-code.py
+++ b/solenv/bin/native-code.py
@@ -264,6 +264,7 @@ core_constructor_list = [
"com_sun_star_comp_Impress_XMLOasisSettingsExporter_get_implementation",
"com_sun_star_comp_Draw_XMLOasisImporter_get_implementation",
"com_sun_star_comp_Draw_XMLOasisStylesImporter_get_implementation",
+ "com_sun_star_comp_Draw_XMLOasisContentImporter_get_implementation",
# xmlscript/util/xmlscript.component
"com_sun_star_comp_xmlscript_XMLBasicExporter",
"com_sun_star_comp_xmlscript_XMLBasicImporter",
diff --git a/xmloff/inc/facreg.hxx b/xmloff/inc/facreg.hxx
index feade0f8d5b3..d59e5d463e65 100644
--- a/xmloff/inc/facreg.hxx
+++ b/xmloff/inc/facreg.hxx
@@ -83,11 +83,6 @@ css::uno::Reference<css::uno::XInterface> XMLImpressSettingsExportOOO_createInst
css::uno::Reference<css::lang::XMultiServiceFactory> const & rSMgr);
// draw oasis import
-OUString XMLDrawContentImportOasis_getImplementationName() throw();
-css::uno::Sequence<OUString> XMLDrawContentImportOasis_getSupportedServiceNames() throw();
-/// @throws css::uno::Exception
-css::uno::Reference<css::uno::XInterface> XMLDrawContentImportOasis_createInstance(
- css::uno::Reference<css::lang::XMultiServiceFactory> const & rSMgr);
OUString XMLDrawMetaImportOasis_getImplementationName() throw();
css::uno::Sequence<OUString> XMLDrawMetaImportOasis_getSupportedServiceNames() throw();
/// @throws css::uno::Exception
diff --git a/xmloff/source/core/facreg.cxx b/xmloff/source/core/facreg.cxx
index 994bcbb67f3c..446dfadbed10 100644
--- a/xmloff/source/core/facreg.cxx
+++ b/xmloff/source/core/facreg.cxx
@@ -72,7 +72,6 @@ XMLOFF_DLLPUBLIC void * xo_component_getFactory( const sal_Char * pImplName, voi
else SINGLEFACTORY( XMLImpressSettingsExportOOO )
// draw oasis import
- else SINGLEFACTORY( XMLDrawContentImportOasis )
else SINGLEFACTORY( XMLDrawMetaImportOasis )
else SINGLEFACTORY( XMLDrawSettingsImportOasis )
diff --git a/xmloff/source/draw/sdxmlimp.cxx b/xmloff/source/draw/sdxmlimp.cxx
index 6871c537918f..ac40ce2c6b29 100644
--- a/xmloff/source/draw/sdxmlimp.cxx
+++ b/xmloff/source/draw/sdxmlimp.cxx
@@ -297,10 +297,19 @@ com_sun_star_comp_Draw_XMLOasisStylesImporter_get_implementation(uno::XComponent
| SvXMLImportFlags::MASTERSTYLES));
}
+extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
+com_sun_star_comp_Draw_XMLOasisContentImporter_get_implementation(
+ uno::XComponentContext* pCtx, uno::Sequence<uno::Any> const& /*rSeq*/)
+{
+ return cppu::acquire(new SdXMLImport(pCtx, "XMLDrawContentImportOasis", true,
+ SvXMLImportFlags::AUTOSTYLES | SvXMLImportFlags::CONTENT
+ | SvXMLImportFlags::SCRIPTS
+ | SvXMLImportFlags::FONTDECLS));
+}
+
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 )
-SERVICE( XMLDrawContentImportOasis, "com.sun.star.comp.Draw.XMLOasisContentImporter", "XMLImpressContentImportOasis", true, SvXMLImportFlags::AUTOSTYLES|SvXMLImportFlags::CONTENT|SvXMLImportFlags::SCRIPTS|SvXMLImportFlags::FONTDECLS )
SERVICE( XMLImpressMetaImportOasis, "com.sun.star.comp.Impress.XMLOasisMetaImporter", "XMLImpressMetaImportOasis", false, SvXMLImportFlags::META )
SERVICE( XMLDrawMetaImportOasis, "com.sun.star.comp.Draw.XMLOasisMetaImporter", "XMLImpressMetaImportOasis", true, SvXMLImportFlags::META )
diff --git a/xmloff/util/xo.component b/xmloff/util/xo.component
index b4e2fcdf645e..638270ae9c97 100644
--- a/xmloff/util/xo.component
+++ b/xmloff/util/xo.component
@@ -99,8 +99,11 @@
constructor="com_sun_star_comp_Impress_XMLOasisContentExporter_get_implementation">
<service name="com.sun.star.comp.Impress.XMLOasisContentExporter"/>
</implementation>
- <implementation name="XMLImpressContentImportOasis">
+ <implementation name="XMLDrawContentImportOasis"
+ constructor="com_sun_star_comp_Draw_XMLOasisContentImporter_get_implementation">
<service name="com.sun.star.comp.Draw.XMLOasisContentImporter"/>
+ </implementation>
+ <implementation name="XMLImpressContentImportOasis">
<service name="com.sun.star.comp.Impress.XMLOasisContentImporter"/>
</implementation>
<implementation name="XMLImpressExportOOO">