Kaydet (Commit) 84a0496d authored tarafından Miklos Vajna's avatar Miklos Vajna

starmath: create XMLOasisMetaImporter instances with an uno constructor

Change-Id: Ie48a779958a393b68dea613c3bcc17113165f065
Reviewed-on: https://gerrit.libreoffice.org/63443
Tested-by: Jenkins
Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.com>
üst bbf5c85c
......@@ -279,6 +279,7 @@ edit_constructor_list = [
"Math_XMLOasisMetaExporter_get_implementation",
"Math_XMLOasisSettingsExporter_get_implementation",
"Math_XMLImporter_get_implementation",
"Math_XMLOasisMetaImporter_get_implementation",
# sw/util/sw.component
"com_sun_star_comp_Writer_XMLOasisContentExporter_get_implementation",
"com_sun_star_comp_Writer_XMLOasisMetaExporter_get_implementation",
......
......@@ -442,24 +442,14 @@ Math_XMLImporter_get_implementation(uno::XComponentContext* pCtx,
new SmXMLImport(pCtx, "com.sun.star.comp.Math.XMLImporter", SvXMLImportFlags::ALL));
}
OUString SmXMLImportMeta_getImplementationName() throw()
{
return OUString( "com.sun.star.comp.Math.XMLOasisMetaImporter" );
}
uno::Sequence< OUString > SmXMLImportMeta_getSupportedServiceNames()
throw()
{
return uno::Sequence<OUString>{ IMPORT_SVC_NAME };
}
uno::Reference< uno::XInterface > SmXMLImportMeta_createInstance(
const uno::Reference< lang::XMultiServiceFactory > & rSMgr)
extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
Math_XMLOasisMetaImporter_get_implementation(uno::XComponentContext* pCtx,
uno::Sequence<uno::Any> const& /*rSeq*/)
{
return static_cast<cppu::OWeakObject*>(new SmXMLImport( comphelper::getComponentContext(rSMgr), SmXMLImportMeta_getImplementationName(), SvXMLImportFlags::META ));
return cppu::acquire(new SmXMLImport(pCtx, "com.sun.star.comp.Math.XMLOasisMetaImporter",
SvXMLImportFlags::META));
}
OUString SmXMLImportSettings_getImplementationName() throw()
{
return OUString( "com.sun.star.comp.Math.XMLOasisSettingsImporter" );
......
......@@ -46,14 +46,7 @@ SAL_DLLPUBLIC_EXPORT void* sm_component_getFactory( const sal_Char* pImplementat
Reference< XSingleServiceFactory > xFactory ;
Reference< XMultiServiceFactory > xServiceManager( static_cast< XMultiServiceFactory* >( pServiceManager ) ) ;
if( SmXMLImportMeta_getImplementationName().equalsAscii( pImplementationName ))
{
xFactory = ::cppu::createSingleFactory( xServiceManager,
SmXMLImportMeta_getImplementationName(),
SmXMLImportMeta_createInstance,
SmXMLImportMeta_getSupportedServiceNames() );
}
else if( SmXMLImportSettings_getImplementationName().equalsAscii( pImplementationName ))
if (SmXMLImportSettings_getImplementationName().equalsAscii(pImplementationName))
{
xFactory = ::cppu::createSingleFactory( xServiceManager,
SmXMLImportSettings_getImplementationName(),
......
......@@ -32,13 +32,6 @@ OUString
css::uno::Reference< css::uno::XInterface >
SmDocument_createInstance(const css::uno::Reference< css::lang::XMultiServiceFactory > & rSMgr, SfxModelFlags _nCreationFlags);
css::uno::Sequence< OUString >
SmXMLImportMeta_getSupportedServiceNames() throw();
OUString
SmXMLImportMeta_getImplementationName() throw();
/// @throws css::uno::Exception
css::uno::Reference< css::uno::XInterface >
SmXMLImportMeta_createInstance(const css::uno::Reference< css::lang::XMultiServiceFactory > & rSMgr);
css::uno::Sequence< OUString >
SmXMLImportSettings_getSupportedServiceNames() throw();
OUString SmXMLImportSettings_getImplementationName() throw();
......
......@@ -42,7 +42,8 @@
constructor="Math_XMLOasisMetaExporter_get_implementation">
<service name="com.sun.star.xml.XMLExportFilter"/>
</implementation>
<implementation name="com.sun.star.comp.Math.XMLOasisMetaImporter">
<implementation name="com.sun.star.comp.Math.XMLOasisMetaImporter"
constructor="Math_XMLOasisMetaImporter_get_implementation">
<service name="com.sun.star.xml.XMLImportFilter"/>
</implementation>
<implementation name="com.sun.star.comp.Math.XMLOasisSettingsExporter"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment