xmloff: create XMLDrawContentExportOOO instances with an uno constructor

See tdf#74608 for motivation.

Change-Id: Ib63744f720a886cd67b4158399e6bf91c6efb128
Reviewed-on: https://gerrit.libreoffice.org/79660
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
This commit is contained in:
Miklos Vajna
2019-09-26 21:41:28 +02:00
parent c0731052db
commit b38a9a3e59
5 changed files with 13 additions and 8 deletions

View File

@@ -283,6 +283,7 @@ core_constructor_list = [
"com_sun_star_comp_Impress_XMLExporter_get_implementation",
"com_sun_star_comp_Draw_XMLExporter_get_implementation",
"com_sun_star_comp_Draw_XMLStylesExporter_get_implementation",
"com_sun_star_comp_Draw_XMLContentExporter_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",

View File

@@ -59,11 +59,6 @@ css::uno::Reference<css::uno::XInterface> XMLDrawSettingsExportOasis_createInsta
css::uno::Reference<css::lang::XMultiServiceFactory> const & rSMgr);
// draw OOo export
OUString XMLDrawContentExportOOO_getImplementationName() throw();
css::uno::Sequence<OUString> XMLDrawContentExportOOO_getSupportedServiceNames() throw();
/// @throws css::uno::Exception
css::uno::Reference<css::uno::XInterface> XMLDrawContentExportOOO_createInstance(
css::uno::Reference<css::lang::XMultiServiceFactory> const & rSMgr);
OUString XMLDrawMetaExportOOO_getImplementationName() throw();
css::uno::Sequence<OUString> XMLDrawMetaExportOOO_getSupportedServiceNames() throw();
/// @throws css::uno::Exception

View File

@@ -66,7 +66,6 @@ XMLOFF_DLLPUBLIC void * xo_component_getFactory( const sal_Char * pImplName, voi
else SINGLEFACTORY( XMLDrawSettingsExportOasis )
// draw OOo export
else SINGLEFACTORY( XMLDrawContentExportOOO )
else SINGLEFACTORY( XMLDrawMetaExportOOO )
else SINGLEFACTORY( XMLDrawSettingsExportOOO )

View File

@@ -2727,13 +2727,22 @@ com_sun_star_comp_Draw_XMLStylesExporter_get_implementation(uno::XComponentConte
| SvXMLExportFlags::FONTDECLS));
}
extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
com_sun_star_comp_Draw_XMLContentExporter_get_implementation(uno::XComponentContext* pCtx,
uno::Sequence<uno::Any> const& /*rSeq*/)
{
return cppu::acquire(new SdXMLExport(pCtx, "XMLDrawContentExportOOO", true,
SvXMLExportFlags::AUTOSTYLES | SvXMLExportFlags::CONTENT
| SvXMLExportFlags::SCRIPTS
| 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( 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 );

View File

@@ -52,7 +52,8 @@
<implementation name="SchXMLImport.Styles">
<service name="com.sun.star.comp.Chart.XMLOasisStylesImporter"/>
</implementation>
<implementation name="XMLDrawContentExportOOO">
<implementation name="XMLDrawContentExportOOO"
constructor="com_sun_star_comp_Draw_XMLContentExporter_get_implementation">
<service name="com.sun.star.comp.Draw.XMLContentExporter"/>
</implementation>
<implementation name="XMLDrawContentExportOasis">