Expand XSERVICEINFO_COMMOM_IMPL macro which is now used only once

Change-Id: I32de3f604cbb6863e29c0a63b599920a988c8389
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100463
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
This commit is contained in:
Julien Nabet
2020-08-11 10:52:13 +02:00
parent a67da1808d
commit 7211f0d15d
2 changed files with 19 additions and 28 deletions
-26
View File
@@ -141,32 +141,6 @@ GETTYPES_IMPL_START( Class ) \
CPPU_TYPE_REF( I11 ) \
GETTYPES_IMPL_END
// XServiceInfo impl. internals
#define XSERVICEINFO_COMMOM_IMPL( Class, ImplName ) \
OUString SAL_CALL Class::getImplementationName() \
{ \
return getImplementationName_Static(); \
} \
\
OUString Class::getImplementationName_Static() \
{ \
return ImplName; \
} \
\
sal_Bool SAL_CALL \
Class::supportsService( const OUString& ServiceName ) \
{ \
return cppu::supportsService( this, ServiceName ); \
} \
\
css::uno::Sequence< OUString > SAL_CALL \
Class::getSupportedServiceNames() \
{ \
return getSupportedServiceNames_Static(); \
}
#endif /* ! INCLUDED_UCBHELPER_MACROS_HXX */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+19 -2
View File
@@ -82,9 +82,26 @@ XTYPEPROVIDER_IMPL_3( ContentProvider,
// XServiceInfo methods.
OUString SAL_CALL ContentProvider::getImplementationName()
{
return getImplementationName_Static();
}
OUString ContentProvider::getImplementationName_Static()
{
return "com.sun.star.comp.WebDAVContentProvider";
}
sal_Bool SAL_CALL ContentProvider::supportsService( const OUString& ServiceName )
{
return cppu::supportsService( this, ServiceName );
}
css::uno::Sequence< OUString > SAL_CALL ContentProvider::getSupportedServiceNames()
{
return getSupportedServiceNames_Static();
}
XSERVICEINFO_COMMOM_IMPL( ContentProvider,
"com.sun.star.comp.WebDAVContentProvider" )
/// @throws css::uno::Exception
static css::uno::Reference< css::uno::XInterface >
ContentProvider_CreateInstance( const css::uno::Reference< css::lang::XMultiServiceFactory> & rSMgr )