gsl_getSystemTextEncoding -> osl_getThreadTextEncoding

This commit is contained in:
David Tardon 2011-11-24 12:06:54 +01:00
parent 20c8eb409e
commit fba911fea7
80 changed files with 128 additions and 135 deletions

View File

@ -396,7 +396,7 @@ CommunicationManagerClient::CommunicationManagerClient( sal_Bool bUseMultiChanne
: MultiCommunicationManager( bUseMultiChannel ) : MultiCommunicationManager( bUseMultiChannel )
{ {
ByteString aApplication("Something inside "); ByteString aApplication("Something inside ");
aApplication.Append( ByteString( DirEntry( Application::GetAppFileName() ).GetName(), gsl_getSystemTextEncoding() ) ); aApplication.Append( ByteString( DirEntry( Application::GetAppFileName() ).GetName(), osl_getThreadTextEncoding() ) );
SetApplication( aApplication ); SetApplication( aApplication );
} }

View File

@ -396,7 +396,7 @@ sal_Bool SbiDisas::DisasLine( String& rText )
SbMethod* pMeth = PTR_CAST(SbMethod,pMod->GetMethods()->Get( i )); SbMethod* pMeth = PTR_CAST(SbMethod,pMod->GetMethods()->Get( i ));
if( pMeth ) if( pMeth )
{ {
aByteMethName = ByteString( pMeth->GetName(), gsl_getSystemTextEncoding() ); aByteMethName = ByteString( pMeth->GetName(), osl_getThreadTextEncoding() );
if( pMeth->GetId() == nPC ) if( pMeth->GetId() == nPC )
{ {
p = aByteMethName.GetBuffer(); p = aByteMethName.GetBuffer();

View File

@ -50,7 +50,7 @@ SbiImage::SbiImage()
bInit = bInit =
bError = sal_False; bError = sal_False;
bFirstInit = sal_True; bFirstInit = sal_True;
eCharSet = gsl_getSystemTextEncoding(); eCharSet = osl_getThreadTextEncoding();
} }
SbiImage::~SbiImage() SbiImage::~SbiImage()
@ -72,7 +72,7 @@ void SbiImage::Clear()
nStringSize= 0; nStringSize= 0;
nLegacyCodeSize = 0; nLegacyCodeSize = 0;
nCodeSize = 0; nCodeSize = 0;
eCharSet = gsl_getSystemTextEncoding(); eCharSet = osl_getThreadTextEncoding();
nDimBase = 0; nDimBase = 0;
bError = sal_False; bError = sal_False;
} }

View File

@ -2012,7 +2012,7 @@ sal_Bool SbJScriptModule::LoadData( SvStream& rStrm, sal_uInt16 nVer )
// Get the source string // Get the source string
String aTmp; String aTmp;
rStrm.ReadByteString( aTmp, gsl_getSystemTextEncoding() ); rStrm.ReadByteString( aTmp, osl_getThreadTextEncoding() );
aOUSource = aTmp; aOUSource = aTmp;
return sal_True; return sal_True;
} }
@ -2024,7 +2024,7 @@ sal_Bool SbJScriptModule::StoreData( SvStream& rStrm ) const
// Write the source string // Write the source string
String aTmp = aOUSource; String aTmp = aOUSource;
rStrm.WriteByteString( aTmp, gsl_getSystemTextEncoding() ); rStrm.WriteByteString( aTmp, osl_getThreadTextEncoding() );
return sal_True; return sal_True;
} }

View File

@ -226,7 +226,7 @@ sal_Bool SbiBuffer::operator +=( const String& n )
sal_uInt16 l = n.Len() + 1; sal_uInt16 l = n.Len() + 1;
if( Check( l ) ) if( Check( l ) )
{ {
ByteString aByteStr( n, gsl_getSystemTextEncoding() ); ByteString aByteStr( n, osl_getThreadTextEncoding() );
memcpy( pCur, aByteStr.GetBuffer(), l ); memcpy( pCur, aByteStr.GetBuffer(), l );
pCur += l; pCur += l;
nOff = nOff + l; nOff = nOff + l;

View File

@ -573,7 +573,7 @@ SbError SbiStream::Open
nExpandOnWriteTo = 0; nExpandOnWriteTo = 0;
if( ( nStrmMode & ( STREAM_READ|STREAM_WRITE ) ) == STREAM_READ ) if( ( nStrmMode & ( STREAM_READ|STREAM_WRITE ) ) == STREAM_READ )
nStrmMode |= STREAM_NOCREATE; nStrmMode |= STREAM_NOCREATE;
String aStr( rName, gsl_getSystemTextEncoding() ); String aStr( rName, osl_getThreadTextEncoding() );
String aNameStr = getFullPath( aStr ); String aNameStr = getFullPath( aStr );
if( hasUno() ) if( hasUno() )
@ -815,7 +815,7 @@ void SbiIoSystem::Shutdown()
// anything left to PRINT? // anything left to PRINT?
if( aOut.Len() ) if( aOut.Len() )
{ {
String aOutStr( aOut, gsl_getSystemTextEncoding() ); String aOutStr( aOut, osl_getThreadTextEncoding() );
#if defined GCC #if defined GCC
Window* pParent = Application::GetDefDialogParent(); Window* pParent = Application::GetDefDialogParent();
MessBox( pParent, WinBits( WB_OK ), String(), aOutStr ).Execute(); MessBox( pParent, WinBits( WB_OK ), String(), aOutStr ).Execute();
@ -912,10 +912,10 @@ void SbiIoSystem::CloseAll(void)
void SbiIoSystem::ReadCon( ByteString& rIn ) void SbiIoSystem::ReadCon( ByteString& rIn )
{ {
String aPromptStr( aPrompt, gsl_getSystemTextEncoding() ); String aPromptStr( aPrompt, osl_getThreadTextEncoding() );
SbiInputDialog aDlg( NULL, aPromptStr ); SbiInputDialog aDlg( NULL, aPromptStr );
if( aDlg.Execute() ) if( aDlg.Execute() )
rIn = ByteString( aDlg.GetInput(), gsl_getSystemTextEncoding() ); rIn = ByteString( aDlg.GetInput(), osl_getThreadTextEncoding() );
else else
nError = SbERR_USER_ABORT; nError = SbERR_USER_ABORT;
aPrompt.Erase(); aPrompt.Erase();
@ -938,7 +938,7 @@ void SbiIoSystem::WriteCon( const ByteString& rText )
aOut.Erase( 0, n1 ); aOut.Erase( 0, n1 );
while( aOut.GetBuffer()[0] == '\n' || aOut.GetBuffer()[0] == '\r' ) while( aOut.GetBuffer()[0] == '\n' || aOut.GetBuffer()[0] == '\r' )
aOut.Erase( 0, 1 ); aOut.Erase( 0, 1 );
String aStr( s, gsl_getSystemTextEncoding() ); String aStr( s, osl_getThreadTextEncoding() );
{ {
SolarMutexGuard aSolarGuard; SolarMutexGuard aSolarGuard;
if( !MessBox( GetpApp()->GetDefDialogParent(), if( !MessBox( GetpApp()->GetDefDialogParent(),

View File

@ -388,7 +388,7 @@ void implChr( SbxArray& rPar, bool bChrW )
if( !bChrW && SbiRuntime::isVBAEnabled() ) if( !bChrW && SbiRuntime::isVBAEnabled() )
{ {
sal_Char c = static_cast<sal_Char>(pArg->GetByte()); sal_Char c = static_cast<sal_Char>(pArg->GetByte());
aStr = rtl::OUString(&c, 1, gsl_getSystemTextEncoding()); aStr = rtl::OUString(&c, 1, osl_getThreadTextEncoding());
} }
else else
{ {
@ -1716,7 +1716,7 @@ RTLFUNC(Val)
nRadix = 8; nRadix = 8;
if ( nRadix != 10 ) if ( nRadix != 10 )
{ {
ByteString aByteStr( aStr, gsl_getSystemTextEncoding() ); ByteString aByteStr( aStr, osl_getThreadTextEncoding() );
sal_Int16 nlResult = (sal_Int16)strtol( aByteStr.GetBuffer()+2, &pEndPtr, nRadix); sal_Int16 nlResult = (sal_Int16)strtol( aByteStr.GetBuffer()+2, &pEndPtr, nRadix);
nResult = (double)nlResult; nResult = (double)nlResult;
} }
@ -2840,7 +2840,7 @@ RTLFUNC(GetAttr)
aEntry.ToAbs(); aEntry.ToAbs();
// #57064 extract the real-path for virtual URLs // #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()); DWORD nRealFlags = GetFileAttributes (aByteStrFullPath.GetBuffer());
if (nRealFlags != 0xffffffff) if (nRealFlags != 0xffffffff)
{ {

View File

@ -993,13 +993,13 @@ sal_Bool lcl_WriteSbxVariable( const SbxVariable& rVar, SvStream* pStrm,
{ {
if( bIsVariant ) if( bIsVariant )
*pStrm << (sal_uInt16)SbxSTRING; *pStrm << (sal_uInt16)SbxSTRING;
pStrm->WriteByteString( rStr, gsl_getSystemTextEncoding() ); pStrm->WriteByteString( rStr, osl_getThreadTextEncoding() );
} }
else else
{ {
// without any length information! without end-identifier! // without any length information! without end-identifier!
// What does that mean for Unicode?! Choosing conversion to ByteString... // 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(); *pStrm << (const char*)aByteStr.GetBuffer();
} }
} }
@ -1109,7 +1109,7 @@ sal_Bool lcl_ReadSbxVariable( SbxVariable& rVar, SvStream* pStrm,
case SbxLPSTR: case SbxLPSTR:
{ {
String aStr; String aStr;
pStrm->ReadByteString( aStr, gsl_getSystemTextEncoding() ); pStrm->ReadByteString( aStr, osl_getThreadTextEncoding() );
rVar.PutString( aStr ); rVar.PutString( aStr );
} }
break; break;
@ -1254,7 +1254,7 @@ RTLFUNC(Environ)
} }
String aResult; String aResult;
// should be ANSI but that's not possible under Win16 in the DLL // 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() ); const char* pEnvStr = getenv( aByteStr.GetBuffer() );
if ( pEnvStr ) if ( pEnvStr )
aResult = String::CreateFromAscii( pEnvStr ); aResult = String::CreateFromAscii( pEnvStr );
@ -3221,7 +3221,7 @@ RTLFUNC(Input)
StarBASIC::Error( err ); StarBASIC::Error( err );
return; return;
} }
rPar.Get(0)->PutString( String( aByteBuffer, gsl_getSystemTextEncoding() ) ); rPar.Get(0)->PutString( String( aByteBuffer, osl_getThreadTextEncoding() ) );
} }
RTLFUNC(Me) RTLFUNC(Me)

View File

@ -1181,7 +1181,7 @@ void SbiRuntime::StepLINPUT()
pIosys->Read( aInput ); pIosys->Read( aInput );
Error( pIosys->GetError() ); Error( pIosys->GetError() );
SbxVariableRef p = PopVar(); SbxVariableRef p = PopVar();
p->PutString( String( aInput, gsl_getSystemTextEncoding() ) ); p->PutString( String( aInput, osl_getThreadTextEncoding() ) );
} }
// end of program // end of program
@ -1287,7 +1287,7 @@ void SbiRuntime::StepPRINT() // print TOS
if( p->GetType() >= SbxINTEGER && p->GetType() <= SbxDOUBLE ) if( p->GetType() >= SbxINTEGER && p->GetType() <= SbxDOUBLE )
s = ' '; // one blank before s = ' '; // one blank before
s += s1; s += s1;
ByteString aByteStr( s, gsl_getSystemTextEncoding() ); ByteString aByteStr( s, osl_getThreadTextEncoding() );
pIosys->Write( aByteStr ); pIosys->Write( aByteStr );
Error( pIosys->GetError() ); Error( pIosys->GetError() );
} }
@ -1301,7 +1301,7 @@ void SbiRuntime::StepPRINTF() // print TOS in field
s = ' '; s = ' ';
s += s1; s += s1;
s.Expand( 14, ' ' ); s.Expand( 14, ' ' );
ByteString aByteStr( s, gsl_getSystemTextEncoding() ); ByteString aByteStr( s, osl_getThreadTextEncoding() );
pIosys->Write( aByteStr ); pIosys->Write( aByteStr );
Error( pIosys->GetError() ); Error( pIosys->GetError() );
} }
@ -1325,7 +1325,7 @@ void SbiRuntime::StepWRITE() // write TOS
s += p->GetString(); s += p->GetString();
if( ch ) if( ch )
s += ch; s += ch;
ByteString aByteStr( s, gsl_getSystemTextEncoding() ); ByteString aByteStr( s, osl_getThreadTextEncoding() );
pIosys->Write( aByteStr ); pIosys->Write( aByteStr );
Error( pIosys->GetError() ); Error( pIosys->GetError() );
} }
@ -1352,7 +1352,7 @@ void SbiRuntime::StepRENAME() // Rename Tos+1 to Tos
void SbiRuntime::StepPROMPT() void SbiRuntime::StepPROMPT()
{ {
SbxVariableRef p = PopVar(); SbxVariableRef p = PopVar();
ByteString aStr( p->GetString(), gsl_getSystemTextEncoding() ); ByteString aStr( p->GetString(), osl_getThreadTextEncoding() );
pIosys->SetPrompt( aStr ); pIosys->SetPrompt( aStr );
} }

View File

@ -901,7 +901,7 @@ void SbiRuntime::StepOPEN( sal_uInt32 nOp1, sal_uInt32 nOp2 )
SbxVariableRef pLen = PopVar(); SbxVariableRef pLen = PopVar();
short nBlkLen = pLen->GetInteger(); short nBlkLen = pLen->GetInteger();
short nChan = pChan->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 ), pIosys->Open( nChan, aName, static_cast<short>( nOp1 ),
static_cast<short>( nOp2 ), nBlkLen ); static_cast<short>( nOp2 ), nBlkLen );
Error( pIosys->GetError() ); Error( pIosys->GetError() );

View File

@ -583,9 +583,9 @@ const OExtendedTypeInfo* OConnection::getTypeInfoFromType(const OTypeInfoMap& _r
// we can not assert here because we could be in d&d // we can not assert here because we could be in d&d
/* /*
OSL_FAIL(( ::rtl::OString("getTypeInfoFromType: assuming column type ") OSL_FAIL(( ::rtl::OString("getTypeInfoFromType: assuming column type ")
+= ::rtl::OString(aIter->second->aTypeName.getStr(), aIter->second->aTypeName.getLength(), gsl_getSystemTextEncoding()) += ::rtl::OString(aIter->second->aTypeName.getStr(), aIter->second->aTypeName.getLength(), osl_getThreadTextEncoding())
+= ::rtl::OString("\" (expected type name ") += ::rtl::OString("\" (expected type name ")
+= ::rtl::OString(_sTypeName.getStr(), _sTypeName.getLength(), gsl_getSystemTextEncoding()) += ::rtl::OString(_sTypeName.getStr(), _sTypeName.getLength(), osl_getThreadTextEncoding())
+= ::rtl::OString(" matches the type's local name).")).getStr()); += ::rtl::OString(" matches the type's local name).")).getStr());
*/ */
break; break;

View File

@ -186,7 +186,7 @@ void SAL_CALL SbaExternalSourceBrowser::dispatch(const ::com::sun::star::util::U
aControlProps = *(Sequence< ::com::sun::star::beans::PropertyValue>*)pArguments->Value.getValue(); aControlProps = *(Sequence< ::com::sun::star::beans::PropertyValue>*)pArguments->Value.getValue();
} }
else else
OSL_FAIL(rtl::OStringBuffer("SbaExternalSourceBrowser::dispatch(AddGridColumn) : unknown argument (").append(rtl::OUStringToOString(pArguments->Name, gsl_getSystemTextEncoding())).append(") !").getStr()); OSL_FAIL(rtl::OStringBuffer("SbaExternalSourceBrowser::dispatch(AddGridColumn) : unknown argument (").append(rtl::OUStringToOString(pArguments->Name, osl_getThreadTextEncoding())).append(") !").getStr());
} }
if (!sControlType.getLength()) if (!sControlType.getLength())
{ {

View File

@ -395,7 +395,7 @@ void ODbaseIndexDialog::Init()
// yes -> add to the tables index list // yes -> add to the tables index list
if (aNDX == "NDX" ) if (aNDX == "NDX" )
{ {
aEntry = rtl::OStringToOUString(aInfFile.ReadKey(aKeyName), gsl_getSystemTextEncoding()); aEntry = rtl::OStringToOUString(aInfFile.ReadKey(aKeyName), osl_getThreadTextEncoding());
rTabInfo.aIndexList.push_back( OTableIndex( aEntry ) ); rTabInfo.aIndexList.push_back( OTableIndex( aEntry ) );
// and remove it from the free index list // and remove it from the free index list
@ -527,7 +527,7 @@ void OTableInfo::WriteInfFile( const String& rDSN ) const
aInfFile.WriteKey( aInfFile.WriteKey(
aKeyName.makeStringAndClear(), aKeyName.makeStringAndClear(),
rtl::OUStringToOString(aIndex->GetIndexFileName(), rtl::OUStringToOString(aIndex->GetIndexFileName(),
gsl_getSystemTextEncoding())); osl_getThreadTextEncoding()));
} }
aInfFile.Flush(); aInfFile.Flush();

View File

@ -115,7 +115,7 @@ ODatabaseExport::ODatabaseExport(sal_Int32 nRows,
,m_nColumnPos(0) ,m_nColumnPos(0)
,m_nRows(1) ,m_nRows(1)
,m_nRowCount(0) ,m_nRowCount(0)
,m_nDefToken( gsl_getSystemTextEncoding() ) ,m_nDefToken( osl_getThreadTextEncoding() )
,m_bError(sal_False) ,m_bError(sal_False)
,m_bInTbl(sal_False) ,m_bInTbl(sal_False)
,m_bHead(sal_True) ,m_bHead(sal_True)
@ -172,7 +172,7 @@ ODatabaseExport::ODatabaseExport(const SharedConnection& _rxConnection,
,m_nColumnPos(0) ,m_nColumnPos(0)
,m_nRows(1) ,m_nRows(1)
,m_nRowCount(0) ,m_nRowCount(0)
,m_nDefToken( gsl_getSystemTextEncoding() ) ,m_nDefToken( osl_getThreadTextEncoding() )
,m_bError(sal_False) ,m_bError(sal_False)
,m_bInTbl(sal_False) ,m_bInTbl(sal_False)
,m_bHead(sal_True) ,m_bHead(sal_True)

View File

@ -768,7 +768,7 @@ void OHTMLImportExport::WriteBody()
IncIndent(1); TAG_ON_LF( OOO_STRING_SVTOOLS_HTML_style ); IncIndent(1); TAG_ON_LF( OOO_STRING_SVTOOLS_HTML_style );
(*m_pStream) << sMyBegComment; OUT_LF(); (*m_pStream) << sMyBegComment; OUT_LF();
(*m_pStream) << OOO_STRING_SVTOOLS_HTML_body " { " << sFontFamily << '"' << ::rtl::OUStringToOString(m_aFont.Name, gsl_getSystemTextEncoding()).getStr() << '\"'; (*m_pStream) << OOO_STRING_SVTOOLS_HTML_body " { " << sFontFamily << '"' << ::rtl::OUStringToOString(m_aFont.Name, osl_getThreadTextEncoding()).getStr() << '\"';
// TODO : think about the encoding of the font name // TODO : think about the encoding of the font name
(*m_pStream) << "; " << sFontSize; (*m_pStream) << "; " << sFontSize;
m_pStream->WriteNumber(static_cast<sal_Int32>(m_aFont.Height)); m_pStream->WriteNumber(static_cast<sal_Int32>(m_aFont.Height));
@ -848,7 +848,7 @@ void OHTMLImportExport::WriteTables()
TAG_ON( OOO_STRING_SVTOOLS_HTML_caption ); TAG_ON( OOO_STRING_SVTOOLS_HTML_caption );
TAG_ON( OOO_STRING_SVTOOLS_HTML_bold ); TAG_ON( OOO_STRING_SVTOOLS_HTML_bold );
(*m_pStream) << ::rtl::OUStringToOString(m_sName, gsl_getSystemTextEncoding()).getStr(); (*m_pStream) << ::rtl::OUStringToOString(m_sName, osl_getThreadTextEncoding()).getStr();
// TODO : think about the encoding of the name // TODO : think about the encoding of the name
TAG_OFF( OOO_STRING_SVTOOLS_HTML_bold ); TAG_OFF( OOO_STRING_SVTOOLS_HTML_bold );
TAG_OFF( OOO_STRING_SVTOOLS_HTML_caption ); TAG_OFF( OOO_STRING_SVTOOLS_HTML_caption );
@ -1060,7 +1060,7 @@ void OHTMLImportExport::FontOn()
aStrOut = aStrOut + OOO_STRING_SVTOOLS_HTML_O_face; aStrOut = aStrOut + OOO_STRING_SVTOOLS_HTML_O_face;
aStrOut = aStrOut + "="; aStrOut = aStrOut + "=";
aStrOut = aStrOut + "\""; aStrOut = aStrOut + "\"";
aStrOut = aStrOut + ::rtl::OUStringToOString(m_aFont.Name,gsl_getSystemTextEncoding()); aStrOut = aStrOut + ::rtl::OUStringToOString(m_aFont.Name,osl_getThreadTextEncoding());
// TODO : think about the encoding of the font name // TODO : think about the encoding of the font name
aStrOut = aStrOut + "\""; aStrOut = aStrOut + "\"";
aStrOut = aStrOut + " "; aStrOut = aStrOut + " ";

View File

@ -401,9 +401,9 @@ TOTypeInfoSP getTypeInfoFromType(const OTypeInfoMap& _rTypeInfo,
) )
{ {
OSL_FAIL(( ::rtl::OString("getTypeInfoFromType: assuming column type ") OSL_FAIL(( ::rtl::OString("getTypeInfoFromType: assuming column type ")
+= ::rtl::OString(aIter->second->aTypeName.getStr(), aIter->second->aTypeName.getLength(), gsl_getSystemTextEncoding()) += ::rtl::OString(aIter->second->aTypeName.getStr(), aIter->second->aTypeName.getLength(), osl_getThreadTextEncoding())
+= ::rtl::OString("\" (expected type name ") += ::rtl::OString("\" (expected type name ")
+= ::rtl::OString(_sTypeName.getStr(), _sTypeName.getLength(), gsl_getSystemTextEncoding()) += ::rtl::OString(_sTypeName.getStr(), _sTypeName.getLength(), osl_getThreadTextEncoding())
+= ::rtl::OString(" matches the type's local name).")).getStr()); += ::rtl::OString(" matches the type's local name).")).getStr());
break; break;
} }

View File

@ -1040,7 +1040,7 @@ void BinTextObject::StoreData( SvStream& rOStream ) const
} }
// Store Current text encoding ... // Store Current text encoding ...
rtl_TextEncoding eEncoding = GetSOStoreTextEncoding( gsl_getSystemTextEncoding(), (sal_uInt16) rOStream.GetVersion() ); rtl_TextEncoding eEncoding = GetSOStoreTextEncoding( osl_getThreadTextEncoding(), (sal_uInt16) rOStream.GetVersion() );
rOStream << (sal_uInt16) eEncoding; rOStream << (sal_uInt16) eEncoding;
// The number of paragraphs ... // The number of paragraphs ...

View File

@ -430,7 +430,7 @@ sal_uInt32 ImpEditEngine::WriteRTF( SvStream& rOutput, EditSelection aSel )
CharSet eChrSet = pFontItem->GetCharSet(); CharSet eChrSet = pFontItem->GetCharSet();
DBG_ASSERT( eChrSet != 9, "SystemCharSet?!" ); DBG_ASSERT( eChrSet != 9, "SystemCharSet?!" );
if( RTL_TEXTENCODING_DONTKNOW == eChrSet ) if( RTL_TEXTENCODING_DONTKNOW == eChrSet )
eChrSet = gsl_getSystemTextEncoding(); eChrSet = osl_getThreadTextEncoding();
rOutput << OOO_STRING_SVTOOLS_RTF_FCHARSET; rOutput << OOO_STRING_SVTOOLS_RTF_FCHARSET;
rOutput.WriteNumber( static_cast<sal_uInt32>( rtl_getBestWindowsCharsetFromTextEncoding( eChrSet ) ) ); rOutput.WriteNumber( static_cast<sal_uInt32>( rtl_getBestWindowsCharsetFromTextEncoding( eChrSet ) ) );

View File

@ -220,7 +220,7 @@ SvStream& SvxNumberFormat::Store(SvStream &rStream, FontToSubsFontConverter pC
rStream << nLSpace; rStream << nLSpace;
rStream << nCharTextDistance; rStream << nCharTextDistance;
rtl_TextEncoding eEnc = gsl_getSystemTextEncoding(); rtl_TextEncoding eEnc = osl_getThreadTextEncoding();
rStream.WriteByteString(sPrefix, eEnc); rStream.WriteByteString(sPrefix, eEnc);
rStream.WriteByteString(sSuffix, eEnc); rStream.WriteByteString(sSuffix, eEnc);
rStream.WriteByteString(sCharStyleName, eEnc); rStream.WriteByteString(sCharStyleName, eEnc);

View File

@ -228,7 +228,7 @@ namespace dbp
catch(Exception&) catch(Exception&)
{ {
OSL_FAIL( ( ::rtl::OString("OGridWizard::implApplySettings: unexpected exception while creating the grid column for field ") OSL_FAIL( ( ::rtl::OString("OGridWizard::implApplySettings: unexpected exception while creating the grid column for field ")
+= ::rtl::OString(pFormFieldName->getStr(), pFormFieldName->getLength(), gsl_getSystemTextEncoding()) += ::rtl::OString(pFormFieldName->getStr(), pFormFieldName->getLength(), osl_getThreadTextEncoding())
+= ::rtl::OString("!") ).getStr() ); += ::rtl::OString("!") ).getStr() );
} }
} }

View File

@ -111,7 +111,7 @@ Reference< ::com::sun::star::plugin::XPluginContext > XPluginManager_Impl::crea
XPluginContext_Impl::XPluginContext_Impl( const Reference< ::com::sun::star::lang::XMultiServiceFactory > & rSMgr ) XPluginContext_Impl::XPluginContext_Impl( const Reference< ::com::sun::star::lang::XMultiServiceFactory > & rSMgr )
: m_xSMgr( rSMgr ), : m_xSMgr( rSMgr ),
m_aEncoding( gsl_getSystemTextEncoding() ) m_aEncoding( osl_getThreadTextEncoding() )
{ {
} }
@ -285,7 +285,7 @@ FileSink::FileSink( const Reference< ::com::sun::star::lang::XMultiServiceFactor
{ {
DirEntry aEntry; DirEntry aEntry;
m_aFileName = aEntry.TempName().GetFull(); m_aFileName = aEntry.TempName().GetFull();
::rtl::OString aFile = ::rtl::OUStringToOString( m_aFileName, gsl_getSystemTextEncoding() ); ::rtl::OString aFile = ::rtl::OUStringToOString( m_aFileName, osl_getThreadTextEncoding() );
fp = fopen( aFile.getStr() , "wb" ); fp = fopen( aFile.getStr() , "wb" );
Reference< ::com::sun::star::io::XActiveDataControl > xControl( source, UNO_QUERY ); Reference< ::com::sun::star::io::XActiveDataControl > xControl( source, UNO_QUERY );

View File

@ -121,7 +121,7 @@ XPlugin_Impl::XPlugin_Impl( const uno::Reference< com::sun::star::lang::XMultiSe
PluginControl_Impl(), PluginControl_Impl(),
m_xSMgr( rSMgr ), m_xSMgr( rSMgr ),
m_pPluginComm( NULL ), m_pPluginComm( NULL ),
m_aEncoding( gsl_getSystemTextEncoding() ), m_aEncoding( osl_getThreadTextEncoding() ),
m_pArgv( NULL ), m_pArgv( NULL ),
m_pArgn( NULL ), m_pArgn( NULL ),
m_nArgs( 0 ), m_nArgs( 0 ),

View File

@ -350,7 +350,7 @@ void GridWindow::drawGrid()
// draw tickmarks // draw tickmarks
Point aPt = transform( fX, m_fMinY ); Point aPt = transform( fX, m_fMinY );
std::sprintf( pBuf, "%g", fX ); std::sprintf( pBuf, "%g", fX );
String aMark( pBuf, gsl_getSystemTextEncoding() ); String aMark( pBuf, osl_getThreadTextEncoding() );
Size aTextSize( GetTextWidth( aMark ), GetTextHeight() ); Size aTextSize( GetTextWidth( aMark ), GetTextHeight() );
aPt.X() -= aTextSize.Width()/2; aPt.X() -= aTextSize.Width()/2;
aPt.Y() += aTextSize.Height()/2; aPt.Y() += aTextSize.Height()/2;
@ -363,7 +363,7 @@ void GridWindow::drawGrid()
// draw tickmarks // draw tickmarks
Point aPt = transform( m_fMinX, fY ); Point aPt = transform( m_fMinX, fY );
std::sprintf( pBuf, "%g", fY ); std::sprintf( pBuf, "%g", fY );
String aMark( pBuf, gsl_getSystemTextEncoding() ); String aMark( pBuf, osl_getThreadTextEncoding() );
Size aTextSize( GetTextWidth( aMark ), GetTextHeight() ); Size aTextSize( GetTextWidth( aMark ), GetTextHeight() );
aPt.X() -= aTextSize.Width() + 2; aPt.X() -= aTextSize.Width() + 2;
aPt.Y() -= aTextSize.Height()/2; aPt.Y() -= aTextSize.Height()/2;

View File

@ -990,7 +990,7 @@ String Sane::GetOptionUnitName( int n )
if( nUnitAsSize > SAL_N_ELEMENTS( ppUnits ) ) if( nUnitAsSize > SAL_N_ELEMENTS( ppUnits ) )
aText = String::CreateFromAscii( "[unknown units]" ); aText = String::CreateFromAscii( "[unknown units]" );
else else
aText = String( ppUnits[ nUnit ], gsl_getSystemTextEncoding() ); aText = String( ppUnits[ nUnit ], osl_getThreadTextEncoding() );
return aText; return aText;
} }

View File

@ -991,7 +991,7 @@ void OS2METReader::ReadChrStr(sal_Bool bGivenPos, sal_Bool bMove, sal_Bool bExtr
for (i=0; i<nLen; i++) for (i=0; i<nLen; i++)
*pOS2MET >> pChr[i]; *pOS2MET >> pChr[i];
pChr[nLen] = 0; pChr[nLen] = 0;
String aStr( (const sal_Char*)pChr, gsl_getSystemTextEncoding() ); String aStr( (const sal_Char*)pChr, osl_getThreadTextEncoding() );
SetRasterOp(aAttr.eChrMix); SetRasterOp(aAttr.eChrMix);
if (pVirDev->GetFont()!=aFont) if (pVirDev->GetFont()!=aFont)
pVirDev->SetFont(aFont); pVirDev->SetFont(aFont);
@ -2273,7 +2273,7 @@ void OS2METReader::ReadFont(sal_uInt16 nFieldSize)
pOS2MET->SeekRel(1); pOS2MET->SeekRel(1);
pOS2MET->Read( &str, 32 ); pOS2MET->Read( &str, 32 );
str[ 32 ] = 0; str[ 32 ] = 0;
String aStr( (const sal_Char*)str, gsl_getSystemTextEncoding() ); String aStr( (const sal_Char*)str, osl_getThreadTextEncoding() );
if ( aStr.CompareIgnoreCaseToAscii( "Helv" ) == COMPARE_EQUAL ) if ( aStr.CompareIgnoreCaseToAscii( "Helv" ) == COMPARE_EQUAL )
aStr = String::CreateFromAscii( "Helvetica" ); aStr = String::CreateFromAscii( "Helvetica" );
pF->aFont.SetName( aStr ); pF->aFont.SetName( aStr );

View File

@ -316,8 +316,8 @@ rtl_TextEncoding PictReader::GetTextEncoding (sal_uInt16 fId) {
static bool first = true; static bool first = true;
static rtl_TextEncoding enc = RTL_TEXTENCODING_APPLE_ROMAN; static rtl_TextEncoding enc = RTL_TEXTENCODING_APPLE_ROMAN;
if (first) { if (first) {
rtl_TextEncoding def = gsl_getSystemTextEncoding(); rtl_TextEncoding def = osl_getThreadTextEncoding();
// we keep gsl_getSystemTextEncoding only if it is a mac encoding // we keep osl_getThreadTextEncoding only if it is a mac encoding
switch(def) { switch(def) {
case RTL_TEXTENCODING_APPLE_ROMAN: case RTL_TEXTENCODING_APPLE_ROMAN:
case RTL_TEXTENCODING_APPLE_ARABIC: case RTL_TEXTENCODING_APPLE_ARABIC:
@ -1502,7 +1502,7 @@ sal_uLong PictReader::ReadData(sal_uInt16 nOpcode)
*pPict >> nByteLen; nLen=((sal_uInt16)nByteLen)&0x00ff; *pPict >> nByteLen; nLen=((sal_uInt16)nByteLen)&0x00ff;
pPict->Read( &sFName, nLen ); pPict->Read( &sFName, nLen );
sFName[ nLen ] = 0; sFName[ nLen ] = 0;
String aString( (const sal_Char*)&sFName, gsl_getSystemTextEncoding() ); String aString( (const sal_Char*)&sFName, osl_getThreadTextEncoding() );
aActFont.SetName( aString ); aActFont.SetName( aString );
eActMethod=PDM_UNDEFINED; eActMethod=PDM_UNDEFINED;
break; break;

View File

@ -7061,7 +7061,7 @@ sal_Bool SvxMSDffManager::ConvertToOle2( SvStream& rStm, sal_uInt32 nReadLen,
{ {
sal_Char * pBuf = new sal_Char[ nStrLen ]; sal_Char * pBuf = new sal_Char[ nStrLen ];
rStm.Read( pBuf, nStrLen ); rStm.Read( pBuf, nStrLen );
aSvrName.Assign( String( pBuf, (sal_uInt16) nStrLen-1, gsl_getSystemTextEncoding() ) ); aSvrName.Assign( String( pBuf, (sal_uInt16) nStrLen-1, osl_getThreadTextEncoding() ) );
delete[] pBuf; delete[] pBuf;
} }
else else

View File

@ -402,7 +402,7 @@ SvStream& operator>>( SvStream& rIn, PptFontEntityAtom& rAtom )
break; break;
default : default :
rAtom.eCharSet = gsl_getSystemTextEncoding(); rAtom.eCharSet = osl_getThreadTextEncoding();
} }
switch ( lfPitchAndFamily & 0xf0 ) switch ( lfPitchAndFamily & 0xf0 )
{ {
@ -526,7 +526,7 @@ SdrEscherImport::SdrEscherImport( PowerPointImportParam& rParam, const String& r
pFonts ( NULL ), pFonts ( NULL ),
nStreamLen ( 0 ), nStreamLen ( 0 ),
nTextStylesIndex ( 0xffff ), nTextStylesIndex ( 0xffff ),
eCharSetSystem ( gsl_getSystemTextEncoding() ), eCharSetSystem ( osl_getThreadTextEncoding() ),
bWingdingsChecked ( sal_False ), bWingdingsChecked ( sal_False ),
bWingdingsAvailable ( sal_False ), bWingdingsAvailable ( sal_False ),
bMonotypeSortsChecked ( sal_False ), bMonotypeSortsChecked ( sal_False ),

View File

@ -146,7 +146,7 @@ XMLFileWindow::XMLFileWindow( Window* pParent ) :
pVScrollbar(0), pVScrollbar(0),
nCurTextWidth(0), nCurTextWidth(0),
nStartLine(USHRT_MAX), nStartLine(USHRT_MAX),
eSourceEncoding(gsl_getSystemTextEncoding()), eSourceEncoding(osl_getThreadTextEncoding()),
bHighlighting(false) bHighlighting(false)
{ {
CreateTextEngine(); CreateTextEngine();

View File

@ -1043,7 +1043,7 @@ void ODatabaseForm::InsertTextPart( INetMIMEMessage& rParent, const ::rtl::OUStr
pChild->SetContentDisposition( aContentDisp ); pChild->SetContentDisposition( aContentDisp );
pChild->SetContentType( UniString::CreateFromAscii("text/plain") ); pChild->SetContentType( UniString::CreateFromAscii("text/plain") );
rtl_TextEncoding eSystemEncoding = gsl_getSystemTextEncoding(); rtl_TextEncoding eSystemEncoding = osl_getThreadTextEncoding();
const sal_Char* pBestMatchingEncoding = rtl_getBestMimeCharsetFromTextEncoding( eSystemEncoding ); const sal_Char* pBestMatchingEncoding = rtl_getBestMimeCharsetFromTextEncoding( eSystemEncoding );
UniString aBestMatchingEncoding = UniString::CreateFromAscii( pBestMatchingEncoding ); UniString aBestMatchingEncoding = UniString::CreateFromAscii( pBestMatchingEncoding );
pChild->SetContentTransferEncoding(aBestMatchingEncoding); pChild->SetContentTransferEncoding(aBestMatchingEncoding);

View File

@ -779,7 +779,7 @@ rtl::OUString SubstitutePathVariables::GetPathVariableValue() const
if ( pEnv ) if ( pEnv )
{ {
rtl::OUString aTmp; rtl::OUString aTmp;
rtl::OUString aPathList( pEnv, strlen( pEnv ), gsl_getSystemTextEncoding() ); rtl::OUString aPathList( pEnv, strlen( pEnv ), osl_getThreadTextEncoding() );
rtl::OUStringBuffer aPathStrBuffer( aPathList.getLength() * PATH_EXTEND_FACTOR / 100 ); rtl::OUStringBuffer aPathStrBuffer( aPathList.getLength() * PATH_EXTEND_FACTOR / 100 );
bool bAppendSep = false; bool bAppendSep = false;

View File

@ -82,7 +82,7 @@ void LwpAtomHolder::Read(LwpObjectStream *pStrm)
} }
m_nAtom = m_nAssocAtom = len; m_nAtom = m_nAssocAtom = len;
//rtl_TextEncoding rEncode = gsl_getSystemTextEncoding(); //rtl_TextEncoding rEncode = osl_getThreadTextEncoding();
rtl_TextEncoding rEncode = RTL_TEXTENCODING_MS_1252; rtl_TextEncoding rEncode = RTL_TEXTENCODING_MS_1252;
len = LwpTools::QuickReadUnicode(pStrm, m_String, diskSize-sizeof(diskSize), rEncode); len = LwpTools::QuickReadUnicode(pStrm, m_String, diskSize-sizeof(diskSize), rEncode);
} }

View File

@ -1084,7 +1084,7 @@ XFFrame* LwpDrawTextBox::CreateDrawObj(const rtl::OUString& rStyleName )
rtl_TextEncoding aEncoding; rtl_TextEncoding aEncoding;
if (!m_aTextRec.nTextCharacterSet) if (!m_aTextRec.nTextCharacterSet)
{ {
aEncoding = gsl_getSystemTextEncoding(); aEncoding = osl_getThreadTextEncoding();
} }
else else
{ {
@ -1283,7 +1283,7 @@ XFFrame* LwpDrawTextArt::CreateDrawObj(const rtl::OUString& rStyleName)
rtl_TextEncoding aEncoding; rtl_TextEncoding aEncoding;
if (!m_aTextArtRec.nTextCharacterSet) if (!m_aTextArtRec.nTextCharacterSet)
{ {
aEncoding = gsl_getSystemTextEncoding(); aEncoding = osl_getThreadTextEncoding();
} }
else else
{ {

View File

@ -724,7 +724,7 @@ void LwpGraphicObject::XFConvertEquation(XFContentContainer * pCont)
{ {
pEquData[nIndex] = pGrafData[nBegin + nIndex]; pEquData[nIndex] = pGrafData[nBegin + nIndex];
} }
pXFNotePara->Add(rtl::OUString((sal_Char*)pEquData, (nEnd - nBegin + 1), gsl_getSystemTextEncoding())); pXFNotePara->Add(rtl::OUString((sal_Char*)pEquData, (nEnd - nBegin + 1), osl_getThreadTextEncoding()));
delete [] pEquData; delete [] pEquData;
} }
pXFNote->Add(pXFNotePara); pXFNote->Add(pXFNotePara);

View File

@ -125,7 +125,7 @@ sal_Bool LwpFormulaInfo::ReadText()
*(pBuf.get()+nStrLen)='\0'; *(pBuf.get()+nStrLen)='\0';
String aText; String aText;
aText += String::CreateFromAscii("\""); aText += String::CreateFromAscii("\"");
aText.Append(String(pBuf.get(),nStrLen,gsl_getSystemTextEncoding())); aText.Append(String(pBuf.get(),nStrLen,osl_getThreadTextEncoding()));
aText += String::CreateFromAscii("\""); aText += String::CreateFromAscii("\"");
m_aStack.push_back(new LwpFormulaText(aText)); m_aStack.push_back(new LwpFormulaText(aText));

View File

@ -1015,7 +1015,7 @@ SvXMLImportContext *ORptFilter::CreateFontDeclsContext(
XMLFontStylesContext *pFSContext = XMLFontStylesContext *pFSContext =
new XMLFontStylesContext( *this, XML_NAMESPACE_OFFICE, new XMLFontStylesContext( *this, XML_NAMESPACE_OFFICE,
rLocalName, xAttrList, rLocalName, xAttrList,
gsl_getSystemTextEncoding() ); osl_getThreadTextEncoding() );
SetFontDecls( pFSContext ); SetFontDecls( pFSContext );
return pFSContext; return pFSContext;
} }

View File

@ -225,7 +225,7 @@ ScDocument::ScDocument( ScDocumentMode eMode,
{ {
SetStorageGrammar( formula::FormulaGrammar::GRAM_STORAGE_DEFAULT); SetStorageGrammar( formula::FormulaGrammar::GRAM_STORAGE_DEFAULT);
eSrcSet = gsl_getSystemTextEncoding(); eSrcSet = osl_getThreadTextEncoding();
if ( eMode == SCDOCMODE_DOCUMENT ) if ( eMode == SCDOCMODE_DOCUMENT )
{ {

View File

@ -572,7 +572,7 @@ void ScDocument::UpdateFontCharSet()
bool bUpdateOld = ( nSrcVer < SC_FONTCHARSET ); bool bUpdateOld = ( nSrcVer < SC_FONTCHARSET );
CharSet eSysSet = gsl_getSystemTextEncoding(); CharSet eSysSet = osl_getThreadTextEncoding();
if ( eSrcSet != eSysSet || bUpdateOld ) if ( eSrcSet != eSysSet || bUpdateOld )
{ {
sal_uInt32 nCount,i; sal_uInt32 nCount,i;

View File

@ -697,7 +697,7 @@ CharSet ScGlobal::GetCharsetValue( const String& rCharSet )
{ {
sal_Int32 nVal = rCharSet.ToInt32(); sal_Int32 nVal = rCharSet.ToInt32();
if ( !nVal || nVal == RTL_TEXTENCODING_DONTKNOW ) if ( !nVal || nVal == RTL_TEXTENCODING_DONTKNOW )
return gsl_getSystemTextEncoding(); return osl_getThreadTextEncoding();
return (CharSet) nVal; return (CharSet) nVal;
} }
// old CharSet values for compatibility // old CharSet values for compatibility
@ -710,7 +710,7 @@ CharSet ScGlobal::GetCharsetValue( const String& rCharSet )
else if (rCharSet.EqualsIgnoreCaseAscii("IBMPC_861")) return RTL_TEXTENCODING_IBM_861; else if (rCharSet.EqualsIgnoreCaseAscii("IBMPC_861")) return RTL_TEXTENCODING_IBM_861;
else if (rCharSet.EqualsIgnoreCaseAscii("IBMPC_863")) return RTL_TEXTENCODING_IBM_863; else if (rCharSet.EqualsIgnoreCaseAscii("IBMPC_863")) return RTL_TEXTENCODING_IBM_863;
else if (rCharSet.EqualsIgnoreCaseAscii("IBMPC_865")) return RTL_TEXTENCODING_IBM_865; else if (rCharSet.EqualsIgnoreCaseAscii("IBMPC_865")) return RTL_TEXTENCODING_IBM_865;
else return gsl_getSystemTextEncoding(); else return osl_getThreadTextEncoding();
} }
//------------------------------------------------------------------------ //------------------------------------------------------------------------

View File

@ -382,7 +382,7 @@ sal_Bool ScAutoFormatDataField::Load( SvStream& rStream, const ScAfVersions& rVe
} }
// adjust charset in font // adjust charset in font
CharSet eSysSet = gsl_getSystemTextEncoding(); CharSet eSysSet = osl_getThreadTextEncoding();
CharSet eSrcSet = rStream.GetStreamCharSet(); CharSet eSrcSet = rStream.GetStreamCharSet();
if( eSrcSet != eSysSet && aFont.GetCharSet() == eSrcSet ) if( eSrcSet != eSysSet && aFont.GetCharSet() == eSrcSet )
aFont.SetCharSet(eSysSet); aFont.SetCharSet(eSysSet);
@ -1130,7 +1130,7 @@ sal_Bool ScAutoFormat::Save()
rStream << nVal rStream << nVal
<< (sal_uInt8)2 // Anzahl von Zeichen des Headers incl. diesem << (sal_uInt8)2 // Anzahl von Zeichen des Headers incl. diesem
<< (sal_uInt8)::GetSOStoreTextEncoding( << (sal_uInt8)::GetSOStoreTextEncoding(
gsl_getSystemTextEncoding(), sal::static_int_cast<sal_uInt16>(rStream.GetVersion()) ); osl_getThreadTextEncoding(), sal::static_int_cast<sal_uInt16>(rStream.GetVersion()) );
ScAfVersions::Write(rStream); // Item-Versionen ScAfVersions::Write(rStream); // Item-Versionen
bRet = (rStream.GetError() == 0); bRet = (rStream.GetError() == 0);

View File

@ -45,7 +45,7 @@
TYPEINIT2(ScDdeLink,::sfx2::SvBaseLink,SfxBroadcaster); TYPEINIT2(ScDdeLink,::sfx2::SvBaseLink,SfxBroadcaster);
#define DDE_TXT_ENCODING gsl_getSystemTextEncoding() #define DDE_TXT_ENCODING osl_getThreadTextEncoding()
sal_Bool ScDdeLink::bIsInUpdate = false; sal_Bool ScDdeLink::bIsInUpdate = false;

View File

@ -2951,7 +2951,7 @@ void ScInterpreter::ScCode()
RTL_UNICODETOTEXT_FLAGS_UNDEFINED_DEFAULT | RTL_UNICODETOTEXT_FLAGS_UNDEFINED_DEFAULT |
RTL_UNICODETOTEXT_FLAGS_INVALID_DEFAULT | RTL_UNICODETOTEXT_FLAGS_INVALID_DEFAULT |
RTL_UNICODETOTEXT_FLAGS_UNDEFINED_REPLACE; RTL_UNICODETOTEXT_FLAGS_UNDEFINED_REPLACE;
PushInt( (sal_uChar) rtl::OUStringToOString(rtl::OUString(rStr.GetChar(0)), gsl_getSystemTextEncoding(), convertFlags).toChar() ); PushInt( (sal_uChar) rtl::OUStringToOString(rtl::OUString(rStr.GetChar(0)), osl_getThreadTextEncoding(), convertFlags).toChar() );
} }
@ -2971,7 +2971,7 @@ void ScInterpreter::ScChar()
RTL_TEXTTOUNICODE_FLAGS_INVALID_DEFAULT; RTL_TEXTTOUNICODE_FLAGS_INVALID_DEFAULT;
sal_Char cEncodedChar = static_cast<sal_Char>(fVal); sal_Char cEncodedChar = static_cast<sal_Char>(fVal);
rtl::OUString aStr(&cEncodedChar, 1, gsl_getSystemTextEncoding(), convertFlags); rtl::OUString aStr(&cEncodedChar, 1, osl_getThreadTextEncoding(), convertFlags);
PushString(aStr); PushString(aStr);
} }
} }

View File

@ -128,7 +128,7 @@ SEEEEEEE EEEEEEEE IMMMMMMM MMMMMMMM MMMMMMMM MMMMMMMM MMMMMMMM MMMMMMMM MMMMMMMM
rtl_TextEncoding ScfTools::GetSystemTextEncoding() rtl_TextEncoding ScfTools::GetSystemTextEncoding()
{ {
return gsl_getSystemTextEncoding(); return osl_getThreadTextEncoding();
} }
String ScfTools::GetHexStr( sal_uInt16 nValue ) String ScfTools::GetHexStr( sal_uInt16 nValue )

View File

@ -1923,7 +1923,7 @@ SvXMLImportContext *ScXMLImport::CreateFontDeclsContext(const sal_uInt16 nPrefix
const uno::Reference<xml::sax::XAttributeList>& xAttrList) const uno::Reference<xml::sax::XAttributeList>& xAttrList)
{ {
XMLFontStylesContext *pFSContext = new XMLFontStylesContext( XMLFontStylesContext *pFSContext = new XMLFontStylesContext(
*this, nPrefix, rLocalName, xAttrList, gsl_getSystemTextEncoding()); *this, nPrefix, rLocalName, xAttrList, osl_getThreadTextEncoding());
SetFontDecls(pFSContext); SetFontDecls(pFSContext);
SvXMLImportContext* pContext = pFSContext; SvXMLImportContext* pContext = pFSContext;
return pContext; return pContext;

View File

@ -56,7 +56,7 @@ ScAsciiOptions::ScAsciiOptions() :
bQuotedFieldAsText(false), bQuotedFieldAsText(false),
bDetectSpecialNumber(false), bDetectSpecialNumber(false),
cTextSep ( cDefaultTextSep ), cTextSep ( cDefaultTextSep ),
eCharSet ( gsl_getSystemTextEncoding() ), eCharSet ( osl_getThreadTextEncoding() ),
eLang ( LANGUAGE_SYSTEM ), eLang ( LANGUAGE_SYSTEM ),
bCharSetSystem ( false ), bCharSetSystem ( false ),
nStartRow ( 1 ), nStartRow ( 1 ),

View File

@ -113,7 +113,7 @@ String ScImportOptions::BuildString() const
void ScImportOptions::SetTextEncoding( rtl_TextEncoding nEnc ) void ScImportOptions::SetTextEncoding( rtl_TextEncoding nEnc )
{ {
eCharSet = (nEnc == RTL_TEXTENCODING_DONTKNOW ? eCharSet = (nEnc == RTL_TEXTENCODING_DONTKNOW ?
gsl_getSystemTextEncoding() : nEnc); osl_getThreadTextEncoding() : nEnc);
aStrFont = ScGlobal::GetCharsetString( nEnc ); aStrFont = ScGlobal::GetCharsetString( nEnc );
} }

View File

@ -387,7 +387,7 @@ ScImportAsciiDlg::ScImportAsciiDlg( Window* pParent,String aDatName,
// independent document linkage. // independent document linkage.
aLbCharSet.InsertTextEncoding( RTL_TEXTENCODING_DONTKNOW, aCharSetUser ); aLbCharSet.InsertTextEncoding( RTL_TEXTENCODING_DONTKNOW, aCharSetUser );
aLbCharSet.SelectTextEncoding( ePreselectUnicode == RTL_TEXTENCODING_DONTKNOW ? aLbCharSet.SelectTextEncoding( ePreselectUnicode == RTL_TEXTENCODING_DONTKNOW ?
gsl_getSystemTextEncoding() : ePreselectUnicode ); osl_getThreadTextEncoding() : ePreselectUnicode );
if( nCharSet >= 0 && ePreselectUnicode == RTL_TEXTENCODING_DONTKNOW ) if( nCharSet >= 0 && ePreselectUnicode == RTL_TEXTENCODING_DONTKNOW )
aLbCharSet.SelectEntryPos( static_cast<sal_uInt16>(nCharSet) ); aLbCharSet.SelectEntryPos( static_cast<sal_uInt16>(nCharSet) );
@ -563,7 +563,7 @@ void ScImportAsciiDlg::SetSelectedCharSet()
meCharSet = aLbCharSet.GetSelectTextEncoding(); meCharSet = aLbCharSet.GetSelectTextEncoding();
mbCharSetSystem = (meCharSet == RTL_TEXTENCODING_DONTKNOW); mbCharSetSystem = (meCharSet == RTL_TEXTENCODING_DONTKNOW);
if( mbCharSetSystem ) if( mbCharSetSystem )
meCharSet = gsl_getSystemTextEncoding(); meCharSet = osl_getThreadTextEncoding();
} }
String ScImportAsciiDlg::GetSeparators() const String ScImportAsciiDlg::GetSeparators() const

View File

@ -235,7 +235,7 @@ ScImportOptionsDlg::ScImportOptionsDlg(
} }
aLbFont.SelectTextEncoding( pOptions ? pOptions->eCharSet : aLbFont.SelectTextEncoding( pOptions ? pOptions->eCharSet :
gsl_getSystemTextEncoding() ); osl_getThreadTextEncoding() );
// optionaler Titel: // optionaler Titel:
if ( pStrTitle ) if ( pStrTitle )

View File

@ -2034,7 +2034,7 @@ long ScDocShell::DdeGetData( const String& rItem,
aDdeTextFmt.EqualsAscii( "FSYLK" ) ) aDdeTextFmt.EqualsAscii( "FSYLK" ) )
{ {
rtl::OString aData; rtl::OString aData;
if( aObj.ExportByteString( aData, gsl_getSystemTextEncoding(), if( aObj.ExportByteString( aData, osl_getThreadTextEncoding(),
SOT_FORMATSTR_ID_SYLK ) ) SOT_FORMATSTR_ID_SYLK ) )
{ {
rValue <<= ::com::sun::star::uno::Sequence< sal_Int8 >( rValue <<= ::com::sun::star::uno::Sequence< sal_Int8 >(
@ -2067,7 +2067,7 @@ long ScDocShell::DdeSetData( const String& rItem,
{ {
if( rItem.EqualsIgnoreCaseAscii( "Format" ) ) if( rItem.EqualsIgnoreCaseAscii( "Format" ) )
{ {
if ( ScByteSequenceToString::GetString( aDdeTextFmt, rValue, gsl_getSystemTextEncoding() ) ) if ( ScByteSequenceToString::GetString( aDdeTextFmt, rValue, osl_getThreadTextEncoding() ) )
{ {
aDdeTextFmt.ToUpperAscii(); aDdeTextFmt.ToUpperAscii();
return 1; return 1;
@ -2081,7 +2081,7 @@ long ScDocShell::DdeSetData( const String& rItem,
aDdeTextFmt.EqualsAscii( "FSYLK" ) ) aDdeTextFmt.EqualsAscii( "FSYLK" ) )
{ {
String aData; String aData;
if ( ScByteSequenceToString::GetString( aData, rValue, gsl_getSystemTextEncoding() ) ) if ( ScByteSequenceToString::GetString( aData, rValue, osl_getThreadTextEncoding() ) )
{ {
return aObj.ImportString( aData, SOT_FORMATSTR_ID_SYLK ) ? 1 : 0; return aObj.ImportString( aData, SOT_FORMATSTR_ID_SYLK ) ? 1 : 0;
} }

View File

@ -325,7 +325,7 @@ sal_Bool ScImportExport::ImportString( const ::rtl::OUString& rText, sal_uLong n
//break; //break;
default: default:
{ {
rtl_TextEncoding eEnc = gsl_getSystemTextEncoding(); rtl_TextEncoding eEnc = osl_getThreadTextEncoding();
::rtl::OString aTmp( rText.getStr(), rText.getLength(), eEnc ); ::rtl::OString aTmp( rText.getStr(), rText.getLength(), eEnc );
SvMemoryStream aStrm( (void*)aTmp.getStr(), aTmp.getLength() * sizeof(sal_Char), STREAM_READ ); SvMemoryStream aStrm( (void*)aTmp.getStr(), aTmp.getLength() * sizeof(sal_Char), STREAM_READ );
aStrm.SetStreamCharSet( eEnc ); aStrm.SetStreamCharSet( eEnc );
@ -341,7 +341,7 @@ sal_Bool ScImportExport::ExportString( ::rtl::OUString& rText, sal_uLong nFmt )
OSL_ENSURE( nFmt == FORMAT_STRING, "ScImportExport::ExportString: Unicode not supported for other formats than FORMAT_STRING" ); OSL_ENSURE( nFmt == FORMAT_STRING, "ScImportExport::ExportString: Unicode not supported for other formats than FORMAT_STRING" );
if ( nFmt != FORMAT_STRING ) if ( nFmt != FORMAT_STRING )
{ {
rtl_TextEncoding eEnc = gsl_getSystemTextEncoding(); rtl_TextEncoding eEnc = osl_getThreadTextEncoding();
rtl::OString aTmp; rtl::OString aTmp;
sal_Bool bOk = ExportByteString( aTmp, eEnc, nFmt ); sal_Bool bOk = ExportByteString( aTmp, eEnc, nFmt );
rText = rtl::OStringToOUString( aTmp, eEnc ); rText = rtl::OStringToOUString( aTmp, eEnc );
@ -372,7 +372,7 @@ sal_Bool ScImportExport::ExportByteString( rtl::OString& rText, rtl_TextEncoding
{ {
OSL_ENSURE( eEnc != RTL_TEXTENCODING_UNICODE, "ScImportExport::ExportByteString: Unicode not supported" ); OSL_ENSURE( eEnc != RTL_TEXTENCODING_UNICODE, "ScImportExport::ExportByteString: Unicode not supported" );
if ( eEnc == RTL_TEXTENCODING_UNICODE ) if ( eEnc == RTL_TEXTENCODING_UNICODE )
eEnc = gsl_getSystemTextEncoding(); eEnc = osl_getThreadTextEncoding();
if (!nSizeLimit) if (!nSizeLimit)
nSizeLimit = STRING_MAXLEN; nSizeLimit = STRING_MAXLEN;

View File

@ -189,7 +189,7 @@ sal_Bool ScServerObject::GetData(
aDdeTextFmt.EqualsAscii( "FSYLK" ) ) aDdeTextFmt.EqualsAscii( "FSYLK" ) )
{ {
rtl::OString aByteData; rtl::OString aByteData;
if( aObj.ExportByteString( aByteData, gsl_getSystemTextEncoding(), SOT_FORMATSTR_ID_SYLK ) ) if( aObj.ExportByteString( aByteData, osl_getThreadTextEncoding(), SOT_FORMATSTR_ID_SYLK ) )
{ {
rData <<= ::com::sun::star::uno::Sequence< sal_Int8 >( rData <<= ::com::sun::star::uno::Sequence< sal_Int8 >(
(const sal_Int8*)aByteData.getStr(), (const sal_Int8*)aByteData.getStr(),

View File

@ -676,7 +676,7 @@ bool ScViewFunc::PasteLink( const uno::Reference<datatransfer::XTransferable>& r
sal_Int32 nSeqLen = aSequence.getLength(); sal_Int32 nSeqLen = aSequence.getLength();
const char* p = reinterpret_cast<const char*>(aSequence.getConstArray()); const char* p = reinterpret_cast<const char*>(aSequence.getConstArray());
rtl_TextEncoding eSysEnc = gsl_getSystemTextEncoding(); rtl_TextEncoding eSysEnc = osl_getThreadTextEncoding();
// char array delimited by \0. // char array delimited by \0.
// app \0 topic \0 item \0 (extra \0) where the extra is optional. // app \0 topic \0 item \0 (extra \0) where the extra is optional.

View File

@ -111,7 +111,7 @@ SdPage::SdPage(SdDrawDocument& rNewDoc, StarBASIC* pBasic, sal_Bool bMasterPage)
, mbStopSound(sal_False) , mbStopSound(sal_False)
, mbScaleObjects(sal_True) , mbScaleObjects(sal_True)
, mbBackgroundFullSize( sal_False ) , mbBackgroundFullSize( sal_False )
, meCharSet(gsl_getSystemTextEncoding()) , meCharSet(osl_getThreadTextEncoding())
, mnPaperBin(PAPERBIN_PRINTER_SETTINGS) , mnPaperBin(PAPERBIN_PRINTER_SETTINGS)
, mpPageLink(NULL) , mpPageLink(NULL)
, mpItems(NULL) , mpItems(NULL)

View File

@ -597,7 +597,7 @@ void FuInsertFile::InsTextOrRTFinDrMode(SfxMedium* pMedium)
if (pDlg->IsLink()) if (pDlg->IsLink())
{ {
pTO->SetTextLink(aFile, aFilterName, gsl_getSystemTextEncoding() ); pTO->SetTextLink(aFile, aFilterName, osl_getThreadTextEncoding() );
} }
if( bUndo ) if( bUndo )

View File

@ -108,7 +108,7 @@ class SfxOleTextEncoding
{ {
public: public:
inline explicit SfxOleTextEncoding() : inline explicit SfxOleTextEncoding() :
mxTextEnc( new rtl_TextEncoding( gsl_getSystemTextEncoding() ) ) {} mxTextEnc( new rtl_TextEncoding( osl_getThreadTextEncoding() ) ) {}
inline explicit SfxOleTextEncoding( rtl_TextEncoding eTextEnc ) : inline explicit SfxOleTextEncoding( rtl_TextEncoding eTextEnc ) :
mxTextEnc( new rtl_TextEncoding( eTextEnc ) ) {} mxTextEnc( new rtl_TextEncoding( eTextEnc ) ) {}
inline explicit SfxOleTextEncoding( sal_Int16 nCodePage ) : inline explicit SfxOleTextEncoding( sal_Int16 nCodePage ) :

View File

@ -197,7 +197,7 @@ public:
// ----------- // -----------
Gallery::Gallery( const String& rMultiPath ) Gallery::Gallery( const String& rMultiPath )
: nReadTextEncoding ( gsl_getSystemTextEncoding() ) : nReadTextEncoding ( osl_getThreadTextEncoding() )
, nLastFileNumber ( 0 ) , nLastFileNumber ( 0 )
, bMultiPath ( sal_False ) , bMultiPath ( sal_False )
{ {
@ -533,7 +533,7 @@ void Gallery::ImplWriteImportList()
const sal_uInt32 nInventor = (sal_uInt32) COMPAT_FORMAT( 'S', 'G', 'A', '3' ); const sal_uInt32 nInventor = (sal_uInt32) COMPAT_FORMAT( 'S', 'G', 'A', '3' );
const sal_uInt16 nId = 0x0004; const sal_uInt16 nId = 0x0004;
*pOStm << nInventor << nId << (sal_uInt32) aImportList.size() << (sal_uInt16) gsl_getSystemTextEncoding(); *pOStm << nInventor << nId << (sal_uInt32) aImportList.size() << (sal_uInt16) osl_getThreadTextEncoding();
for ( size_t i = 0, n = aImportList.size(); i < n; ++i ) for ( size_t i = 0, n = aImportList.size(); i < n; ++i )
*pOStm << *aImportList[ i ]; *pOStm << *aImportList[ i ];

View File

@ -1363,7 +1363,7 @@ SvStream& GalleryTheme::WriteData( SvStream& rOStm ) const
rOStm << (sal_uInt16) 0x0004; rOStm << (sal_uInt16) 0x0004;
rOStm.WriteByteString(rtl::OUStringToOString(GetRealName(), RTL_TEXTENCODING_UTF8)); rOStm.WriteByteString(rtl::OUStringToOString(GetRealName(), RTL_TEXTENCODING_UTF8));
rOStm << nCount << (sal_uInt16) gsl_getSystemTextEncoding(); rOStm << nCount << (sal_uInt16) osl_getThreadTextEncoding();
for( sal_uInt32 i = 0; i < nCount; i++ ) for( sal_uInt32 i = 0; i < nCount; i++ )
{ {
@ -1488,7 +1488,7 @@ SvStream& GalleryTheme::ReadData( SvStream& rIStm )
rIStm >> pObj->nOffset; rIStm >> pObj->nOffset;
rIStm >> nTemp; pObj->eObjKind = (SgaObjKind) nTemp; rIStm >> nTemp; pObj->eObjKind = (SgaObjKind) nTemp;
aFileName = rtl::OStringToOUString(aTempFileName, gsl_getSystemTextEncoding()); aFileName = rtl::OStringToOUString(aTempFileName, osl_getThreadTextEncoding());
if( bRel ) if( bRel )
{ {

View File

@ -256,7 +256,7 @@ void _SdrItemBrowserControl::ImpCtor()
bShowWhichIds = sal_True; // not implemented yet bShowWhichIds = sal_True; // not implemented yet
bShowRealValues = sal_True; // not implemented yet bShowRealValues = sal_True; // not implemented yet
rtl_TextEncoding aTextEncoding = gsl_getSystemTextEncoding(); rtl_TextEncoding aTextEncoding = osl_getThreadTextEncoding();
InsertDataColumn( InsertDataColumn(
ITEMBROWSER_WHICHCOL_ID, ITEMBROWSER_WHICHCOL_ID,
@ -329,7 +329,7 @@ String _SdrItemBrowserControl::GetCellText(long _nRow, sal_uInt16 _nColId) const
} }
else else
{ {
rtl_TextEncoding aTextEncoding = gsl_getSystemTextEncoding(); rtl_TextEncoding aTextEncoding = osl_getThreadTextEncoding();
sRet = XubString("???", aTextEncoding); sRet = XubString("???", aTextEncoding);
switch (_nColId) switch (_nColId)
@ -927,7 +927,7 @@ void _SdrItemBrowserControl::SetAttributes(const SfxItemSet* pSet, const SfxItem
{ {
SetMode(MYBROWSEMODE & ~BROWSER_KEEPHIGHLIGHT); SetMode(MYBROWSEMODE & ~BROWSER_KEEPHIGHLIGHT);
if (pSet!=NULL) { if (pSet!=NULL) {
rtl_TextEncoding aTextEncoding = gsl_getSystemTextEncoding(); rtl_TextEncoding aTextEncoding = osl_getThreadTextEncoding();
sal_uInt16 nEntryNum=0; sal_uInt16 nEntryNum=0;
SfxWhichIter aIter(*pSet); SfxWhichIter aIter(*pSet);
const SfxItemPool* pPool=pSet->GetPool(); const SfxItemPool* pPool=pSet->GetPool();
@ -1074,7 +1074,7 @@ _SdrItemBrowserWindow::_SdrItemBrowserWindow(Window* pParent, WinBits nBits):
aBrowse(this) aBrowse(this)
{ {
SetOutputSizePixel(aBrowse.GetSizePixel()); SetOutputSizePixel(aBrowse.GetSizePixel());
SetText(String("Joe's ItemBrowser", gsl_getSystemTextEncoding())); SetText(String("Joe's ItemBrowser", osl_getThreadTextEncoding()));
aBrowse.Show(); aBrowse.Show();
} }

View File

@ -305,7 +305,7 @@ SdrModel::~SdrModel()
{ {
rtl::OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM( rtl::OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM(
"Im Dtor des SdrModel steht noch ein offenes Undo rum: \"")); "Im Dtor des SdrModel steht noch ein offenes Undo rum: \""));
aStr.append(rtl::OUStringToOString(pAktUndoGroup->GetComment(), gsl_getSystemTextEncoding())) aStr.append(rtl::OUStringToOString(pAktUndoGroup->GetComment(), osl_getThreadTextEncoding()))
.append('\"'); .append('\"');
OSL_FAIL(aStr.getStr()); OSL_FAIL(aStr.getStr());
} }

View File

@ -142,7 +142,7 @@ SdrObjUserData* ImpSdrObjTextLinkUserData::Clone(SdrObject* pObj1) const
void SdrTextObj::SetTextLink(const String& rFileName, const String& rFilterName, rtl_TextEncoding eCharSet) void SdrTextObj::SetTextLink(const String& rFileName, const String& rFilterName, rtl_TextEncoding eCharSet)
{ {
if(eCharSet == RTL_TEXTENCODING_DONTKNOW) if(eCharSet == RTL_TEXTENCODING_DONTKNOW)
eCharSet = gsl_getSystemTextEncoding(); eCharSet = osl_getThreadTextEncoding();
ImpSdrObjTextLinkUserData* pData=GetLinkUserData(); ImpSdrObjTextLinkUserData* pData=GetLinkUserData();
if (pData!=NULL) { if (pData!=NULL) {

View File

@ -546,7 +546,7 @@ void SdrUnoObj::SetUnoControlModel( const uno::Reference< awt::XControlModel >&
uno::Reference< beans::XPropertySet > xSet(xUnoControlModel, uno::UNO_QUERY); uno::Reference< beans::XPropertySet > xSet(xUnoControlModel, uno::UNO_QUERY);
if (xSet.is()) if (xSet.is())
{ {
uno::Any aValue( xSet->getPropertyValue(String("DefaultControl", gsl_getSystemTextEncoding())) ); uno::Any aValue( xSet->getPropertyValue(String("DefaultControl", osl_getThreadTextEncoding())) );
::rtl::OUString aStr; ::rtl::OUString aStr;
if( aValue >>= aStr ) if( aValue >>= aStr )
aUnoControlTypeName = String(aStr); aUnoControlTypeName = String(aStr);

View File

@ -47,7 +47,7 @@ XOutdevItemPool::XOutdevItemPool(
sal_uInt16 nAttrStart, sal_uInt16 nAttrStart,
sal_uInt16 nAttrEnd, sal_uInt16 nAttrEnd,
sal_Bool bLoadRefCounts) sal_Bool bLoadRefCounts)
: SfxItemPool(String("XOutdevItemPool", gsl_getSystemTextEncoding()), nAttrStart, nAttrEnd, 0L, 0L, bLoadRefCounts) : SfxItemPool(String("XOutdevItemPool", osl_getThreadTextEncoding()), nAttrStart, nAttrEnd, 0L, 0L, bLoadRefCounts)
{ {
// prepare some defaults // prepare some defaults
const XubString aNullStr; const XubString aNullStr;

View File

@ -97,7 +97,7 @@ public:
{ {
sFont.Erase(); sFont.Erase();
eCRLF_Flag = GetSystemLineEnd(); eCRLF_Flag = GetSystemLineEnd();
eCharSet = ::gsl_getSystemTextEncoding(); eCharSet = ::osl_getThreadTextEncoding();
nLanguage = 0; nLanguage = 0;
} }
// for the automatic conversion (mail/news/...) // for the automatic conversion (mail/news/...)

View File

@ -337,7 +337,7 @@ sal_Bool SwBoxAutoFmt::Load( SvStream& rStream, const SwAfVersions& rVersions, s
READ( aFont, SvxFontItem , rVersions.nFontVersion) READ( aFont, SvxFontItem , rVersions.nFontVersion)
if( rStream.GetStreamCharSet() == aFont.GetCharSet() ) if( rStream.GetStreamCharSet() == aFont.GetCharSet() )
aFont.SetCharSet(::gsl_getSystemTextEncoding()); aFont.SetCharSet(::osl_getThreadTextEncoding());
READ( aHeight, SvxFontHeightItem , rVersions.nFontHeightVersion) READ( aHeight, SvxFontHeightItem , rVersions.nFontHeightVersion)
READ( aWeight, SvxWeightItem , rVersions.nWeightVersion) READ( aWeight, SvxWeightItem , rVersions.nWeightVersion)
@ -425,7 +425,7 @@ sal_Bool SwBoxAutoFmt::LoadOld( SvStream& rStream, sal_uInt16 aLoadVer[] )
READ( aFont, SvxFontItem , 0) READ( aFont, SvxFontItem , 0)
if( rStream.GetStreamCharSet() == aFont.GetCharSet() ) if( rStream.GetStreamCharSet() == aFont.GetCharSet() )
aFont.SetCharSet(::gsl_getSystemTextEncoding()); aFont.SetCharSet(::osl_getThreadTextEncoding());
READ( aHeight, SvxFontHeightItem , 1) READ( aHeight, SvxFontHeightItem , 1)
READ( aWeight, SvxWeightItem , 2) READ( aWeight, SvxWeightItem , 2)
@ -1079,7 +1079,7 @@ sal_Bool SwTableAutoFmtTbl::Save( SvStream& rStream ) const
sal_uInt16 nVal = AUTOFORMAT_ID; sal_uInt16 nVal = AUTOFORMAT_ID;
rStream << nVal rStream << nVal
<< (sal_uInt8)2 // Anzahl von Zeichen des Headers incl. diesem << (sal_uInt8)2 // Anzahl von Zeichen des Headers incl. diesem
<< (sal_uInt8)GetStoreCharSet( ::gsl_getSystemTextEncoding() ); << (sal_uInt8)GetStoreCharSet( ::osl_getThreadTextEncoding() );
bRet = 0 == rStream.GetError(); bRet = 0 == rStream.GetError();

View File

@ -346,7 +346,7 @@ void SwEditShell::ApplyAutoMark()
SvStream& rStrm = *aMedium.GetInStream(); SvStream& rStrm = *aMedium.GetInStream();
const String sZero('0'); const String sZero('0');
Push(); Push();
rtl_TextEncoding eChrSet = ::gsl_getSystemTextEncoding(); rtl_TextEncoding eChrSet = ::osl_getThreadTextEncoding();
// //
// SearchOptions to be used in loop below // SearchOptions to be used in loop below

View File

@ -46,7 +46,7 @@
using rtl::OUString; using rtl::OUString;
using namespace ::com::sun::star; using namespace ::com::sun::star;
#define DDE_TXT_ENCODING gsl_getSystemTextEncoding() #define DDE_TXT_ENCODING osl_getThreadTextEncoding()
/*-------------------------------------------------------------------- /*--------------------------------------------------------------------
Beschreibung: Globale Variablen Beschreibung: Globale Variablen

View File

@ -378,7 +378,7 @@ SwHTMLParser::SwHTMLParser( SwDoc* pD, const SwPaM& rCrsr, SvStream& rIn,
if( pHeaderAttrs ) if( pHeaderAttrs )
SetEncodingByHTTPHeader( pHeaderAttrs ); SetEncodingByHTTPHeader( pHeaderAttrs );
} }
pCSS1Parser->SetDfltEncoding( gsl_getSystemTextEncoding() ); pCSS1Parser->SetDfltEncoding( osl_getThreadTextEncoding() );
// Timer nur bei ganz normalen Dokumenten aufsetzen! // Timer nur bei ganz normalen Dokumenten aufsetzen!
SwDocShell* pDocSh = pDoc->GetDocShell(); SwDocShell* pDocSh = pDoc->GetDocShell();
@ -3684,7 +3684,7 @@ void SwHTMLParser::NewFontAttr( int nToken )
String aFontName, aStyleName; String aFontName, aStyleName;
FontFamily eFamily = FAMILY_DONTKNOW; // Family und Pitch, FontFamily eFamily = FAMILY_DONTKNOW; // Family und Pitch,
FontPitch ePitch = PITCH_DONTKNOW; // falls nicht gefunden FontPitch ePitch = PITCH_DONTKNOW; // falls nicht gefunden
rtl_TextEncoding eEnc = gsl_getSystemTextEncoding(); rtl_TextEncoding eEnc = osl_getThreadTextEncoding();
if( aFace.Len() && !pCSS1Parser->IsIgnoreFontFamily() ) if( aFace.Len() && !pCSS1Parser->IsIgnoreFontFamily() )
{ {

View File

@ -1019,7 +1019,7 @@ SvXMLImportContext *SwXMLImport::CreateFontDeclsContext(
XMLFontStylesContext *pFSContext = XMLFontStylesContext *pFSContext =
new XMLFontStylesContext( *this, XML_NAMESPACE_OFFICE, new XMLFontStylesContext( *this, XML_NAMESPACE_OFFICE,
rLocalName, xAttrList, rLocalName, xAttrList,
gsl_getSystemTextEncoding() ); osl_getThreadTextEncoding() );
SetFontDecls( pFSContext ); SetFontDecls( pFSContext );
return pFSContext; return pFSContext;
} }

View File

@ -236,7 +236,7 @@ const SwNumRulesWithName& SwNumRulesWithName::operator=(const SwNumRulesWithName
SwNumRulesWithName::SwNumRulesWithName( SvStream &rStream, sal_uInt16 nVersion ) SwNumRulesWithName::SwNumRulesWithName( SvStream &rStream, sal_uInt16 nVersion )
{ {
CharSet eEncoding = gsl_getSystemTextEncoding(); CharSet eEncoding = osl_getThreadTextEncoding();
rStream.ReadByteString(aName, eEncoding); rStream.ReadByteString(aName, eEncoding);
char c; char c;
@ -275,7 +275,7 @@ void SwNumRulesWithName::MakeNumRule( SwWrtShell& rSh, SwNumRule& rChg ) const
void SwNumRulesWithName::Store( SvStream &rStream ) void SwNumRulesWithName::Store( SvStream &rStream )
{ {
CharSet eEncoding = gsl_getSystemTextEncoding(); CharSet eEncoding = osl_getThreadTextEncoding();
rStream.WriteByteString(aName, eEncoding); rStream.WriteByteString(aName, eEncoding);
for( sal_uInt16 n = 0; n < MAXLEVEL; ++n ) for( sal_uInt16 n = 0; n < MAXLEVEL; ++n )
@ -332,7 +332,7 @@ SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( SvStream& rStream,
sal_uInt16 nVersion ) sal_uInt16 nVersion )
: nCharPoolId( USHRT_MAX ) : nCharPoolId( USHRT_MAX )
{ {
CharSet eEncoding = gsl_getSystemTextEncoding(); CharSet eEncoding = osl_getThreadTextEncoding();
{ {
sal_uInt16 nUS; sal_uInt16 nUS;
sal_Char cChar; sal_Char cChar;
@ -466,7 +466,7 @@ SwNumRulesWithName::_SwNumFmtGlobal::~_SwNumFmtGlobal()
void SwNumRulesWithName::_SwNumFmtGlobal::Store( SvStream& rStream ) void SwNumRulesWithName::_SwNumFmtGlobal::Store( SvStream& rStream )
{ {
CharSet eEncoding = gsl_getSystemTextEncoding(); CharSet eEncoding = osl_getThreadTextEncoding();
{ {
String aName; String aName;
sal_uInt16 nFamily = FAMILY_DONTKNOW, nCharSet = 0, nPitch = 0; sal_uInt16 nFamily = FAMILY_DONTKNOW, nCharSet = 0, nPitch = 0;

View File

@ -848,7 +848,7 @@ sal_Bool SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
::rtl::Reference< MailDispatcher > xMailDispatcher; ::rtl::Reference< MailDispatcher > xMailDispatcher;
::rtl::OUString sBodyMimeType; ::rtl::OUString sBodyMimeType;
rtl_TextEncoding eEncoding = ::gsl_getSystemTextEncoding(); rtl_TextEncoding eEncoding = ::osl_getThreadTextEncoding();
if(bEMail) if(bEMail)
{ {

View File

@ -1044,7 +1044,7 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton)
nEnd = rConfigItem.GetMergedDocumentCount(); nEnd = rConfigItem.GetMergedDocumentCount();
} }
bool bAsBody = false; bool bAsBody = false;
rtl_TextEncoding eEncoding = ::gsl_getSystemTextEncoding(); rtl_TextEncoding eEncoding = ::osl_getThreadTextEncoding();
SfxFilterContainer* pFilterContainer = SwDocShell::Factory().GetFilterContainer(); SfxFilterContainer* pFilterContainer = SwDocShell::Factory().GetFilterContainer();
const SfxFilter *pSfxFlt = 0; const SfxFilter *pSfxFlt = 0;
sal_uLong nDocType = (sal_uLong)m_aSendAsLB.GetEntryData(m_aSendAsLB.GetSelectEntryPos()); sal_uLong nDocType = (sal_uLong)m_aSendAsLB.GetEntryData(m_aSendAsLB.GetSelectEntryPos());

View File

@ -372,7 +372,7 @@ IMPL_LINK( SwAsciiFilterDlg, CharSetSelHdl, SvxTextEncodingBox*, pBox )
nOldLng = nLng; nOldLng = nLng;
rtl_TextEncoding nChrSet = pBox->GetSelectTextEncoding(); rtl_TextEncoding nChrSet = pBox->GetSelectTextEncoding();
if( nChrSet == gsl_getSystemTextEncoding() ) if( nChrSet == osl_getThreadTextEncoding() )
eEnd = GetSystemLineEnd(); eEnd = GetSystemLineEnd();
else else
{ {

View File

@ -154,7 +154,7 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::datatransfer; using namespace ::com::sun::star::datatransfer;
using namespace nsTransferBufferType; using namespace nsTransferBufferType;
#define DDE_TXT_ENCODING gsl_getSystemTextEncoding() #define DDE_TXT_ENCODING osl_getThreadTextEncoding()
class SwTrnsfrDdeLink : public ::sfx2::SvBaseLink class SwTrnsfrDdeLink : public ::sfx2::SvBaseLink
{ {

View File

@ -163,7 +163,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
{ {
sTxt = rtl::OStringToOUString(rtl::OString::valueOf( sTxt = rtl::OStringToOUString(rtl::OString::valueOf(
((SwTblBoxValue*)aCntntAtPos.aFnd.pAttr)->GetValue()), ((SwTblBoxValue*)aCntntAtPos.aFnd.pAttr)->GetValue()),
gsl_getSystemTextEncoding()); osl_getThreadTextEncoding());
} }
break; break;
case SwContentAtPos::SW_CURR_ATTRS: case SwContentAtPos::SW_CURR_ATTRS:

View File

@ -230,7 +230,7 @@ SwSrcEditWindow::SwSrcEditWindow( Window* pParent, SwSrcView* pParentView ) :
nCurTextWidth(0), nCurTextWidth(0),
nStartLine(USHRT_MAX), nStartLine(USHRT_MAX),
eSourceEncoding(gsl_getSystemTextEncoding()), eSourceEncoding(osl_getThreadTextEncoding()),
bDoSyntaxHighlight(sal_True), bDoSyntaxHighlight(sal_True),
bHighlighting(sal_False) bHighlighting(sal_False)
{ {

View File

@ -4090,7 +4090,7 @@ void SwEntryBrowseBox::ReadEntries(SvStream& rInStr)
{ {
AutoMarkEntry* pToInsert = 0; AutoMarkEntry* pToInsert = 0;
const String sZero('0'); const String sZero('0');
rtl_TextEncoding eTEnc = gsl_getSystemTextEncoding(); rtl_TextEncoding eTEnc = osl_getThreadTextEncoding();
while( !rInStr.GetError() && !rInStr.IsEof() ) while( !rInStr.GetError() && !rInStr.IsEof() )
{ {
String sLine; String sLine;
@ -4151,7 +4151,7 @@ void SwEntryBrowseBox::WriteEntries(SvStream& rOutStr)
if(pController ->IsModified()) if(pController ->IsModified())
GoToColumnId(nCol < ITEM_CASE ? ++nCol : --nCol ); GoToColumnId(nCol < ITEM_CASE ? ++nCol : --nCol );
rtl_TextEncoding eTEnc = gsl_getSystemTextEncoding(); rtl_TextEncoding eTEnc = osl_getThreadTextEncoding();
for(sal_uInt16 i = 0; i < aEntryArr.Count();i++) for(sal_uInt16 i = 0; i < aEntryArr.Count();i++)
{ {
AutoMarkEntry* pEntry = aEntryArr[i]; AutoMarkEntry* pEntry = aEntryArr[i];

View File

@ -3105,7 +3105,7 @@ NaviContentBookmark::NaviContentBookmark( const String &rUrl,
void NaviContentBookmark::Copy( TransferDataContainer& rData ) const void NaviContentBookmark::Copy( TransferDataContainer& rData ) const
{ {
rtl_TextEncoding eSysCSet = gsl_getSystemTextEncoding(); rtl_TextEncoding eSysCSet = osl_getThreadTextEncoding();
rtl::OStringBuffer sStrBuf(rtl::OUStringToOString(aUrl, eSysCSet)); rtl::OStringBuffer sStrBuf(rtl::OUStringToOString(aUrl, eSysCSet));
sStrBuf.append(static_cast<char>(NAVI_BOOKMARK_DELIM)); sStrBuf.append(static_cast<char>(NAVI_BOOKMARK_DELIM));

View File

@ -80,13 +80,6 @@ typedef rtl_TextEncoding CharSet;
#endif // ENUM_CHARSET_DECLARED #endif // ENUM_CHARSET_DECLARED
inline rtl_TextEncoding gsl_getSystemTextEncoding()
{
return osl_getThreadTextEncoding();
}
// -----------------------------------------------------------------------
// ----------- // -----------
// - LineEnd - // - LineEnd -
// ----------- // -----------

View File

@ -264,7 +264,7 @@ void SalAbort( const rtl::OUString& rErrorText, bool bDumpCore )
fprintf( stderr, "Application Error " ); fprintf( stderr, "Application Error " );
else else
fprintf( stderr, "%s ", fprintf( stderr, "%s ",
rtl::OUStringToOString( rErrorText, gsl_getSystemTextEncoding() ).getStr() ); rtl::OUStringToOString( rErrorText, osl_getThreadTextEncoding() ).getStr() );
if( bDumpCore ) if( bDumpCore )
abort(); abort();
else else

View File

@ -148,7 +148,7 @@ void SalAbort( const XubString& rErrorText, bool bDumpCore )
fprintf( stderr, "Application Error " ); fprintf( stderr, "Application Error " );
else else
fprintf( stderr, "%s ", fprintf( stderr, "%s ",
ByteString( rErrorText, gsl_getSystemTextEncoding() ).GetBuffer() ); ByteString( rErrorText, osl_getThreadTextEncoding() ).GetBuffer() );
if( bDumpCore ) if( bDumpCore )
abort(); abort();
else else