diff options
Diffstat (limited to 'ucbhelper/inc/ucbhelper/macros.hxx')
-rw-r--r-- | ucbhelper/inc/ucbhelper/macros.hxx | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/ucbhelper/inc/ucbhelper/macros.hxx b/ucbhelper/inc/ucbhelper/macros.hxx index b2cb7cb89346..924989ae6d0f 100644 --- a/ucbhelper/inc/ucbhelper/macros.hxx +++ b/ucbhelper/inc/ucbhelper/macros.hxx @@ -656,6 +656,19 @@ Class##_CreateInstance( const com::sun::star::uno::Reference< \ com::sun::star::uno::XInterface >::query( pX ); \ } +#define XSERVICEINFO_CREATE_INSTANCE_IMPL_CTX( Class ) \ +static com::sun::star::uno::Reference< \ + com::sun::star::uno::XInterface > SAL_CALL \ +Class##_CreateInstance( const com::sun::star::uno::Reference< \ + com::sun::star::lang::XMultiServiceFactory> & rSMgr ) \ + throw( com::sun::star::uno::Exception ) \ +{ \ + com::sun::star::lang::XServiceInfo* pX = \ + (com::sun::star::lang::XServiceInfo*)new Class( comphelper::getComponentContext(rSMgr) ); \ + return com::sun::star::uno::Reference< \ + com::sun::star::uno::XInterface >::query( pX ); \ +} + //========================================================================= // // XServiceInfo impl. @@ -708,6 +721,14 @@ XSERVICEINFO_CREATE_INSTANCE_IMPL( Class ) \ com::sun::star::uno::Sequence< rtl::OUString > \ Class::getSupportedServiceNames_Static() +// Own implementation of getSupportedServiceNames_Static(). +#define XSERVICEINFO_IMPL_0_CTX( Class, ImplName ) \ +XSERVICEINFO_COMMOM_IMPL( Class, ImplName ) \ +XSERVICEINFO_CREATE_INSTANCE_IMPL_CTX( Class ) \ + \ +com::sun::star::uno::Sequence< rtl::OUString > \ +Class::getSupportedServiceNames_Static() + // 1 service name #define XSERVICEINFO_IMPL_1( Class, ImplName, Service1 ) \ XSERVICEINFO_COMMOM_IMPL( Class, ImplName ) \ |