summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2019-09-19 20:51:14 +0200
committerMiklos Vajna <vmiklos@collabora.com>2019-09-20 10:08:28 +0200
commit3aff00ea2ff704547a4d9fa6e2bb2141eb57bf1d (patch)
treee0ce8740888594e7a974ae1aebce0bf59e01228b /xmloff
parent58a3ed811ac501b99d38664eb89bbab4b283d2aa (diff)
xmloff: create XMLDrawStylesExportOOO instances with an uno constructor
See tdf#74608 for motivation. Change-Id: I875cdd1f1ee4e57522d992768dfbcdb0da9f3fd3 Reviewed-on: https://gerrit.libreoffice.org/79228 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/sdxmlexp.cxx11
-rw-r--r--xmloff/util/xo.component3
4 files changed, 12 insertions, 8 deletions
diff --git a/xmloff/inc/facreg.hxx b/xmloff/inc/facreg.hxx
index d09f0e5cb566..e8e5be3e3b71 100644
--- a/xmloff/inc/facreg.hxx
+++ b/xmloff/inc/facreg.hxx
@@ -59,11 +59,6 @@ css::uno::Reference<css::uno::XInterface> XMLDrawSettingsExportOasis_createInsta
css::uno::Reference<css::lang::XMultiServiceFactory> const & rSMgr);
// draw OOo export
-OUString XMLDrawStylesExportOOO_getImplementationName() throw();
-css::uno::Sequence<OUString> XMLDrawStylesExportOOO_getSupportedServiceNames() throw();
-/// @throws css::uno::Exception
-css::uno::Reference<css::uno::XInterface> XMLDrawStylesExportOOO_createInstance(
- css::uno::Reference<css::lang::XMultiServiceFactory> const & rSMgr);
OUString XMLDrawContentExportOOO_getImplementationName() throw();
css::uno::Sequence<OUString> XMLDrawContentExportOOO_getSupportedServiceNames() throw();
/// @throws css::uno::Exception
diff --git a/xmloff/source/core/facreg.cxx b/xmloff/source/core/facreg.cxx
index 1b79ff004184..6fca9f07c259 100644
--- a/xmloff/source/core/facreg.cxx
+++ b/xmloff/source/core/facreg.cxx
@@ -66,7 +66,6 @@ XMLOFF_DLLPUBLIC void * xo_component_getFactory( const sal_Char * pImplName, voi
else SINGLEFACTORY( XMLDrawSettingsExportOasis )
// draw OOo export
- else SINGLEFACTORY( XMLDrawStylesExportOOO )
else SINGLEFACTORY( XMLDrawContentExportOOO )
else SINGLEFACTORY( XMLDrawMetaExportOOO )
else SINGLEFACTORY( XMLDrawSettingsExportOOO )
diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx
index d874973bc707..aa8829a242f8 100644
--- a/xmloff/source/draw/sdxmlexp.cxx
+++ b/xmloff/source/draw/sdxmlexp.cxx
@@ -2717,13 +2717,22 @@ com_sun_star_comp_Draw_XMLExporter_get_implementation(uno::XComponentContext* pC
| SvXMLExportFlags::EMBEDDED));
}
+extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
+com_sun_star_comp_Draw_XMLStylesExporter_get_implementation(uno::XComponentContext* pCtx,
+ uno::Sequence<uno::Any> const& /*rSeq*/)
+{
+ return cppu::acquire(new SdXMLExport(pCtx, "XMLDrawStylesExportOOO", true,
+ SvXMLExportFlags::STYLES | SvXMLExportFlags::MASTERSTYLES
+ | SvXMLExportFlags::AUTOSTYLES
+ | SvXMLExportFlags::FONTDECLS));
+}
+
SERVICE( XMLDrawExportOasis, "com.sun.star.comp.Draw.XMLOasisExporter", "XMLDrawExportOasis", true, SvXMLExportFlags::OASIS|SvXMLExportFlags::META|SvXMLExportFlags::STYLES|SvXMLExportFlags::MASTERSTYLES|SvXMLExportFlags::AUTOSTYLES|SvXMLExportFlags::CONTENT|SvXMLExportFlags::SCRIPTS|SvXMLExportFlags::SETTINGS|SvXMLExportFlags::FONTDECLS|SvXMLExportFlags::EMBEDDED );
SERVICE( XMLDrawStylesExportOasis, "com.sun.star.comp.Draw.XMLOasisStylesExporter", "XMLDrawStylesExportOasis", true, SvXMLExportFlags::OASIS|SvXMLExportFlags::STYLES|SvXMLExportFlags::MASTERSTYLES|SvXMLExportFlags::AUTOSTYLES|SvXMLExportFlags::FONTDECLS );
SERVICE( XMLDrawContentExportOasis, "com.sun.star.comp.Draw.XMLOasisContentExporter", "XMLDrawContentExportOasis", true, SvXMLExportFlags::OASIS|SvXMLExportFlags::AUTOSTYLES|SvXMLExportFlags::CONTENT|SvXMLExportFlags::SCRIPTS|SvXMLExportFlags::FONTDECLS );
SERVICE( XMLDrawMetaExportOasis, "com.sun.star.comp.Draw.XMLOasisMetaExporter", "XMLDrawMetaExportOasis", true, SvXMLExportFlags::OASIS|SvXMLExportFlags::META );
SERVICE( XMLDrawSettingsExportOasis, "com.sun.star.comp.Draw.XMLOasisSettingsExporter", "XMLDrawSettingsExportOasis", true, SvXMLExportFlags::OASIS|SvXMLExportFlags::SETTINGS );
-SERVICE( XMLDrawStylesExportOOO, "com.sun.star.comp.Draw.XMLStylesExporter", "XMLDrawStylesExportOOO", true, SvXMLExportFlags::STYLES|SvXMLExportFlags::MASTERSTYLES|SvXMLExportFlags::AUTOSTYLES|SvXMLExportFlags::FONTDECLS );
SERVICE( XMLDrawContentExportOOO, "com.sun.star.comp.Draw.XMLContentExporter", "XMLDrawContentExportOOO", true, SvXMLExportFlags::AUTOSTYLES|SvXMLExportFlags::CONTENT|SvXMLExportFlags::SCRIPTS|SvXMLExportFlags::FONTDECLS );
SERVICE( XMLDrawMetaExportOOO, "com.sun.star.comp.Draw.XMLMetaExporter", "XMLDrawMetaExportOOO", true, SvXMLExportFlags::META );
SERVICE( XMLDrawSettingsExportOOO, "com.sun.star.comp.Draw.XMLSettingsExporter", "XMLDrawSettingsExportOOO", true, SvXMLExportFlags::SETTINGS );
diff --git a/xmloff/util/xo.component b/xmloff/util/xo.component
index b0e1095a4525..5d1e7c4e0335 100644
--- a/xmloff/util/xo.component
+++ b/xmloff/util/xo.component
@@ -81,7 +81,8 @@
<implementation name="XMLDrawSettingsExportOasis">
<service name="com.sun.star.comp.Draw.XMLOasisSettingsExporter"/>
</implementation>
- <implementation name="XMLDrawStylesExportOOO">
+ <implementation name="XMLDrawStylesExportOOO"
+ constructor="com_sun_star_comp_Draw_XMLStylesExporter_get_implementation">
<service name="com.sun.star.comp.Draw.XMLStylesExporter"/>
</implementation>
<implementation name="XMLDrawStylesExportOasis">