summaryrefslogtreecommitdiff
path: root/basic/source/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'basic/source/runtime')
-rw-r--r--basic/source/runtime/iosys.cxx2
-rw-r--r--basic/source/runtime/methods.cxx9
-rw-r--r--basic/source/runtime/methods1.cxx9
-rw-r--r--basic/source/runtime/step0.cxx8
-rw-r--r--basic/source/runtime/step2.cxx2
5 files changed, 16 insertions, 14 deletions
diff --git a/basic/source/runtime/iosys.cxx b/basic/source/runtime/iosys.cxx
index cbdc27f15a23..2b14640a0d43 100644
--- a/basic/source/runtime/iosys.cxx
+++ b/basic/source/runtime/iosys.cxx
@@ -913,7 +913,7 @@ void SbiIoSystem::ReadCon( ByteString& rIn )
String aPromptStr( aPrompt, osl_getThreadTextEncoding() );
SbiInputDialog aDlg( NULL, aPromptStr );
if( aDlg.Execute() )
- rIn = ByteString( aDlg.GetInput(), osl_getThreadTextEncoding() );
+ rIn = rtl::OUStringToOString(aDlg.GetInput(), osl_getThreadTextEncoding());
else
nError = SbERR_USER_ABORT;
aPrompt.Erase();
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index 37c690609bd5..251454b2583b 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -1714,8 +1714,8 @@ RTLFUNC(Val)
nRadix = 8;
if ( nRadix != 10 )
{
- ByteString aByteStr( aStr, osl_getThreadTextEncoding() );
- sal_Int16 nlResult = (sal_Int16)strtol( aByteStr.GetBuffer()+2, &pEndPtr, nRadix);
+ rtl::OString aByteStr(rtl::OUStringToOString(aStr, osl_getThreadTextEncoding()));
+ sal_Int16 nlResult = (sal_Int16)strtol( aByteStr.getStr()+2, &pEndPtr, nRadix);
nResult = (double)nlResult;
}
}
@@ -2838,8 +2838,9 @@ RTLFUNC(GetAttr)
aEntry.ToAbs();
// #57064 extract the real-path for virtual URLs
- ByteString aByteStrFullPath( aEntry.GetFull(), osl_getThreadTextEncoding() );
- DWORD nRealFlags = GetFileAttributes (aByteStrFullPath.GetBuffer());
+ rtl::OString aByteStrFullPath(rtl::OUStringToOString(aEntry.GetFull(),
+ osl_getThreadTextEncoding()));
+ DWORD nRealFlags = GetFileAttributes (aByteStrFullPath.getStr());
if (nRealFlags != 0xffffffff)
{
if (nRealFlags == FILE_ATTRIBUTE_NORMAL)
diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx
index 23431c9c1cfa..f4bc91f44661 100644
--- a/basic/source/runtime/methods1.cxx
+++ b/basic/source/runtime/methods1.cxx
@@ -997,8 +997,8 @@ sal_Bool lcl_WriteSbxVariable( const SbxVariable& rVar, SvStream* pStrm,
{
// without any length information! without end-identifier!
// What does that mean for Unicode?! Choosing conversion to ByteString...
- ByteString aByteStr( rStr, osl_getThreadTextEncoding() );
- *pStrm << (const char*)aByteStr.GetBuffer();
+ rtl::OString aByteStr(rtl::OUStringToOString(rStr, osl_getThreadTextEncoding()));
+ *pStrm << (const char*)aByteStr.getStr();
}
}
break;
@@ -1252,8 +1252,9 @@ RTLFUNC(Environ)
}
String aResult;
// should be ANSI but that's not possible under Win16 in the DLL
- ByteString aByteStr( rPar.Get(1)->GetString(), osl_getThreadTextEncoding() );
- const char* pEnvStr = getenv( aByteStr.GetBuffer() );
+ rtl::OString aByteStr(rtl::OUStringToOString(rPar.Get(1)->GetString(),
+ osl_getThreadTextEncoding()));
+ const char* pEnvStr = getenv(aByteStr.getStr());
if ( pEnvStr )
aResult = String::CreateFromAscii( pEnvStr );
rPar.Get(0)->PutString( aResult );
diff --git a/basic/source/runtime/step0.cxx b/basic/source/runtime/step0.cxx
index f96364a54026..4467322d0827 100644
--- a/basic/source/runtime/step0.cxx
+++ b/basic/source/runtime/step0.cxx
@@ -1285,7 +1285,7 @@ void SbiRuntime::StepPRINT() // print TOS
if( p->GetType() >= SbxINTEGER && p->GetType() <= SbxDOUBLE )
s = ' '; // one blank before
s += s1;
- ByteString aByteStr( s, osl_getThreadTextEncoding() );
+ rtl::OString aByteStr(rtl::OUStringToOString(s, osl_getThreadTextEncoding()));
pIosys->Write( aByteStr );
Error( pIosys->GetError() );
}
@@ -1299,7 +1299,7 @@ void SbiRuntime::StepPRINTF() // print TOS in field
s = ' ';
s += s1;
s.Expand( 14, ' ' );
- ByteString aByteStr( s, osl_getThreadTextEncoding() );
+ rtl::OString aByteStr(rtl::OUStringToOString(s, osl_getThreadTextEncoding()));
pIosys->Write( aByteStr );
Error( pIosys->GetError() );
}
@@ -1323,7 +1323,7 @@ void SbiRuntime::StepWRITE() // write TOS
s += p->GetString();
if( ch )
s += ch;
- ByteString aByteStr( s, osl_getThreadTextEncoding() );
+ rtl::OString aByteStr(rtl::OUStringToOString(s, osl_getThreadTextEncoding()));
pIosys->Write( aByteStr );
Error( pIosys->GetError() );
}
@@ -1350,7 +1350,7 @@ void SbiRuntime::StepRENAME() // Rename Tos+1 to Tos
void SbiRuntime::StepPROMPT()
{
SbxVariableRef p = PopVar();
- ByteString aStr( p->GetString(), osl_getThreadTextEncoding() );
+ rtl::OString aStr(rtl::OUStringToOString(p->GetString(), osl_getThreadTextEncoding()));
pIosys->SetPrompt( aStr );
}
diff --git a/basic/source/runtime/step2.cxx b/basic/source/runtime/step2.cxx
index b18347dc3937..b3dcb6f1b27a 100644
--- a/basic/source/runtime/step2.cxx
+++ b/basic/source/runtime/step2.cxx
@@ -899,7 +899,7 @@ void SbiRuntime::StepOPEN( sal_uInt32 nOp1, sal_uInt32 nOp2 )
SbxVariableRef pLen = PopVar();
short nBlkLen = pLen->GetInteger();
short nChan = pChan->GetInteger();
- ByteString aName( pName->GetString(), osl_getThreadTextEncoding() );
+ rtl::OString aName(rtl::OUStringToOString(pName->GetString(), osl_getThreadTextEncoding()));
pIosys->Open( nChan, aName, static_cast<short>( nOp1 ),
static_cast<short>( nOp2 ), nBlkLen );
Error( pIosys->GetError() );