summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2011-11-24 12:06:54 +0100
committerDavid Tardon <dtardon@redhat.com>2011-11-25 09:07:49 +0100
commitfba911fea7b87e332b8db9e511b875feedbcb59c (patch)
tree55e119a74d03fe61c4c7181dd295ed8cfa3d2427 /basic
parent20c8eb409e2b48d57f392c146f7414bab3551664 (diff)
gsl_getSystemTextEncoding -> osl_getThreadTextEncoding
Diffstat (limited to 'basic')
-rw-r--r--basic/source/classes/disas.cxx2
-rw-r--r--basic/source/classes/image.cxx4
-rw-r--r--basic/source/classes/sbxmod.cxx4
-rw-r--r--basic/source/comp/buffer.cxx2
-rw-r--r--basic/source/runtime/iosys.cxx10
-rw-r--r--basic/source/runtime/methods.cxx6
-rw-r--r--basic/source/runtime/methods1.cxx10
-rw-r--r--basic/source/runtime/step0.cxx10
-rw-r--r--basic/source/runtime/step2.cxx2
9 files changed, 25 insertions, 25 deletions
diff --git a/basic/source/classes/disas.cxx b/basic/source/classes/disas.cxx
index b50ce178116a..dba7661d6208 100644
--- a/basic/source/classes/disas.cxx
+++ b/basic/source/classes/disas.cxx
@@ -396,7 +396,7 @@ sal_Bool SbiDisas::DisasLine( String& rText )
SbMethod* pMeth = PTR_CAST(SbMethod,pMod->GetMethods()->Get( i ));
if( pMeth )
{
- aByteMethName = ByteString( pMeth->GetName(), gsl_getSystemTextEncoding() );
+ aByteMethName = ByteString( pMeth->GetName(), osl_getThreadTextEncoding() );
if( pMeth->GetId() == nPC )
{
p = aByteMethName.GetBuffer();
diff --git a/basic/source/classes/image.cxx b/basic/source/classes/image.cxx
index 84c6a25dab39..e06ee0745776 100644
--- a/basic/source/classes/image.cxx
+++ b/basic/source/classes/image.cxx
@@ -50,7 +50,7 @@ SbiImage::SbiImage()
bInit =
bError = sal_False;
bFirstInit = sal_True;
- eCharSet = gsl_getSystemTextEncoding();
+ eCharSet = osl_getThreadTextEncoding();
}
SbiImage::~SbiImage()
@@ -72,7 +72,7 @@ void SbiImage::Clear()
nStringSize= 0;
nLegacyCodeSize = 0;
nCodeSize = 0;
- eCharSet = gsl_getSystemTextEncoding();
+ eCharSet = osl_getThreadTextEncoding();
nDimBase = 0;
bError = sal_False;
}
diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx
index ea723adbb1da..a866e9311235 100644
--- a/basic/source/classes/sbxmod.cxx
+++ b/basic/source/classes/sbxmod.cxx
@@ -2012,7 +2012,7 @@ sal_Bool SbJScriptModule::LoadData( SvStream& rStrm, sal_uInt16 nVer )
// Get the source string
String aTmp;
- rStrm.ReadByteString( aTmp, gsl_getSystemTextEncoding() );
+ rStrm.ReadByteString( aTmp, osl_getThreadTextEncoding() );
aOUSource = aTmp;
return sal_True;
}
@@ -2024,7 +2024,7 @@ sal_Bool SbJScriptModule::StoreData( SvStream& rStrm ) const
// Write the source string
String aTmp = aOUSource;
- rStrm.WriteByteString( aTmp, gsl_getSystemTextEncoding() );
+ rStrm.WriteByteString( aTmp, osl_getThreadTextEncoding() );
return sal_True;
}
diff --git a/basic/source/comp/buffer.cxx b/basic/source/comp/buffer.cxx
index 218ce4f232ea..57c7a3846700 100644
--- a/basic/source/comp/buffer.cxx
+++ b/basic/source/comp/buffer.cxx
@@ -226,7 +226,7 @@ sal_Bool SbiBuffer::operator +=( const String& n )
sal_uInt16 l = n.Len() + 1;
if( Check( l ) )
{
- ByteString aByteStr( n, gsl_getSystemTextEncoding() );
+ ByteString aByteStr( n, osl_getThreadTextEncoding() );
memcpy( pCur, aByteStr.GetBuffer(), l );
pCur += l;
nOff = nOff + l;
diff --git a/basic/source/runtime/iosys.cxx b/basic/source/runtime/iosys.cxx
index fe08f663f3cb..b746e8a8455f 100644
--- a/basic/source/runtime/iosys.cxx
+++ b/basic/source/runtime/iosys.cxx
@@ -573,7 +573,7 @@ SbError SbiStream::Open
nExpandOnWriteTo = 0;
if( ( nStrmMode & ( STREAM_READ|STREAM_WRITE ) ) == STREAM_READ )
nStrmMode |= STREAM_NOCREATE;
- String aStr( rName, gsl_getSystemTextEncoding() );
+ String aStr( rName, osl_getThreadTextEncoding() );
String aNameStr = getFullPath( aStr );
if( hasUno() )
@@ -815,7 +815,7 @@ void SbiIoSystem::Shutdown()
// anything left to PRINT?
if( aOut.Len() )
{
- String aOutStr( aOut, gsl_getSystemTextEncoding() );
+ String aOutStr( aOut, osl_getThreadTextEncoding() );
#if defined GCC
Window* pParent = Application::GetDefDialogParent();
MessBox( pParent, WinBits( WB_OK ), String(), aOutStr ).Execute();
@@ -912,10 +912,10 @@ void SbiIoSystem::CloseAll(void)
void SbiIoSystem::ReadCon( ByteString& rIn )
{
- String aPromptStr( aPrompt, gsl_getSystemTextEncoding() );
+ String aPromptStr( aPrompt, osl_getThreadTextEncoding() );
SbiInputDialog aDlg( NULL, aPromptStr );
if( aDlg.Execute() )
- rIn = ByteString( aDlg.GetInput(), gsl_getSystemTextEncoding() );
+ rIn = ByteString( aDlg.GetInput(), osl_getThreadTextEncoding() );
else
nError = SbERR_USER_ABORT;
aPrompt.Erase();
@@ -938,7 +938,7 @@ void SbiIoSystem::WriteCon( const ByteString& rText )
aOut.Erase( 0, n1 );
while( aOut.GetBuffer()[0] == '\n' || aOut.GetBuffer()[0] == '\r' )
aOut.Erase( 0, 1 );
- String aStr( s, gsl_getSystemTextEncoding() );
+ String aStr( s, osl_getThreadTextEncoding() );
{
SolarMutexGuard aSolarGuard;
if( !MessBox( GetpApp()->GetDefDialogParent(),
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index c67638839588..1e1e8775fb5f 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -388,7 +388,7 @@ void implChr( SbxArray& rPar, bool bChrW )
if( !bChrW && SbiRuntime::isVBAEnabled() )
{
sal_Char c = static_cast<sal_Char>(pArg->GetByte());
- aStr = rtl::OUString(&c, 1, gsl_getSystemTextEncoding());
+ aStr = rtl::OUString(&c, 1, osl_getThreadTextEncoding());
}
else
{
@@ -1716,7 +1716,7 @@ RTLFUNC(Val)
nRadix = 8;
if ( nRadix != 10 )
{
- ByteString aByteStr( aStr, gsl_getSystemTextEncoding() );
+ ByteString aByteStr( aStr, osl_getThreadTextEncoding() );
sal_Int16 nlResult = (sal_Int16)strtol( aByteStr.GetBuffer()+2, &pEndPtr, nRadix);
nResult = (double)nlResult;
}
@@ -2840,7 +2840,7 @@ RTLFUNC(GetAttr)
aEntry.ToAbs();
// #57064 extract the real-path for virtual URLs
- ByteString aByteStrFullPath( aEntry.GetFull(), gsl_getSystemTextEncoding() );
+ ByteString aByteStrFullPath( aEntry.GetFull(), osl_getThreadTextEncoding() );
DWORD nRealFlags = GetFileAttributes (aByteStrFullPath.GetBuffer());
if (nRealFlags != 0xffffffff)
{
diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx
index 64847d3981fd..da14d77ef546 100644
--- a/basic/source/runtime/methods1.cxx
+++ b/basic/source/runtime/methods1.cxx
@@ -993,13 +993,13 @@ sal_Bool lcl_WriteSbxVariable( const SbxVariable& rVar, SvStream* pStrm,
{
if( bIsVariant )
*pStrm << (sal_uInt16)SbxSTRING;
- pStrm->WriteByteString( rStr, gsl_getSystemTextEncoding() );
+ pStrm->WriteByteString( rStr, osl_getThreadTextEncoding() );
}
else
{
// without any length information! without end-identifier!
// What does that mean for Unicode?! Choosing conversion to ByteString...
- ByteString aByteStr( rStr, gsl_getSystemTextEncoding() );
+ ByteString aByteStr( rStr, osl_getThreadTextEncoding() );
*pStrm << (const char*)aByteStr.GetBuffer();
}
}
@@ -1109,7 +1109,7 @@ sal_Bool lcl_ReadSbxVariable( SbxVariable& rVar, SvStream* pStrm,
case SbxLPSTR:
{
String aStr;
- pStrm->ReadByteString( aStr, gsl_getSystemTextEncoding() );
+ pStrm->ReadByteString( aStr, osl_getThreadTextEncoding() );
rVar.PutString( aStr );
}
break;
@@ -1254,7 +1254,7 @@ RTLFUNC(Environ)
}
String aResult;
// should be ANSI but that's not possible under Win16 in the DLL
- ByteString aByteStr( rPar.Get(1)->GetString(), gsl_getSystemTextEncoding() );
+ ByteString aByteStr( rPar.Get(1)->GetString(), osl_getThreadTextEncoding() );
const char* pEnvStr = getenv( aByteStr.GetBuffer() );
if ( pEnvStr )
aResult = String::CreateFromAscii( pEnvStr );
@@ -3221,7 +3221,7 @@ RTLFUNC(Input)
StarBASIC::Error( err );
return;
}
- rPar.Get(0)->PutString( String( aByteBuffer, gsl_getSystemTextEncoding() ) );
+ rPar.Get(0)->PutString( String( aByteBuffer, osl_getThreadTextEncoding() ) );
}
RTLFUNC(Me)
diff --git a/basic/source/runtime/step0.cxx b/basic/source/runtime/step0.cxx
index 3f3aca86b035..758ec73b4419 100644
--- a/basic/source/runtime/step0.cxx
+++ b/basic/source/runtime/step0.cxx
@@ -1181,7 +1181,7 @@ void SbiRuntime::StepLINPUT()
pIosys->Read( aInput );
Error( pIosys->GetError() );
SbxVariableRef p = PopVar();
- p->PutString( String( aInput, gsl_getSystemTextEncoding() ) );
+ p->PutString( String( aInput, osl_getThreadTextEncoding() ) );
}
// end of program
@@ -1287,7 +1287,7 @@ void SbiRuntime::StepPRINT() // print TOS
if( p->GetType() >= SbxINTEGER && p->GetType() <= SbxDOUBLE )
s = ' '; // one blank before
s += s1;
- ByteString aByteStr( s, gsl_getSystemTextEncoding() );
+ ByteString aByteStr( s, osl_getThreadTextEncoding() );
pIosys->Write( aByteStr );
Error( pIosys->GetError() );
}
@@ -1301,7 +1301,7 @@ void SbiRuntime::StepPRINTF() // print TOS in field
s = ' ';
s += s1;
s.Expand( 14, ' ' );
- ByteString aByteStr( s, gsl_getSystemTextEncoding() );
+ ByteString aByteStr( s, osl_getThreadTextEncoding() );
pIosys->Write( aByteStr );
Error( pIosys->GetError() );
}
@@ -1325,7 +1325,7 @@ void SbiRuntime::StepWRITE() // write TOS
s += p->GetString();
if( ch )
s += ch;
- ByteString aByteStr( s, gsl_getSystemTextEncoding() );
+ ByteString aByteStr( s, osl_getThreadTextEncoding() );
pIosys->Write( aByteStr );
Error( pIosys->GetError() );
}
@@ -1352,7 +1352,7 @@ void SbiRuntime::StepRENAME() // Rename Tos+1 to Tos
void SbiRuntime::StepPROMPT()
{
SbxVariableRef p = PopVar();
- ByteString aStr( p->GetString(), gsl_getSystemTextEncoding() );
+ ByteString aStr( p->GetString(), osl_getThreadTextEncoding() );
pIosys->SetPrompt( aStr );
}
diff --git a/basic/source/runtime/step2.cxx b/basic/source/runtime/step2.cxx
index 3220ae97a433..d9aab19fe037 100644
--- a/basic/source/runtime/step2.cxx
+++ b/basic/source/runtime/step2.cxx
@@ -901,7 +901,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(), gsl_getSystemTextEncoding() );
+ ByteString aName( pName->GetString(), osl_getThreadTextEncoding() );
pIosys->Open( nChan, aName, static_cast<short>( nOp1 ),
static_cast<short>( nOp2 ), nBlkLen );
Error( pIosys->GetError() );