Kaydet (Commit) 95ed72a4 authored tarafından Miklos Vajna's avatar Miklos Vajna

sw: create SwUnoModule instances with an uno constructor

Change-Id: If05d773d6823833ef075484807bf427dcc2c1426
Reviewed-on: https://gerrit.libreoffice.org/61955
Tested-by: Jenkins
Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
üst b25e2451
......@@ -283,6 +283,7 @@ edit_constructor_list = [
"com_sun_star_comp_Writer_XMLOasisMetaExporter_get_implementation",
"com_sun_star_comp_Writer_XMLOasisSettingsExporter_get_implementation",
"com_sun_star_comp_Writer_XMLOasisStylesExporter_get_implementation",
"com_sun_star_comp_Writer_WriterModule_get_implementation",
]
# math
......
......@@ -30,12 +30,6 @@ namespace com { namespace sun { namespace star { namespace lang {
class XMultiServiceFactory;
} } } }
// module
css::uno::Sequence< OUString > SwUnoModule_getSupportedServiceNames() throw();
OUString SwUnoModule_getImplementationName() throw();
/// @throws css::uno::Exception
css::uno::Reference< css::uno::XInterface > SwUnoModule_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory > &rSMgr );
// writer documents
css::uno::Sequence< OUString > SwTextDocument_getSupportedServiceNames() throw();
OUString SwTextDocument_getImplementationName() throw();
......
......@@ -62,14 +62,6 @@ SAL_DLLPUBLIC_EXPORT void * sw_component_getFactory(
SwTextDocument_createInstance,
SwTextDocument_getSupportedServiceNames() );
}
else if( SwUnoModule_getImplementationName().equalsAsciiL(
pImplName, nImplNameLen ) )
{
xFactory = ::cppu::createSingleFactory( xMSF,
SwUnoModule_getImplementationName(),
SwUnoModule_createInstance,
SwUnoModule_getSupportedServiceNames() );
}
if( xFactory.is())
{
......
......@@ -32,22 +32,12 @@
using namespace css;
OUString SwUnoModule_getImplementationName() throw()
{
return OUString( "com.sun.star.comp.Writer.WriterModule" );
}
uno::Sequence< OUString > SwUnoModule_getSupportedServiceNames() throw()
{
uno::Sequence<OUString> aSeq { "com.sun.star.text.ModuleDispatcher" };
return aSeq;
}
uno::Reference< uno::XInterface > SwUnoModule_createInstance(
const uno::Reference< lang::XMultiServiceFactory > & )
extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
com_sun_star_comp_Writer_WriterModule_get_implementation(uno::XComponentContext* /*pCtx*/,
uno::Sequence<uno::Any> const& /*rSeq*/)
{
SolarMutexGuard aGuard;
return uno::Reference< uno::XInterface >( dynamic_cast< frame::XDispatch * >(new SwUnoModule), uno::UNO_QUERY );
return cppu::acquire(new SwUnoModule);
}
// XNotifyingDispatch
......@@ -144,7 +134,7 @@ uno::Reference< frame::XDispatch > SAL_CALL SwUnoModule::queryDispatch(
// XServiceInfo
OUString SAL_CALL SwUnoModule::getImplementationName( )
{
return SwUnoModule_getImplementationName();
return OUString( "com.sun.star.comp.Writer.WriterModule" );
}
sal_Bool SAL_CALL SwUnoModule::supportsService( const OUString& sServiceName )
......@@ -154,7 +144,8 @@ sal_Bool SAL_CALL SwUnoModule::supportsService( const OUString& sServiceName )
uno::Sequence< OUString > SAL_CALL SwUnoModule::getSupportedServiceNames( )
{
return SwUnoModule_getSupportedServiceNames();
uno::Sequence<OUString> aSeq { "com.sun.star.text.ModuleDispatcher" };
return aSeq;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -47,7 +47,8 @@
constructor="lo_writer_MMExcludeEntryController_get_implementation">
<service name="com.sun.star.frame.ToolbarController"/>
</implementation>
<implementation name="SwXModule" constructor="SwXModule_get_implementation">
<implementation name="SwXModule"
constructor="SwXModule_get_implementation">
<service name="com.sun.star.text.GlobalSettings"/>
</implementation>
<implementation name="com.sun.star.comp.Writer.FilterOptionsDialog"
......@@ -65,7 +66,8 @@
constructor="com_sun_star_comp_Writer_WebDocument_get_implementation">
<service name="com.sun.star.text.WebDocument"/>
</implementation>
<implementation name="com.sun.star.comp.Writer.WriterModule">
<implementation name="com.sun.star.comp.Writer.WriterModule"
constructor="com_sun_star_comp_Writer_WriterModule_get_implementation">
<service name="com.sun.star.text.ModuleDispatcher"/>
</implementation>
<implementation name="com.sun.star.comp.Writer.XMLContentExporter"
......
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