[Libreoffice-commits] core.git: solenv/bin xmloff/inc xmloff/source xmloff/util
Miklos Vajna (via logerrit)
logerrit at kemper.freedesktop.org
Fri Jan 17 08:54:07 UTC 2020
solenv/bin/native-code.py | 1 +
xmloff/inc/facreg.hxx | 7 -------
xmloff/source/core/facreg.cxx | 5 +----
xmloff/source/draw/sdxmlexp.cxx | 12 +++++++++++-
xmloff/util/xo.component | 3 ++-
5 files changed, 15 insertions(+), 13 deletions(-)
New commits:
commit b4b224f6710adaa1cd9c6413e9754db6fbee3e9c
Author: Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Thu Jan 16 21:31:44 2020 +0100
Commit: Miklos Vajna <vmiklos at collabora.com>
CommitDate: Fri Jan 17 09:53:33 2020 +0100
xmloff: create DrawingLayerExport instances with an uno constructor
See tdf#74608 for motivation.
Change-Id: I1bb8e649cab67a2df4e40277758a47259f65a6c6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86946
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 99b867ba335b..13a4ff709825 100755
--- a/solenv/bin/native-code.py
+++ b/solenv/bin/native-code.py
@@ -310,6 +310,7 @@ core_constructor_list = [
"com_sun_star_comp_Draw_XMLOasisMetaImporter_get_implementation",
"com_sun_star_comp_Draw_XMLOasisSettingsImporter_get_implementation",
"com_sun_star_comp_Xmloff_AnimationsImport",
+ "com_sun_star_comp_DrawingLayer_XMLExporter_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 aea6ca9a23e4..589210d9e8c8 100644
--- a/xmloff/inc/facreg.hxx
+++ b/xmloff/inc/facreg.hxx
@@ -31,13 +31,6 @@ namespace com { namespace sun { namespace star {
namespace uno { class XInterface; }
} } }
-// drawing layer export
-OUString XMLDrawingLayerExport_getImplementationName() throw();
-css::uno::Sequence<OUString> XMLDrawingLayerExport_getSupportedServiceNames() throw();
-/// @throws css::uno::Exception
-css::uno::Reference<css::uno::XInterface> XMLDrawingLayerExport_createInstance(
- css::uno::Reference<css::lang::XMultiServiceFactory> const & rSMgr);
-
// impress xml clipboard export
OUString XMLImpressClipboardExport_getImplementationName() throw();
css::uno::Sequence<OUString> XMLImpressClipboardExport_getSupportedServiceNames() throw();
diff --git a/xmloff/source/core/facreg.cxx b/xmloff/source/core/facreg.cxx
index cf214d3cdf33..0a1357d93f76 100644
--- a/xmloff/source/core/facreg.cxx
+++ b/xmloff/source/core/facreg.cxx
@@ -54,11 +54,8 @@ XMLOFF_DLLPUBLIC void * xo_component_getFactory( const char * pImplName, void *
const sal_Int32 nImplNameLen = strlen( pImplName );
- // drawing layer export
- SINGLEFACTORY( XMLDrawingLayerExport )
-
// impress xml clipboard export
- else SINGLEFACTORY( XMLImpressClipboardExport )
+ SINGLEFACTORY( XMLImpressClipboardExport )
// chart oasis import
else SINGLEFACTORY( SchXMLImport )
diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx
index 98df3dc0c091..3fd9320c58bb 100644
--- a/xmloff/source/draw/sdxmlexp.cxx
+++ b/xmloff/source/draw/sdxmlexp.cxx
@@ -2784,7 +2784,17 @@ com_sun_star_comp_Draw_XMLOasisExporter_get_implementation(uno::XComponentContex
| SvXMLExportFlags::FONTDECLS | SvXMLExportFlags::EMBEDDED));
}
-SERVICE( XMLDrawingLayerExport, "com.sun.star.comp.DrawingLayer.XMLExporter", "XMLDrawingLayerExport", true, SvXMLExportFlags::OASIS|SvXMLExportFlags::STYLES|SvXMLExportFlags::AUTOSTYLES|SvXMLExportFlags::CONTENT|SvXMLExportFlags::FONTDECLS|SvXMLExportFlags::EMBEDDED );
+extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
+com_sun_star_comp_DrawingLayer_XMLExporter_get_implementation(
+ uno::XComponentContext* pCtx, uno::Sequence<uno::Any> const& /*rSeq*/)
+{
+ return cppu::acquire(
+ new SdXMLExport(pCtx, "XMLDrawingLayerExport", true,
+ SvXMLExportFlags::OASIS | SvXMLExportFlags::STYLES
+ | SvXMLExportFlags::AUTOSTYLES | SvXMLExportFlags::CONTENT
+ | SvXMLExportFlags::FONTDECLS | SvXMLExportFlags::EMBEDDED));
+}
+
SERVICE( XMLImpressClipboardExport, "com.sun.star.comp.Impress.XMLClipboardExporter", "XMLImpressClipboardExport", false, SvXMLExportFlags::OASIS|SvXMLExportFlags::STYLES|SvXMLExportFlags::AUTOSTYLES|SvXMLExportFlags::CONTENT|SvXMLExportFlags::FONTDECLS|SvXMLExportFlags::EMBEDDED );
XMLFontAutoStylePool* SdXMLExport::CreateFontAutoStylePool()
diff --git a/xmloff/util/xo.component b/xmloff/util/xo.component
index 32e3bf12dc10..57b160bd2719 100644
--- a/xmloff/util/xo.component
+++ b/xmloff/util/xo.component
@@ -96,7 +96,8 @@
constructor="com_sun_star_comp_Draw_XMLOasisStylesExporter_get_implementation">
<service name="com.sun.star.comp.Draw.XMLOasisStylesExporter"/>
</implementation>
- <implementation name="XMLDrawingLayerExport">
+ <implementation name="XMLDrawingLayerExport"
+ constructor="com_sun_star_comp_DrawingLayer_XMLExporter_get_implementation">
<service name="com.sun.star.comp.DrawingLayer.XMLExporter"/>
</implementation>
<implementation name="XMLImpressClipboardExport">
More information about the Libreoffice-commits
mailing list