diff options
author | Noel Grandin <noel@peralex.com> | 2013-11-04 14:00:40 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-11-11 11:21:26 +0200 |
commit | e52779d2f8722c713f72aedbf475267440d729f0 (patch) | |
tree | 0f2f15b2a7645e0b75f8057c96c90e05e1a6e7df /io | |
parent | e9c4ee996d5a6bf895072613ac4e488346ee5b05 (diff) |
remove unnecessary use of OUString constructor
Change-Id: Ifb220af71857ddacd64e8204fb6d3e4aad8eef71
Diffstat (limited to 'io')
-rw-r--r-- | io/source/acceptor/acc_pipe.cxx | 9 | ||||
-rw-r--r-- | io/source/acceptor/acceptor.cxx | 9 | ||||
-rw-r--r-- | io/test/stm/testfactreg.cxx | 36 |
3 files changed, 25 insertions, 29 deletions
diff --git a/io/source/acceptor/acc_pipe.cxx b/io/source/acceptor/acc_pipe.cxx index 8f713e713185..9ff92addcba6 100644 --- a/io/source/acceptor/acc_pipe.cxx +++ b/io/source/acceptor/acc_pipe.cxx @@ -159,8 +159,7 @@ namespace io_acceptor m_pipe = Pipe( m_sPipeName.pData , osl_Pipe_CREATE , osl::Security() ); if( ! m_pipe.is() ) { - OUString error = OUString("io.acceptor: Couldn't setup pipe "); - error += m_sPipeName; + OUString error = "io.acceptor: Couldn't setup pipe " + m_sPipeName; throw ConnectionSetupException( error, Reference< XInterface > () ); } } @@ -174,8 +173,7 @@ namespace io_acceptor } if( ! pipe.is() ) { - OUString error = OUString("io.acceptor: pipe already closed"); - error += m_sPipeName; + OUString error = "io.acceptor: pipe already closed" + m_sPipeName; throw ConnectionSetupException( error, Reference< XInterface > () ); } PipeConnection *pConn = new PipeConnection( m_sConnectionDescription ); @@ -194,8 +192,7 @@ namespace io_acceptor } else { - OUString error = OUString("io.acceptor: Couldn't setup pipe "); - error += m_sPipeName; + OUString error = "io.acceptor: Couldn't setup pipe " + m_sPipeName; throw ConnectionSetupException( error, Reference< XInterface > ()); } } diff --git a/io/source/acceptor/acceptor.cxx b/io/source/acceptor/acceptor.cxx index ddcb99664dec..089d08199452 100644 --- a/io/source/acceptor/acceptor.cxx +++ b/io/source/acceptor/acceptor.cxx @@ -137,7 +137,7 @@ namespace io_acceptor m_sLastDescription != sConnectionDescription ) { // instantiate another acceptor for different ports - OUString sMessage = OUString("acceptor::accept called multiple times with different conncetion strings\n" ); + OUString sMessage = "acceptor::accept called multiple times with different conncetion strings\n"; throw ConnectionSetupException( sMessage, Reference< XInterface > () ); } @@ -177,7 +177,7 @@ namespace io_acceptor aHost = aDesc.getParameter( OUString("host")); else - aHost = OUString("localhost"); + aHost = "localhost"; sal_uInt16 nPort = static_cast< sal_uInt16 >( aDesc.getParameter( OUString("port")). @@ -205,8 +205,7 @@ namespace io_acceptor } else { - OUString delegatee = OUString("com.sun.star.connection.Acceptor."); - delegatee += aDesc.getName(); + OUString delegatee = "com.sun.star.connection.Acceptor." + aDesc.getName(); OSL_TRACE( "trying to get service %s\n", @@ -282,7 +281,7 @@ namespace io_acceptor Sequence< OUString > acceptor_getSupportedServiceNames() { Sequence< OUString > seqNames(1); - seqNames.getArray()[0] = OUString(SERVICE_NAME); + seqNames.getArray()[0] = SERVICE_NAME; return seqNames; } diff --git a/io/test/stm/testfactreg.cxx b/io/test/stm/testfactreg.cxx index bec6821bee00..2d7e9e979d0e 100644 --- a/io/test/stm/testfactreg.cxx +++ b/io/test/stm/testfactreg.cxx @@ -46,57 +46,57 @@ sal_Bool SAL_CALL component_writeInfo( Reference< XRegistryKey > xKey( reinterpret_cast< XRegistryKey * >( pRegistryKey ) ); - OUString str = OUString("/") + + OUString str = "/" + OPipeTest_getImplementationName() + - OUString("/UNO/SERVICES"); + "/UNO/SERVICES"; Reference< XRegistryKey > xNewKey = xKey->createKey( str ); xNewKey->createKey( OPipeTest_getServiceName() ); - str = OUString("/") + + str = "/" + OPumpTest_getImplementationName() + - OUString("/UNO/SERVICES"); + "/UNO/SERVICES"; xNewKey = xKey->createKey( str ); xNewKey->createKey( OPumpTest_getServiceName() ); - str = OUString("/") + + str = "/" + ODataStreamTest_getImplementationName(1) + - OUString("/UNO/SERVICES"); + "/UNO/SERVICES"; xNewKey = xKey->createKey( str ); xNewKey->createKey( ODataStreamTest_getServiceName(1) ); - str = OUString("/") + + str = "/" + ODataStreamTest_getImplementationName(2) + - OUString("/UNO/SERVICES"); + "/UNO/SERVICES"; xNewKey = xKey->createKey( str ); xNewKey->createKey( ODataStreamTest_getServiceName(2) ); - str = OUString("/") + + str = "/" + OObjectStreamTest_getImplementationName(1) + - OUString("/UNO/SERVICES"); + "/UNO/SERVICES"; xNewKey = xKey->createKey( str ); xNewKey->createKey( OObjectStreamTest_getServiceName(1) ); - str = OUString("/") + + str = "/" + OObjectStreamTest_getImplementationName(2) + - OUString("/UNO/SERVICES"); + "/UNO/SERVICES"; xNewKey = xKey->createKey( str ); xNewKey->createKey( OObjectStreamTest_getServiceName(2) ); - str = OUString("/") + + str = "/" + OMarkableOutputStreamTest_getImplementationName() + - OUString("/UNO/SERVICES"); + "/UNO/SERVICES"; xNewKey = xKey->createKey( str ); xNewKey->createKey( OMarkableOutputStreamTest_getServiceName() ); - str = OUString("/") + + str = "/" + OMarkableInputStreamTest_getImplementationName() + - OUString("/UNO/SERVICES"); + "/UNO/SERVICES"; xNewKey = xKey->createKey( str ); xNewKey->createKey( OMarkableInputStreamTest_getServiceName() ); - str = OUString("/") + + str = "/" + OMyPersistObject_getImplementationName() + - OUString("/UNO/SERVICES"); + "/UNO/SERVICES"; xNewKey = xKey->createKey( str ); xNewKey->createKey( OMyPersistObject_getServiceName() ); |