From 9601b63509f07069b90144f53b2e55f74d04a483 Mon Sep 17 00:00:00 2001 From: Norbert Thiebaud Date: Fri, 1 Jun 2012 09:15:09 -0500 Subject: targeted string re-work Change-Id: Ibe5c739c3066f3e706a44b64d4ad775abde9662c --- io/test/testconnection.cxx | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'io') diff --git a/io/test/testconnection.cxx b/io/test/testconnection.cxx index 708daf3283de..64979e07b76a 100644 --- a/io/test/testconnection.cxx +++ b/io/test/testconnection.cxx @@ -180,46 +180,46 @@ void testConnection( const OUString &sConnectionDescription , int SAL_CALL main( int argc, char * argv[] ) { Reference< XMultiServiceFactory > xMgr( - createRegistryServiceFactory( OUString( RTL_CONSTASCII_USTRINGPARAM("applicat.rdb")) ) ); + createRegistryServiceFactory( OUString( "applicat.rdb") ) ); Reference< XImplementationRegistration > xImplReg( - xMgr->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.registry.ImplementationRegistration")) ), UNO_QUERY ); + xMgr->createInstance( OUString("com.sun.star.registry.ImplementationRegistration") ), UNO_QUERY ); OSL_ENSURE( xImplReg.is(), "### no impl reg!" ); OUString aLibName = - OUString(RTL_CONSTASCII_USTRINGPARAM( "connector.uno" SAL_DLLEXTENSION )); + OUString( "connector.uno" SAL_DLLEXTENSION ); xImplReg->registerImplementation( - OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.loader.SharedLibrary")), aLibName, Reference< XSimpleRegistry >() ); + OUString("com.sun.star.loader.SharedLibrary"), aLibName, Reference< XSimpleRegistry >() ); - aLibName = OUString(RTL_CONSTASCII_USTRINGPARAM( "acceptor.uno" SAL_DLLEXTENSION )); + aLibName = OUString( "acceptor.uno" SAL_DLLEXTENSION ); xImplReg->registerImplementation( - OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.loader.SharedLibrary")), aLibName, Reference< XSimpleRegistry >() ); + OUString("com.sun.star.loader.SharedLibrary"), aLibName, Reference< XSimpleRegistry >() ); Reference < XAcceptor > rAcceptor( xMgr->createInstance( - OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.connection.Acceptor")) ) , UNO_QUERY ); + OUString("com.sun.star.connection.Acceptor") ) , UNO_QUERY ); Reference < XAcceptor > rAcceptorPipe( xMgr->createInstance( - OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.connection.Acceptor")) ) , UNO_QUERY ); + OUString("com.sun.star.connection.Acceptor") ) , UNO_QUERY ); Reference < XConnector > rConnector( - xMgr->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.connection.Connector")) ) , UNO_QUERY ); + xMgr->createInstance( OUString("com.sun.star.connection.Connector") ) , UNO_QUERY ); printf( "Testing sockets" ); fflush( stdout ); - testConnection( OUString(RTL_CONSTASCII_USTRINGPARAM("socket,host=localhost,port=2001")), rAcceptor , rConnector ); + testConnection( OUString("socket,host=localhost,port=2001"), rAcceptor , rConnector ); printf( " Done\n" ); printf( "Testing pipe" ); fflush( stdout ); - testConnection( OUString(RTL_CONSTASCII_USTRINGPARAM("pipe,name=bla")) , rAcceptorPipe , rConnector ); + testConnection( OUString("pipe,name=bla") , rAcceptorPipe , rConnector ); printf( " Done\n" ); // check, if errornous strings make any problem rAcceptor = Reference< XAcceptor > ( - xMgr->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.connection.Acceptor")) ), + xMgr->createInstance( OUString("com.sun.star.connection.Acceptor") ), UNO_QUERY ); try @@ -251,14 +251,14 @@ int SAL_CALL main( int argc, char * argv[] ) } - MyThread thread( rAcceptor , OUString(RTL_CONSTASCII_USTRINGPARAM("socket,host=localhost,port=2001")) ); + MyThread thread( rAcceptor , OUString("socket,host=localhost,port=2001") ); thread.create(); TimeValue value = {0,1}; osl_waitThread( &value ); try { - rAcceptor->accept( OUString(RTL_CONSTASCII_USTRINGPARAM("socket,host=localhost,port=2001")) ); + rAcceptor->accept( OUString("socket,host=localhost,port=2001") ); OSL_FAIL( "already existing exception expected" ); } catch( AlreadyAcceptingException & ) -- cgit v1.2.3