diff options
author | Jean-Noël Rouvignac <jn.rouvignac@gmail.com> | 2013-01-30 11:44:23 +0100 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2013-01-30 12:54:40 +0000 |
commit | 97eb8a6e0eb830f37dcba64a51d725aab4c5ff53 (patch) | |
tree | a1a95b8249052d846a997ad1729758168d6a3b24 /cppuhelper/test | |
parent | f8569cd9a28a3a8856dba4ad53218aa6cc073521 (diff) |
Removed several useless macros: A2OU, A2S, C2U, C2S, OUSTR, OUSTRING
Change-Id: Ie859cb2dfdc7103c379fce56be88eef8fe390afd
Reviewed-on: https://gerrit.libreoffice.org/1924
Tested-by: Luboš Luňák <l.lunak@suse.cz>
Reviewed-by: Luboš Luňák <l.lunak@suse.cz>
Diffstat (limited to 'cppuhelper/test')
-rw-r--r-- | cppuhelper/test/cfg_test.cxx | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/cppuhelper/test/cfg_test.cxx b/cppuhelper/test/cfg_test.cxx index 7649a37eb7b9..6dfece4a873f 100644 --- a/cppuhelper/test/cfg_test.cxx +++ b/cppuhelper/test/cfg_test.cxx @@ -40,8 +40,6 @@ #include <com/sun/star/registry/XImplementationRegistration.hpp> -#define OUSTR(x) ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(x) ) - using namespace ::cppu; using namespace ::rtl; @@ -101,17 +99,17 @@ ServiceImpl0::ServiceImpl0( Reference< XComponentContext > const & xContext ) SA // service properties OSL_VERIFY( m_xContext->getValueByName( - OUSTR("/services/com.sun.star.bootstrap.TestComponent0/context-properties/serviceprop0") ) >>= n ); + "/services/com.sun.star.bootstrap.TestComponent0/context-properties/serviceprop0" ) >>= n ); OSL_VERIFY( n == 13 ); OSL_VERIFY( m_xContext->getValueByName( - OUSTR("/services/com.sun.star.bootstrap.TestComponent0/context-properties/serviceprop1") ) >>= val ); + "/services/com.sun.star.bootstrap.TestComponent0/context-properties/serviceprop1" ) >>= val ); OSL_VERIFY( val == "value of serviceprop1" ); // impl properties OSL_VERIFY( m_xContext->getValueByName( - OUSTR("/implementations/com.sun.star.comp.bootstrap.TestComponent0/context-properties/implprop0") ) >>= n ); + "/implementations/com.sun.star.comp.bootstrap.TestComponent0/context-properties/implprop0" ) >>= n ); OSL_VERIFY( n == 15 ); OSL_VERIFY( m_xContext->getValueByName( - OUSTR("/implementations/com.sun.star.comp.bootstrap.TestComponent0/context-properties/implprop1") ) >>= val ); + "/implementations/com.sun.star.comp.bootstrap.TestComponent0/context-properties/implprop1" ) >>= val ); OSL_VERIFY( val == "value of implprop1" ); } // XInitialization @@ -238,32 +236,32 @@ SAL_IMPLEMENT_MAIN() Reference< lang::XMultiComponentFactory > xMgr( xContext->getServiceManager() ); // show what is in context - xContext->getValueByName( OUSTR("dump_maps") ); + xContext->getValueByName( "dump_maps" ); sal_Int32 n(0); - OSL_VERIFY( xContext->getValueByName( OUSTR("/global-context-properties/TestValue") ) >>= n ); + OSL_VERIFY( xContext->getValueByName( "/global-context-properties/TestValue" ) >>= n ); ::fprintf( stderr, "> n=%d\n", n ); Reference< XInterface > x; - OSL_VERIFY( !(xContext->getValueByName( OUSTR("/singletons/my_converter") ) >>= x) ); - OSL_VERIFY( xContext->getValueByName( OUSTR("/singletons/com.sun.star.script.theConverter") ) >>= x ); - OSL_VERIFY( xContext->getValueByName( OUSTR("/singletons/com.sun.star.bootstrap.theTestComponent0") ) >>= x ); + OSL_VERIFY( !(xContext->getValueByName( "/singletons/my_converter" ) >>= x) ); + OSL_VERIFY( xContext->getValueByName( "/singletons/com.sun.star.script.theConverter" ) >>= x ); + OSL_VERIFY( xContext->getValueByName( "/singletons/com.sun.star.bootstrap.theTestComponent0" ) >>= x ); ::fprintf( stderr, "> registering service...\n"); #if defined(SAL_W32) - OUString libName( OUSTR("cfg_test.dll") ); + OUString libName( "cfg_test.dll" ); #elif defined(SAL_UNX) - OUString libName( OUSTR("libcfg_test.so") ); + OUString libName( "libcfg_test.so" ); #endif Reference< registry::XImplementationRegistration > xImplReg( xMgr->createInstanceWithContext( - OUSTR("com.sun.star.registry.ImplementationRegistration"), xContext ), UNO_QUERY ); + "com.sun.star.registry.ImplementationRegistration", xContext ), UNO_QUERY ); OSL_ENSURE( xImplReg.is(), "### no impl reg!" ); xImplReg->registerImplementation( - OUSTR("com.sun.star.loader.SharedLibrary"), libName, + "com.sun.star.loader.SharedLibrary", libName, Reference< registry::XSimpleRegistry >() ); - OSL_VERIFY( (x = xMgr->createInstanceWithContext( OUSTR("com.sun.star.bootstrap.TestComponent0"), xContext )).is() ); - OSL_VERIFY( (x = xMgr->createInstanceWithContext( OUSTR("com.sun.star.bootstrap.TestComponent1"), xContext )).is() ); + OSL_VERIFY( (x = xMgr->createInstanceWithContext( "com.sun.star.bootstrap.TestComponent0", xContext )).is() ); + OSL_VERIFY( (x = xMgr->createInstanceWithContext( "com.sun.star.bootstrap.TestComponent1", xContext )).is() ); Reference< lang::XComponent > xComp( xContext, UNO_QUERY ); if (xComp.is()) |