Kaydet (Commit) b9301c1b authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Remove unused macros

Change-Id: Id76b285d70acb4de3ab27dbf2f0f0bb4b46735c7
üst 0595f3ff
...@@ -91,156 +91,6 @@ typedef sal_Int32 FrameSearchFlags; ...@@ -91,156 +91,6 @@ typedef sal_Int32 FrameSearchFlags;
/* Helper for registry */ \ /* Helper for registry */ \
static css::uno::Reference< css::uno::XInterface > SAL_CALL impl_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory >& xServiceManager ) throw( css::uno::Exception ); static css::uno::Reference< css::uno::XInterface > SAL_CALL impl_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory >& xServiceManager ) throw( css::uno::Exception );
// declaration of XInterface::queryInterface()
// XInterface::aquire()
// XInterface::release()
// XTypeProvider::getTypes()
// XTypeProvider::getImplementationId()
// XServiceInfo::getImplementationName()
// XServiceInfo::supportsService()
// XServiceInfo::getSupportedServiceNames()
// static xxx::impl_getStaticSupportedServiceNames()
// static xxx::impl_getStaticImplementationName()
// static xxx::impl_createInstance()
// static xxx::impl_createFactory()
#define SFX_DECL_XSERVICEINFO \
SFX_DECL_XSERVICEINFO_NOFACTORY \
static css::uno::Reference< css::lang::XSingleServiceFactory > impl_createFactory( const css::uno::Reference< css::lang::XMultiServiceFactory >& xServiceManager );
// implementation of XServiceInfo::getImplementationName()
// XServiceInfo::supportsService()
// XServiceInfo::getSupportedServiceNames()
// static xxx::impl_getStaticSupportedServiceNames()
// static xxx::impl_getStaticImplementationName()
// static xxx::impl_createInstance()
#define SFX_IMPL_XSERVICEINFO( IMPLCLASS, IMPLSERVICENAME, IMPLNAME ) \
\
/* XServiceInfo */ \
OUString SAL_CALL IMPLCLASS::getImplementationName() throw( css::uno::RuntimeException ) \
{ \
return impl_getStaticImplementationName(); \
} \
\
/* XServiceInfo */ \
sal_Bool SAL_CALL IMPLCLASS::supportsService( const OUString& sServiceName ) throw( css::uno::RuntimeException ) \
{ \
return cppu::supportsService(this, sServiceName); \
} \
\
/* XServiceInfo */ \
css::uno::Sequence< OUString > SAL_CALL IMPLCLASS::getSupportedServiceNames() throw( css::uno::RuntimeException ) \
{ \
return impl_getStaticSupportedServiceNames(); \
} \
\
/* Helper for XServiceInfo */ \
css::uno::Sequence< OUString > IMPLCLASS::impl_getStaticSupportedServiceNames() \
{ \
css::uno::Sequence< OUString > seqServiceNames( 1 ); \
seqServiceNames.getArray() [0] = OUString::createFromAscii( IMPLSERVICENAME ); \
return seqServiceNames ; \
} \
\
/* Helper for XServiceInfo */ \
OUString IMPLCLASS::impl_getStaticImplementationName() \
{ \
return OUString::createFromAscii( IMPLNAME ); \
} \
\
/* Helper for registry */ \
css::uno::Reference< css::uno::XInterface > SAL_CALL IMPLCLASS::impl_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory >& xServiceManager ) throw( css::uno::Exception ) \
{ \
return css::uno::Reference< css::uno::XInterface >( *new IMPLCLASS( xServiceManager ) ); \
}
// implementation of XServiceInfo::getImplementationName()
// XServiceInfo::supportsService()
// XServiceInfo::getSupportedServiceNames()
// static xxx::impl_getStaticSupportedServiceNames()
// static xxx::impl_getStaticImplementationName()
// static xxx::impl_createInstance()
#define SFX_IMPL_XSERVICEINFO_CTX( IMPLCLASS, IMPLSERVICENAME, IMPLNAME ) \
\
/* XServiceInfo */ \
OUString SAL_CALL IMPLCLASS::getImplementationName() throw( css::uno::RuntimeException ) \
{ \
return impl_getStaticImplementationName(); \
} \
\
/* XServiceInfo */ \
sal_Bool SAL_CALL IMPLCLASS::supportsService( const OUString& sServiceName ) throw( css::uno::RuntimeException ) \
{ \
return cppu::supportsService(this, sServiceName); \
} \
\
/* XServiceInfo */ \
css::uno::Sequence< OUString > SAL_CALL IMPLCLASS::getSupportedServiceNames() throw( css::uno::RuntimeException ) \
{ \
return impl_getStaticSupportedServiceNames(); \
} \
\
/* Helper for XServiceInfo */ \
css::uno::Sequence< OUString > IMPLCLASS::impl_getStaticSupportedServiceNames() \
{ \
css::uno::Sequence< OUString > seqServiceNames( 1 ); \
seqServiceNames.getArray() [0] = OUString::createFromAscii( IMPLSERVICENAME ); \
return seqServiceNames ; \
} \
\
/* Helper for XServiceInfo */ \
OUString IMPLCLASS::impl_getStaticImplementationName() \
{ \
return OUString::createFromAscii( IMPLNAME ); \
} \
\
/* Helper for registry */ \
css::uno::Reference< css::uno::XInterface > SAL_CALL IMPLCLASS::impl_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory >& xServiceManager ) throw( css::uno::Exception ) \
{ \
return css::uno::Reference< css::uno::XInterface >( *new IMPLCLASS( comphelper::getComponentContext(xServiceManager) ) ); \
}
// definition of createFactory() for MultiServices
#define SFX_IMPL_SINGLEFACTORY( IMPLCLASS ) \
\
css::uno::Reference< css::lang::XSingleServiceFactory > IMPLCLASS::impl_createFactory( const css::uno::Reference< css::lang::XMultiServiceFactory >& xServiceManager ) \
{ \
css::uno::Reference< css::lang::XSingleServiceFactory > xReturn ( \
cppu::createSingleFactory( xServiceManager , \
IMPLCLASS::impl_getStaticImplementationName() , \
IMPLCLASS::impl_createInstance , \
IMPLCLASS::impl_getStaticSupportedServiceNames() ) \
); \
return xReturn ; \
}
// definition of createFactory() for OneInstance-Services
#define SFX_IMPL_ONEINSTANCEFACTORY( IMPLCLASS ) \
\
css::uno::Reference< css::lang::XSingleServiceFactory > IMPLCLASS::impl_createFactory( const css::uno::Reference< css::lang::XMultiServiceFactory >& xServiceManager ) \
{ \
css::uno::Reference< css::lang::XSingleServiceFactory > xReturn( \
cppu::createOneInstanceFactory( xServiceManager , \
IMPLCLASS::impl_getStaticImplementationName() , \
IMPLCLASS::impl_createInstance , \
IMPLCLASS::impl_getStaticSupportedServiceNames() ) \
); \
return xReturn ; \
}
// definition for "extern c sfx_component_getFactory()"
#define CREATEFACTORY(CLASS) \
\
/* Create right factory ... */ \
xFactory = CLASS::impl_createFactory( xServiceManager );
// definition for "extern c sfx_component_getFactory()"
#define IF_NAME_CREATECOMPONENTFACTORY(CLASS) \
\
if ( CLASS::impl_getStaticImplementationName().equals( OUString::createFromAscii( pImplementationName ) ) ) \
{ \
CREATEFACTORY ( CLASS ) \
}
#endif // INCLUDED_SFX2_SFXUNO_HXX #endif // INCLUDED_SFX2_SFXUNO_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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