xmloff: create SchXMLImport_Content instances with an uno constructor

See tdf#74608 for motivation.

Change-Id: I27826e04adbf8ae22c0ce026413c58eb1c6d7db8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90067
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
This commit is contained in:
Miklos Vajna 2020-03-05 21:07:26 +01:00
parent 47b4ee1a1a
commit bc4ef004b8
5 changed files with 13 additions and 27 deletions

View file

@ -321,6 +321,7 @@ core_constructor_list = [
"com_sun_star_comp_Chart_XMLOasisImporter_get_implementation",
"com_sun_star_comp_Chart_XMLOasisMetaImporter_get_implementation",
"com_sun_star_comp_Chart_XMLOasisStylesImporter_get_implementation",
"com_sun_star_comp_Chart_XMLOasisContentImporter_get_implementation",
# xmlscript/util/xmlscript.component
"com_sun_star_comp_xmlscript_XMLBasicExporter",
"com_sun_star_comp_xmlscript_XMLOasisBasicExporter",

View file

@ -31,13 +31,6 @@ namespace com { namespace sun { namespace star {
namespace uno { class XInterface; }
} } }
// chart oasis import
OUString SchXMLImport_Content_getImplementationName() throw();
css::uno::Sequence<OUString> SchXMLImport_Content_getSupportedServiceNames() throw();
/// @throws css::uno::Exception
css::uno::Reference<css::uno::XInterface> SchXMLImport_Content_createInstance(
css::uno::Reference<css::lang::XMultiServiceFactory> const & rSMgr);
// chart oasis export
OUString SchXMLExport_Oasis_getImplementationName() throw();
css::uno::Sequence<OUString> SchXMLExport_Oasis_getSupportedServiceNames() throw();

View file

@ -591,21 +591,6 @@ com_sun_star_comp_Chart_XMLOasisImporter_get_implementation(uno::XComponentConte
// multiple storage version: one for content / styles / meta
Sequence< OUString > SchXMLImport_Content_getSupportedServiceNames() throw()
{
return Sequence< OUString > { "com.sun.star.comp.Chart.XMLOasisContentImporter" };
}
OUString SchXMLImport_Content_getImplementationName() throw()
{
return "SchXMLImport.Content";
}
Reference< uno::XInterface > SchXMLImport_Content_createInstance(const Reference< lang::XMultiServiceFactory > & rSMgr)
{
return static_cast<cppu::OWeakObject*>(new SchXMLImport( comphelper::getComponentContext(rSMgr), SchXMLImport_Content_getImplementationName(), SvXMLImportFlags::CONTENT | SvXMLImportFlags::AUTOSTYLES | SvXMLImportFlags::FONTDECLS ));
}
extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
com_sun_star_comp_Chart_XMLOasisMetaImporter_get_implementation(
uno::XComponentContext* pCtx, uno::Sequence<uno::Any> const& /*rSeq*/)
@ -620,4 +605,13 @@ com_sun_star_comp_Chart_XMLOasisStylesImporter_get_implementation(
return cppu::acquire(new SchXMLImport(pCtx, "SchXMLImport.Styles", SvXMLImportFlags::STYLES));
}
extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
com_sun_star_comp_Chart_XMLOasisContentImporter_get_implementation(
uno::XComponentContext* pCtx, uno::Sequence<uno::Any> const& /*rSeq*/)
{
return cppu::acquire(new SchXMLImport(pCtx, "SchXMLImport.Content",
SvXMLImportFlags::CONTENT | SvXMLImportFlags::AUTOSTYLES
| SvXMLImportFlags::FONTDECLS));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View file

@ -54,11 +54,8 @@ XMLOFF_DLLPUBLIC void * xo_component_getFactory( const char * pImplName, void *
const sal_Int32 nImplNameLen = strlen( pImplName );
// chart oasis import
SINGLEFACTORY( SchXMLImport_Content )
// chart oasis export
else SINGLEFACTORY( SchXMLExport_Oasis )
SINGLEFACTORY( SchXMLExport_Oasis )
else SINGLEFACTORY( SchXMLExport_Oasis_Meta )
else SINGLEFACTORY( SchXMLExport_Oasis_Styles )
else SINGLEFACTORY( SchXMLExport_Oasis_Content )

View file

@ -44,7 +44,8 @@
constructor="com_sun_star_comp_Chart_XMLOasisImporter_get_implementation">
<service name="com.sun.star.comp.Chart.XMLOasisImporter"/>
</implementation>
<implementation name="SchXMLImport.Content">
<implementation name="SchXMLImport.Content"
constructor="com_sun_star_comp_Chart_XMLOasisContentImporter_get_implementation">
<service name="com.sun.star.comp.Chart.XMLOasisContentImporter"/>
</implementation>
<implementation name="SchXMLImport.Meta"