From 38ecca9b30e0fc5f7cc6264857f983e40dd58195 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 24 Jul 2015 16:22:29 +0200 Subject: inline a bunch of use-once macros no point in having a macro unless it's actually going to reduce the number of lines of code Change-Id: Ic8760d6506cf272d7bd088f7b3b4dcbf288099fc --- include/toolkit/helper/macros.hxx | 51 --------------------------------------- 1 file changed, 51 deletions(-) (limited to 'include/toolkit') diff --git a/include/toolkit/helper/macros.hxx b/include/toolkit/helper/macros.hxx index bfe3a0822a52..e84053e17681 100644 --- a/include/toolkit/helper/macros.hxx +++ b/include/toolkit/helper/macros.hxx @@ -50,31 +50,6 @@ ClassName* ClassName::GetImplementation( const ::com::sun::star::uno::Reference< return xUT.is() ? reinterpret_cast(sal::static_int_cast(xUT->getSomething( ClassName::GetUnoTunnelId() ))) : NULL; \ } -#define IMPL_XUNOTUNNEL2( ClassName, BaseClass ) \ -sal_Int64 ClassName::getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& rIdentifier ) throw(::com::sun::star::uno::RuntimeException, std::exception) \ -{ \ - if( ( rIdentifier.getLength() == 16 ) && ( 0 == memcmp( ClassName::GetUnoTunnelId().getConstArray(), rIdentifier.getConstArray(), 16 ) ) ) \ - { \ - return sal::static_int_cast< sal_Int64 >(reinterpret_cast< sal_IntPtr >(this)); \ - } \ - return BaseClass::getSomething( rIdentifier ); \ -} \ -namespace \ -{ \ - class the##ClassName##UnoTunnelId : public rtl::Static< UnoTunnelIdInit, the##ClassName##UnoTunnelId> {}; \ -} \ -const ::com::sun::star::uno::Sequence< sal_Int8 >& ClassName::GetUnoTunnelId() throw() \ -{ \ - return the##ClassName##UnoTunnelId::get().getSeq(); \ -} \ -ClassName* ClassName::GetImplementation( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& rxIFace ) \ -{ \ - ::com::sun::star::uno::Reference< ::com::sun::star::lang::XUnoTunnel > xUT( rxIFace, ::com::sun::star::uno::UNO_QUERY ); \ - return xUT.is() ? reinterpret_cast(sal::static_int_cast(xUT->getSomething( ClassName::GetUnoTunnelId() ))) : NULL; \ -} - - - #define IMPL_IMPLEMENTATION_ID( ClassName ) \ ::com::sun::star::uno::Sequence< sal_Int8 > ClassName::getImplementationId() throw(::com::sun::star::uno::RuntimeException, std::exception) \ { \ @@ -164,32 +139,6 @@ void ClassName::disposing( const ::com::sun::star::lang::EventObject& ) throw(:: #define DISPLAY_EXCEPTION( ClassName, MethodName, e ) (void)e; #endif -#define IMPL_TABLISTENERMULTIPLEXER_LISTENERMETHOD_BODY_2PARAM( ClassName, InterfaceName, MethodName, ParamType1, ParamType2 ) \ -{ \ - ParamType1 aMulti( evt ); \ - ParamType2 aMulti2( evt2 ); \ - ::cppu::OInterfaceIteratorHelper aIt( *this ); \ - while( aIt.hasMoreElements() ) \ - { \ - ::com::sun::star::uno::Reference< InterfaceName > xListener( \ - static_cast< InterfaceName* >( aIt.next() ) ); \ - try \ - { \ - xListener->MethodName( aMulti, aMulti2 ); \ - } \ - catch(const ::com::sun::star::lang::DisposedException& e) \ - { \ - OSL_ENSURE( e.Context.is(), "caught DisposedException with empty Context field" ); \ - if ( e.Context == xListener || !e.Context.is() ) \ - aIt.remove(); \ - } \ - catch(const ::com::sun::star::uno::RuntimeException& e) \ - { \ - DISPLAY_EXCEPTION( ClassName, MethodName, e ) \ - } \ - } \ -} - #define IMPL_TABLISTENERMULTIPLEXER_LISTENERMETHOD_BODY_1PARAM( ClassName, InterfaceName, MethodName, ParamType1 ) \ { \ ParamType1 aMulti( evt ); \ -- cgit