diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-11-27 20:37:42 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-11-28 09:55:03 +0000 |
commit | 6f33482f8f4329b6c9874397bdb67c1b958b69c2 (patch) | |
tree | ba19bc4bff6ddbd87354f90a61615cf5f4892c5a /automation | |
parent | c95a10ca2079cdc33d09189aef0a8788eab274ff (diff) |
ByteString->rtl::OUStringToOString
Diffstat (limited to 'automation')
-rw-r--r-- | automation/source/communi/communi.cxx | 2 | ||||
-rw-r--r-- | automation/source/server/server.cxx | 2 | ||||
-rw-r--r-- | automation/source/server/statemnt.cxx | 6 | ||||
-rw-r--r-- | automation/source/simplecm/simplecm.cxx | 12 | ||||
-rw-r--r-- | automation/source/testtool/comm_bas.cxx | 2 | ||||
-rw-r--r-- | automation/source/testtool/objtest.cxx | 10 | ||||
-rw-r--r-- | automation/source/testtool/tcommuni.cxx | 2 |
7 files changed, 18 insertions, 18 deletions
diff --git a/automation/source/communi/communi.cxx b/automation/source/communi/communi.cxx index 802c07f3a9c0..4eb45a4b1071 100644 --- a/automation/source/communi/communi.cxx +++ b/automation/source/communi/communi.cxx @@ -394,7 +394,7 @@ CommunicationManagerClient::CommunicationManagerClient( sal_Bool bUseMultiChanne : MultiCommunicationManager( bUseMultiChannel ) { ByteString aApplication("Something inside "); - aApplication.Append( ByteString( DirEntry( Application::GetAppFileName() ).GetName(), osl_getThreadTextEncoding() ) ); + aApplication.Append( rtl::OUStringToOString( DirEntry( Application::GetAppFileName() ).GetName(), osl_getThreadTextEncoding() ) ); SetApplication( aApplication ); } diff --git a/automation/source/server/server.cxx b/automation/source/server/server.cxx index 46b25b0a7c66..7418e88b8ac5 100644 --- a/automation/source/server/server.cxx +++ b/automation/source/server/server.cxx @@ -206,7 +206,7 @@ sal_uLong RemoteControlCommunicationManager::GetPort() Config aConf(Config::GetConfigName( aIniFileDir, CUniString("testtool") )); aConf.SetGroup("Communication"); - ByteString aNoTesttoolKey( ByteString("Exclude_").Append( ByteString( Application::GetAppFileName(), RTL_TEXTENCODING_UTF8 ) ) ); + rtl::OString aNoTesttoolKey( ByteString("Exclude_").Append( rtl::OUStringToOString(Application::GetAppFileName(), RTL_TEXTENCODING_UTF8) ) ); // -notesttool for ( i = 0 ; i < Application::GetCommandLineParamCount() ; i++ ) { diff --git a/automation/source/server/statemnt.cxx b/automation/source/server/statemnt.cxx index 310afe866b84..15c2c5357d1a 100644 --- a/automation/source/server/statemnt.cxx +++ b/automation/source/server/statemnt.cxx @@ -2502,10 +2502,10 @@ sal_Bool StatementCommand::Execute() case RC_Assert: { ByteString aAssertion( "Diese Assertion wurde vom Testtool per Befehl ausgel�st" ); - aAssertion = ByteString( String( aAssertion, RTL_TEXTENCODING_MS_1252 ), RTL_TEXTENCODING_UTF8 ); - DBG_ASSERT( !aString1.Len(), ByteString( aString1, RTL_TEXTENCODING_UTF8 ).GetBuffer() ); + aAssertion = rtl::OUStringToOString(String(aAssertion, RTL_TEXTENCODING_MS_1252), RTL_TEXTENCODING_UTF8 ); + DBG_ASSERT( !aString1.Len(), rtl::OUStringToOString( aString1, RTL_TEXTENCODING_UTF8 ).getStr() ); DBG_ASSERT( aString1.Len(), aAssertion.GetBuffer() ); - OSL_ENSURE( !aString1.Len(), ByteString( aString1, RTL_TEXTENCODING_UTF8 ).GetBuffer() ); + OSL_ENSURE( !aString1.Len(), rtl::OUStringToOString( aString1, RTL_TEXTENCODING_UTF8 ).getStr() ); OSL_ENSURE( aString1.Len(), aAssertion.GetBuffer() ); } break; diff --git a/automation/source/simplecm/simplecm.cxx b/automation/source/simplecm/simplecm.cxx index fd2c9d04d7a2..bd1e83a69554 100644 --- a/automation/source/simplecm/simplecm.cxx +++ b/automation/source/simplecm/simplecm.cxx @@ -195,7 +195,7 @@ ByteString SimpleCommunicationLinkViaSocket::GetCommunicationPartner( CM_NameTyp pStreamSocket->getPeerAddr( *pPeerAdr ); osl_getDottedInetAddrOfSocketAddr( pPeerAdr->getHandle(), &aDotted.pData); delete pPeerAdr; - return ByteString( UniString(aDotted), RTL_TEXTENCODING_UTF8 ); + return rtl::OUStringToOString(aDotted, RTL_TEXTENCODING_UTF8); } //break; case CM_FQDN: @@ -203,7 +203,7 @@ ByteString SimpleCommunicationLinkViaSocket::GetCommunicationPartner( CM_NameTyp if ( !aCommunicationPartner.Len() ) { rtl::OUString aFQDN( pStreamSocket->getPeerHost()); - aCommunicationPartner = ByteString( UniString(aFQDN), RTL_TEXTENCODING_UTF8 ); + aCommunicationPartner = rtl::OUStringToOString(aFQDN, RTL_TEXTENCODING_UTF8); } return aCommunicationPartner; } @@ -226,7 +226,7 @@ ByteString SimpleCommunicationLinkViaSocket::GetMyName( CM_NameType eType ) pStreamSocket->getPeerAddr( *pPeerAdr ); osl_getDottedInetAddrOfSocketAddr( pPeerAdr->getHandle(), &aDotted.pData); delete pPeerAdr; - return ByteString( UniString(aDotted), RTL_TEXTENCODING_UTF8 ); + return rtl::OUStringToOString(aDotted, RTL_TEXTENCODING_UTF8); } //break; case CM_FQDN: @@ -234,7 +234,7 @@ ByteString SimpleCommunicationLinkViaSocket::GetMyName( CM_NameType eType ) if ( !aMyName.Len() ) { rtl::OUString aFQDN(pStreamSocket->getLocalHost()); - aMyName = ByteString( UniString(aFQDN), RTL_TEXTENCODING_UTF8 ); + aMyName = rtl::OUStringToOString(aFQDN, RTL_TEXTENCODING_UTF8); } return aMyName; } @@ -368,8 +368,8 @@ sal_Bool CommunicationManager::StartCommunication( ByteString aHost, sal_uLong n ByteString CommunicationManager::GetMyName( CM_NameType ) { - rtl::OUString aHostname( osl::SocketAddr::getLocalHostname()); - return ByteString( UniString(aHostname), RTL_TEXTENCODING_UTF8 ); + rtl::OUString aHostname(osl::SocketAddr::getLocalHostname()); + return rtl::OUStringToOString(aHostname, RTL_TEXTENCODING_UTF8); } void CommunicationManager::CallConnectionOpened( CommunicationLink* pCL ) diff --git a/automation/source/testtool/comm_bas.cxx b/automation/source/testtool/comm_bas.cxx index ef011a793d44..7d52c681eb0b 100644 --- a/automation/source/testtool/comm_bas.cxx +++ b/automation/source/testtool/comm_bas.cxx @@ -334,7 +334,7 @@ void CommunicationWrapper::Events( String aType, CommunicationLink* pLink ) void CommunicationWrapper::MStartCommunication( SbxVariable* pVar, SbxArray* pPar, sal_Bool /*bWrite*/ ) { // CommunicationLink StartCommunication( Host, Port ) m_bCatchOpen = sal_True; - if ( m_pManager->StartCommunication( ByteString( pPar->Get( 1 )->GetString(), RTL_TEXTENCODING_UTF8 ), pPar->Get( 2 )->GetULong() ) ) + if ( m_pManager->StartCommunication( rtl::OUStringToOString( pPar->Get( 1 )->GetString(), RTL_TEXTENCODING_UTF8 ), pPar->Get( 2 )->GetULong() ) ) { while ( !m_pNewLink ) GetpApp()->Reschedule(); diff --git a/automation/source/testtool/objtest.cxx b/automation/source/testtool/objtest.cxx index 04d6799209b5..af677dc5e43f 100644 --- a/automation/source/testtool/objtest.cxx +++ b/automation/source/testtool/objtest.cxx @@ -330,7 +330,7 @@ void TestToolObj::LoadIniFile() NEWOLD( "LogBaseDir", "LogBasisverzeichnis" ) String aLFB; - GETSET( aLFB, "LogBaseDir", ByteString( aFB, RTL_TEXTENCODING_UTF8 ) ); + GETSET( aLFB, "LogBaseDir", rtl::OUStringToOString(aFB, RTL_TEXTENCODING_UTF8) ); pImpl->aLogFileBase = DirEntry(aLFB); NEWOLD( "HIDDir", "HIDVerzeichnis" ) @@ -2344,10 +2344,10 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&, String aSource,aDest; aSource = rPar->Get(1)->GetString(); #ifdef UNX - ByteString aByteSource( aSource, osl_getThreadTextEncoding() ); + rtl::OString aByteSource(rtl::OUStringToOString(aSource, osl_getThreadTextEncoding())); char cDest[1024]; int nLen = 0; - if ( ( nLen = readlink( aByteSource.GetBuffer(), cDest, sizeof(cDest) ) ) >= 0 ) + if ( ( nLen = readlink( aByteSource.getStr(), cDest, sizeof(cDest) ) ) >= 0 ) { aDest = String( cDest, nLen, osl_getThreadTextEncoding() ); } @@ -2391,7 +2391,7 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&, { if ( !pImpl->pHttpRequest ) pImpl->pHttpRequest = new HttpRequest; - pImpl->pHttpRequest->SetRequest( ByteString( rPar->Get(1)->GetString(), RTL_TEXTENCODING_ASCII_US ), ByteString( rPar->Get(2)->GetString(), RTL_TEXTENCODING_ASCII_US ), rPar->Get(3)->GetUShort() ); + pImpl->pHttpRequest->SetRequest( rtl::OUStringToOString( rPar->Get(1)->GetString(), RTL_TEXTENCODING_ASCII_US ), rtl::OUStringToOString( rPar->Get(2)->GetString(), RTL_TEXTENCODING_ASCII_US ), rPar->Get(3)->GetUShort() ); if ( pImpl->pHttpRequest->Execute() ) { @@ -2418,7 +2418,7 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&, { if ( !pImpl->pHttpRequest ) pImpl->pHttpRequest = new HttpRequest; - pImpl->pHttpRequest->SetProxy( ByteString( rPar->Get(1)->GetString(), RTL_TEXTENCODING_ASCII_US ), rPar->Get(2)->GetUShort() ); + pImpl->pHttpRequest->SetProxy( rtl::OUStringToOString( rPar->Get(1)->GetString(), RTL_TEXTENCODING_ASCII_US ), rPar->Get(2)->GetUShort() ); } else SetError( SbERR_BAD_NUMBER_OF_ARGS ); diff --git a/automation/source/testtool/tcommuni.cxx b/automation/source/testtool/tcommuni.cxx index 7cc85bfed891..2e0d7b8539ff 100644 --- a/automation/source/testtool/tcommuni.cxx +++ b/automation/source/testtool/tcommuni.cxx @@ -52,7 +52,7 @@ CommunicationManagerClientViaSocketTT::CommunicationManagerClientViaSocketTT() sal_Bool CommunicationManagerClientViaSocketTT::StartCommunication() { bApplicationStarted = sal_False; - return CommunicationManagerClientViaSocket::StartCommunication( ByteString( GetHostConfig(), RTL_TEXTENCODING_UTF8 ), GetTTPortConfig() ); + return CommunicationManagerClientViaSocket::StartCommunication( rtl::OUStringToOString( GetHostConfig(), RTL_TEXTENCODING_UTF8 ), GetTTPortConfig() ); } |