diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-04-01 08:41:50 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-04-01 08:41:50 +0200 |
commit | 678196b9a1146fd143cc9f9937183412243d1dc5 (patch) | |
tree | 067d258e722c83345f3a16b98533b2ee37703d35 /testtools/source/performance | |
parent | 2093c7a27be60f99cb20aa5f5f088dc3606d4008 (diff) |
Replace remaining getCppuType et al with cppu::UnoType
Change-Id: I02c70b26b82d2d0357111a127aefc57d3be21320
Diffstat (limited to 'testtools/source/performance')
-rw-r--r-- | testtools/source/performance/ubobject.cxx | 10 | ||||
-rw-r--r-- | testtools/source/performance/ubtest.cxx | 20 |
2 files changed, 15 insertions, 15 deletions
diff --git a/testtools/source/performance/ubobject.cxx b/testtools/source/performance/ubobject.cxx index 2a23d5c3a7eb..972f53e28646 100644 --- a/testtools/source/performance/ubobject.cxx +++ b/testtools/source/performance/ubobject.cxx @@ -77,20 +77,20 @@ public: { // execution time remains appr. constant any time Any aRet; - if (aType == ::getCppuType( (const Reference< XInterface > *)0 )) + if (aType == cppu::UnoType<XInterface>::get()) { void * p = (XInterface *)(XPerformanceTest *)this; - aRet.setValue( &p, ::getCppuType( (const Reference< XInterface > *)0 ) ); + aRet.setValue( &p, cppu::UnoType<XInterface>::get() ); } - if (aType == ::getCppuType( (const Reference< XPerformanceTest > *)0 )) + if (aType == cppu::UnoType<XPerformanceTest>::get()) { void * p = (XPerformanceTest *)this; - aRet.setValue( &p, ::getCppuType( (const Reference< XPerformanceTest > *)0 ) ); + aRet.setValue( &p, cppu::UnoType<XPerformanceTest>::get() ); } if (! aRet.hasValue()) { void * p = (XPerformanceTest *)this; - Any aDummy( &p, ::getCppuType( (const Reference< XPerformanceTest > *)0 ) ); + Any aDummy( &p, cppu::UnoType<XPerformanceTest>::get() ); } return aRet; } diff --git a/testtools/source/performance/ubtest.cxx b/testtools/source/performance/ubtest.cxx index 552eb4b49077..f1eabf2f7a8c 100644 --- a/testtools/source/performance/ubtest.cxx +++ b/testtools/source/performance/ubtest.cxx @@ -219,9 +219,9 @@ Reference< XSingleServiceFactory > loadLibComponentFactory( if (aCurrent2Env.is() && aEnv2Current.is()) { void * pSMgr = aCurrent2Env.mapInterface( - xSF.get(), ::getCppuType( (const Reference< XMultiServiceFactory > *)0 ) ); + xSF.get(), cppu::UnoType<XMultiServiceFactory>::get() ); void * pKey = aCurrent2Env.mapInterface( - xKey.get(), ::getCppuType( (const Reference< XRegistryKey > *)0 ) ); + xKey.get(), cppu::UnoType<XRegistryKey>::get() ); void * pSSF = (*((component_getFactoryFunc)pSym))( aImplName.getStr(), pSMgr, pKey ); @@ -235,7 +235,7 @@ Reference< XSingleServiceFactory > loadLibComponentFactory( { aEnv2Current.mapInterface( reinterpret_cast< void ** >( &xRet ), - pSSF, ::getCppuType( (const Reference< XSingleServiceFactory > *)0 ) ); + pSSF, cppu::UnoType<XSingleServiceFactory>::get() ); (*pEnv->pExtEnv->releaseInterface)( pEnv->pExtEnv, pSSF ); } } @@ -277,9 +277,9 @@ Reference< XSingleServiceFactory > loadLibComponentFactory( uno_Interface * pUComponentFactory = 0; uno_Interface * pUSFactory = (uno_Interface *)aCpp2Uno.mapInterface( - xSF.get(), ::getCppuType( (const Reference< XMultiServiceFactory > *)0 ) ); + xSF.get(), cppu::UnoType<XMultiServiceFactory>::get() ); uno_Interface * pUKey = (uno_Interface *)aCpp2Uno.mapInterface( - xKey.get(), ::getCppuType( (const Reference< XRegistryKey > *)0 ) ); + xKey.get(), cppu::UnoType<XRegistryKey>::get() ); pUComponentFactory = (*((CreateComponentFactoryFunc)pSym))( rImplName.getStr(), pUSFactory, pUKey ); @@ -293,7 +293,7 @@ Reference< XSingleServiceFactory > loadLibComponentFactory( { XSingleServiceFactory * pXFactory = (XSingleServiceFactory *)aUno2Cpp.mapInterface( - pUComponentFactory, ::getCppuType( (const Reference< XSingleServiceFactory > *)0 ) ); + pUComponentFactory, cppu::UnoType<XSingleServiceFactory>::get() ); (*pUComponentFactory->release)( pUComponentFactory ); if (pXFactory) @@ -385,7 +385,7 @@ static void createInstance( Reference< T > & rxOut, buf.append( "service instance \"" ); buf.append( rServiceName ); buf.append( "\" does not support demanded interface \"" ); - const Type & rType = ::getCppuType( (const Reference< T > *)0 ); + const Type & rType = cppu::UnoType<T>::get(); buf.append( rType.getTypeName() ); buf.append( "\"!" ); throw RuntimeException( buf.makeStringAndClear() ); @@ -563,8 +563,8 @@ static void benchmark( sal_Int64 i; sal_uInt32 tStart, tEnd; - const Type & rKnownType = ::getCppuType( (const Reference< XPerformanceTest > *)0 ); - const Type & rUnKnownType = ::getCppuType( (const Reference< XSet > *)0 ); + const Type & rKnownType = cppu::UnoType<XPerformanceTest>::get(); + const Type & rUnKnownType = cppu::UnoType<XSet>::get(); ComplexTypes aDummyStruct; @@ -1057,7 +1057,7 @@ sal_Int32 TestImpl::run( const Sequence< OUString > & rArgs ) Reference< XInterface > xMapped; Reference< XInterface > xDirect( getDirect() ); aMapping.mapInterface( reinterpret_cast< void ** >( &xMapped ), xDirect.get(), - ::getCppuType( &xDirect ) ); + cppu::UnoType<decltype(xDirect)>::get() ); if (! xMapped.is()) throw RuntimeException("mapping object failed!" ); |