diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-04-01 08:35:33 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-04-01 08:35:33 +0200 |
commit | fb088cdd8d6aed2f82b13b03d8ddb6f7901c5ef2 (patch) | |
tree | a1be19894c8574a84cd9da75648cc971fe4d2b42 /bridges/test | |
parent | 4f2a236da4cb21b353baee2498a87bd08a1bfac5 (diff) |
Replace remaining getCppuType et al with cppu::UnoType
Change-Id: I37d1a939c1a98f77152ed90dfb201446101f3157
Diffstat (limited to 'bridges/test')
-rw-r--r-- | bridges/test/java_uno/any/transport.cxx | 6 | ||||
-rw-r--r-- | bridges/test/java_uno/equals/testequals.cxx | 13 | ||||
-rw-r--r-- | bridges/test/testcomp.cxx | 13 |
3 files changed, 12 insertions, 20 deletions
diff --git a/bridges/test/java_uno/any/transport.cxx b/bridges/test/java_uno/any/transport.cxx index 2f943f9d13e1..380abf4f5ecd 100644 --- a/bridges/test/java_uno/any/transport.cxx +++ b/bridges/test/java_uno/any/transport.cxx @@ -56,8 +56,8 @@ extern "C" SAL_JNI_EXPORT jobject JNICALL Java_test_java_1uno_anytest_TestJni_cr SAL_THROW_EXTERN_C() { // publish some idl types - ::getCppuType( (Reference< XTransport > const *)0 ); - ::getCppuType( (Reference< ::test::java_uno::anytest::DerivedInterface > const *)0 ); + cppu::UnoType< XTransport >::get(); + cppu::UnoType<test::java_uno::anytest::DerivedInterface>::get(); Reference< XTransport > xRet( new Transport() ); @@ -87,7 +87,7 @@ extern "C" SAL_JNI_EXPORT jobject JNICALL Java_test_java_1uno_anytest_TestJni_cr // map interface Mapping mapping( cpp_env.get(), java_env.get() ); OSL_ASSERT( mapping.is() ); - jobject jo_global = (jobject)mapping.mapInterface( xRet.get(), ::getCppuType( &xRet ) ); + jobject jo_global = (jobject)mapping.mapInterface( xRet.get(), cppu::UnoType<decltype(xRet)>::get() ); OSL_ASSERT( 0 != jo_global ); // return diff --git a/bridges/test/java_uno/equals/testequals.cxx b/bridges/test/java_uno/equals/testequals.cxx index 407872948664..34ca8c0d9d82 100644 --- a/bridges/test/java_uno/equals/testequals.cxx +++ b/bridges/test/java_uno/equals/testequals.cxx @@ -130,16 +130,9 @@ css::uno::Reference< css::uno::XInterface > Service::createInstance( throw (css::uno::Exception) { // Make types known: - getCppuType( - static_cast< - css::uno::Reference< test::java_uno::equals::XBase > const * >(0)); - getCppuType( - static_cast< - css::uno::Reference< test::java_uno::equals::XDerived > const * >(0)); - getCppuType( - static_cast< - css::uno::Reference< test::java_uno::equals::XTestInterface > const * >( - 0)); + cppu::UnoType<test::java_uno::equals::XBase>::get(); + cppu::UnoType<test::java_uno::equals::XDerived>::get(); + cppu::UnoType<test::java_uno::equals::XTestInterface>::get(); return static_cast< cppu::OWeakObject * >(new Service(rContext)); } diff --git a/bridges/test/testcomp.cxx b/bridges/test/testcomp.cxx index ebf097197c6b..376dab71f6f9 100644 --- a/bridges/test/testcomp.cxx +++ b/bridges/test/testcomp.cxx @@ -122,20 +122,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; } @@ -615,8 +615,7 @@ void testAllTypes( const Reference < XCallMe > & rRCallMe ) void testRemote( const Reference< XInterface > &rRemote ) { - char a; - getCppuType( (sal_Int8*)&a ); + cppu::UnoType<sal_Int8>::get(); Reference< XTestFactory > rRFact( rRemote , UNO_QUERY ); if( ! rRFact.is() ) |