diff options
author | David Tardon <dtardon@redhat.com> | 2011-11-24 12:06:54 +0100 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2011-11-25 09:07:49 +0100 |
commit | fba911fea7b87e332b8db9e511b875feedbcb59c (patch) | |
tree | 55e119a74d03fe61c4c7181dd295ed8cfa3d2427 | |
parent | 20c8eb409e2b48d57f392c146f7414bab3551664 (diff) |
gsl_getSystemTextEncoding -> osl_getThreadTextEncoding
80 files changed, 128 insertions, 135 deletions
diff --git a/automation/source/communi/communi.cxx b/automation/source/communi/communi.cxx index 13ae2f2ea5b2..d8fe49f4fe2d 100644 --- a/automation/source/communi/communi.cxx +++ b/automation/source/communi/communi.cxx @@ -396,7 +396,7 @@ CommunicationManagerClient::CommunicationManagerClient( sal_Bool bUseMultiChanne : MultiCommunicationManager( bUseMultiChannel ) { ByteString aApplication("Something inside "); - aApplication.Append( ByteString( DirEntry( Application::GetAppFileName() ).GetName(), gsl_getSystemTextEncoding() ) ); + aApplication.Append( ByteString( DirEntry( Application::GetAppFileName() ).GetName(), osl_getThreadTextEncoding() ) ); SetApplication( aApplication ); } 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() ); diff --git a/connectivity/source/drivers/ado/AConnection.cxx b/connectivity/source/drivers/ado/AConnection.cxx index 0ab23e892db1..097dae752f70 100644 --- a/connectivity/source/drivers/ado/AConnection.cxx +++ b/connectivity/source/drivers/ado/AConnection.cxx @@ -583,9 +583,9 @@ const OExtendedTypeInfo* OConnection::getTypeInfoFromType(const OTypeInfoMap& _r // we can not assert here because we could be in d&d /* 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(_sTypeName.getStr(), _sTypeName.getLength(), gsl_getSystemTextEncoding()) + += ::rtl::OString(_sTypeName.getStr(), _sTypeName.getLength(), osl_getThreadTextEncoding()) += ::rtl::OString(" matches the type's local name).")).getStr()); */ break; diff --git a/dbaccess/source/ui/browser/exsrcbrw.cxx b/dbaccess/source/ui/browser/exsrcbrw.cxx index 1328027ec22e..a33660d1469f 100644 --- a/dbaccess/source/ui/browser/exsrcbrw.cxx +++ b/dbaccess/source/ui/browser/exsrcbrw.cxx @@ -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(); } 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()) { diff --git a/dbaccess/source/ui/dlg/dbfindex.cxx b/dbaccess/source/ui/dlg/dbfindex.cxx index f15721a6e840..f1603ef7e7a1 100644 --- a/dbaccess/source/ui/dlg/dbfindex.cxx +++ b/dbaccess/source/ui/dlg/dbfindex.cxx @@ -395,7 +395,7 @@ void ODbaseIndexDialog::Init() // yes -> add to the tables index list 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 ) ); // and remove it from the free index list @@ -527,7 +527,7 @@ void OTableInfo::WriteInfFile( const String& rDSN ) const aInfFile.WriteKey( aKeyName.makeStringAndClear(), rtl::OUStringToOString(aIndex->GetIndexFileName(), - gsl_getSystemTextEncoding())); + osl_getThreadTextEncoding())); } aInfFile.Flush(); diff --git a/dbaccess/source/ui/misc/DExport.cxx b/dbaccess/source/ui/misc/DExport.cxx index 2ce3a919351b..4370245dc1da 100644 --- a/dbaccess/source/ui/misc/DExport.cxx +++ b/dbaccess/source/ui/misc/DExport.cxx @@ -115,7 +115,7 @@ ODatabaseExport::ODatabaseExport(sal_Int32 nRows, ,m_nColumnPos(0) ,m_nRows(1) ,m_nRowCount(0) - ,m_nDefToken( gsl_getSystemTextEncoding() ) + ,m_nDefToken( osl_getThreadTextEncoding() ) ,m_bError(sal_False) ,m_bInTbl(sal_False) ,m_bHead(sal_True) @@ -172,7 +172,7 @@ ODatabaseExport::ODatabaseExport(const SharedConnection& _rxConnection, ,m_nColumnPos(0) ,m_nRows(1) ,m_nRowCount(0) - ,m_nDefToken( gsl_getSystemTextEncoding() ) + ,m_nDefToken( osl_getThreadTextEncoding() ) ,m_bError(sal_False) ,m_bInTbl(sal_False) ,m_bHead(sal_True) diff --git a/dbaccess/source/ui/misc/TokenWriter.cxx b/dbaccess/source/ui/misc/TokenWriter.cxx index 98b9f4bbeea4..1c80d6f93e29 100644 --- a/dbaccess/source/ui/misc/TokenWriter.cxx +++ b/dbaccess/source/ui/misc/TokenWriter.cxx @@ -768,7 +768,7 @@ void OHTMLImportExport::WriteBody() IncIndent(1); TAG_ON_LF( OOO_STRING_SVTOOLS_HTML_style ); (*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 (*m_pStream) << "; " << sFontSize; 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_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 TAG_OFF( OOO_STRING_SVTOOLS_HTML_bold ); TAG_OFF( OOO_STRING_SVTOOLS_HTML_caption ); @@ -1060,7 +1060,7 @@ void OHTMLImportExport::FontOn() aStrOut = aStrOut + OOO_STRING_SVTOOLS_HTML_O_face; 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 aStrOut = aStrOut + "\""; aStrOut = aStrOut + " "; diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx index b0d2dfcbd3e0..86aec63afec0 100644 --- a/dbaccess/source/ui/misc/UITools.cxx +++ b/dbaccess/source/ui/misc/UITools.cxx @@ -401,9 +401,9 @@ TOTypeInfoSP getTypeInfoFromType(const OTypeInfoMap& _rTypeInfo, ) { 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(_sTypeName.getStr(), _sTypeName.getLength(), gsl_getSystemTextEncoding()) + += ::rtl::OString(_sTypeName.getStr(), _sTypeName.getLength(), osl_getThreadTextEncoding()) += ::rtl::OString(" matches the type's local name).")).getStr()); break; } diff --git a/editeng/source/editeng/editobj.cxx b/editeng/source/editeng/editobj.cxx index 6b4c4c5eaee6..8306c4d4f668 100644 --- a/editeng/source/editeng/editobj.cxx +++ b/editeng/source/editeng/editobj.cxx @@ -1040,7 +1040,7 @@ void BinTextObject::StoreData( SvStream& rOStream ) const } // 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; // The number of paragraphs ... diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx index 27bbcdcf9649..9ae75cd7aa40 100644 --- a/editeng/source/editeng/impedit4.cxx +++ b/editeng/source/editeng/impedit4.cxx @@ -430,7 +430,7 @@ sal_uInt32 ImpEditEngine::WriteRTF( SvStream& rOutput, EditSelection aSel ) CharSet eChrSet = pFontItem->GetCharSet(); DBG_ASSERT( eChrSet != 9, "SystemCharSet?!" ); if( RTL_TEXTENCODING_DONTKNOW == eChrSet ) - eChrSet = gsl_getSystemTextEncoding(); + eChrSet = osl_getThreadTextEncoding(); rOutput << OOO_STRING_SVTOOLS_RTF_FCHARSET; rOutput.WriteNumber( static_cast<sal_uInt32>( rtl_getBestWindowsCharsetFromTextEncoding( eChrSet ) ) ); diff --git a/editeng/source/items/numitem.cxx b/editeng/source/items/numitem.cxx index eb15ca51c5de..367b36bfc9ba 100644 --- a/editeng/source/items/numitem.cxx +++ b/editeng/source/items/numitem.cxx @@ -220,7 +220,7 @@ SvStream& SvxNumberFormat::Store(SvStream &rStream, FontToSubsFontConverter pC rStream << nLSpace; rStream << nCharTextDistance; - rtl_TextEncoding eEnc = gsl_getSystemTextEncoding(); + rtl_TextEncoding eEnc = osl_getThreadTextEncoding(); rStream.WriteByteString(sPrefix, eEnc); rStream.WriteByteString(sSuffix, eEnc); rStream.WriteByteString(sCharStyleName, eEnc); diff --git a/extensions/source/dbpilots/gridwizard.cxx b/extensions/source/dbpilots/gridwizard.cxx index 9fddfd0635e0..7db3aaf69868 100644 --- a/extensions/source/dbpilots/gridwizard.cxx +++ b/extensions/source/dbpilots/gridwizard.cxx @@ -228,7 +228,7 @@ namespace dbp catch(Exception&) { 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() ); } } diff --git a/extensions/source/plugin/base/context.cxx b/extensions/source/plugin/base/context.cxx index 2be54b8132d1..9497c540badd 100644 --- a/extensions/source/plugin/base/context.cxx +++ b/extensions/source/plugin/base/context.cxx @@ -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 ) : 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; 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" ); Reference< ::com::sun::star::io::XActiveDataControl > xControl( source, UNO_QUERY ); diff --git a/extensions/source/plugin/base/xplugin.cxx b/extensions/source/plugin/base/xplugin.cxx index 18e16414d770..0f99e887e48b 100644 --- a/extensions/source/plugin/base/xplugin.cxx +++ b/extensions/source/plugin/base/xplugin.cxx @@ -121,7 +121,7 @@ XPlugin_Impl::XPlugin_Impl( const uno::Reference< com::sun::star::lang::XMultiSe PluginControl_Impl(), m_xSMgr( rSMgr ), m_pPluginComm( NULL ), - m_aEncoding( gsl_getSystemTextEncoding() ), + m_aEncoding( osl_getThreadTextEncoding() ), m_pArgv( NULL ), m_pArgn( NULL ), m_nArgs( 0 ), diff --git a/extensions/source/scanner/grid.cxx b/extensions/source/scanner/grid.cxx index d0b76ce4c0e6..946ccc5b0ccd 100644 --- a/extensions/source/scanner/grid.cxx +++ b/extensions/source/scanner/grid.cxx @@ -350,7 +350,7 @@ void GridWindow::drawGrid() // draw tickmarks Point aPt = transform( fX, m_fMinY ); std::sprintf( pBuf, "%g", fX ); - String aMark( pBuf, gsl_getSystemTextEncoding() ); + String aMark( pBuf, osl_getThreadTextEncoding() ); Size aTextSize( GetTextWidth( aMark ), GetTextHeight() ); aPt.X() -= aTextSize.Width()/2; aPt.Y() += aTextSize.Height()/2; @@ -363,7 +363,7 @@ void GridWindow::drawGrid() // draw tickmarks Point aPt = transform( m_fMinX, fY ); std::sprintf( pBuf, "%g", fY ); - String aMark( pBuf, gsl_getSystemTextEncoding() ); + String aMark( pBuf, osl_getThreadTextEncoding() ); Size aTextSize( GetTextWidth( aMark ), GetTextHeight() ); aPt.X() -= aTextSize.Width() + 2; aPt.Y() -= aTextSize.Height()/2; diff --git a/extensions/source/scanner/sane.cxx b/extensions/source/scanner/sane.cxx index 48eae47edc91..23841a812cff 100644 --- a/extensions/source/scanner/sane.cxx +++ b/extensions/source/scanner/sane.cxx @@ -990,7 +990,7 @@ String Sane::GetOptionUnitName( int n ) if( nUnitAsSize > SAL_N_ELEMENTS( ppUnits ) ) aText = String::CreateFromAscii( "[unknown units]" ); else - aText = String( ppUnits[ nUnit ], gsl_getSystemTextEncoding() ); + aText = String( ppUnits[ nUnit ], osl_getThreadTextEncoding() ); return aText; } diff --git a/filter/source/graphicfilter/ios2met/ios2met.cxx b/filter/source/graphicfilter/ios2met/ios2met.cxx index 72e071665758..5319b9ff73f2 100644 --- a/filter/source/graphicfilter/ios2met/ios2met.cxx +++ b/filter/source/graphicfilter/ios2met/ios2met.cxx @@ -991,7 +991,7 @@ void OS2METReader::ReadChrStr(sal_Bool bGivenPos, sal_Bool bMove, sal_Bool bExtr for (i=0; i<nLen; i++) *pOS2MET >> pChr[i]; pChr[nLen] = 0; - String aStr( (const sal_Char*)pChr, gsl_getSystemTextEncoding() ); + String aStr( (const sal_Char*)pChr, osl_getThreadTextEncoding() ); SetRasterOp(aAttr.eChrMix); if (pVirDev->GetFont()!=aFont) pVirDev->SetFont(aFont); @@ -2273,7 +2273,7 @@ void OS2METReader::ReadFont(sal_uInt16 nFieldSize) pOS2MET->SeekRel(1); pOS2MET->Read( &str, 32 ); 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 ) aStr = String::CreateFromAscii( "Helvetica" ); pF->aFont.SetName( aStr ); diff --git a/filter/source/graphicfilter/ipict/ipict.cxx b/filter/source/graphicfilter/ipict/ipict.cxx index 8b94572728bb..dc2ef25760e9 100644 --- a/filter/source/graphicfilter/ipict/ipict.cxx +++ b/filter/source/graphicfilter/ipict/ipict.cxx @@ -316,8 +316,8 @@ rtl_TextEncoding PictReader::GetTextEncoding (sal_uInt16 fId) { static bool first = true; static rtl_TextEncoding enc = RTL_TEXTENCODING_APPLE_ROMAN; if (first) { - rtl_TextEncoding def = gsl_getSystemTextEncoding(); - // we keep gsl_getSystemTextEncoding only if it is a mac encoding + rtl_TextEncoding def = osl_getThreadTextEncoding(); + // we keep osl_getThreadTextEncoding only if it is a mac encoding switch(def) { case RTL_TEXTENCODING_APPLE_ROMAN: case RTL_TEXTENCODING_APPLE_ARABIC: @@ -1502,7 +1502,7 @@ sal_uLong PictReader::ReadData(sal_uInt16 nOpcode) *pPict >> nByteLen; nLen=((sal_uInt16)nByteLen)&0x00ff; pPict->Read( &sFName, nLen ); sFName[ nLen ] = 0; - String aString( (const sal_Char*)&sFName, gsl_getSystemTextEncoding() ); + String aString( (const sal_Char*)&sFName, osl_getThreadTextEncoding() ); aActFont.SetName( aString ); eActMethod=PDM_UNDEFINED; break; diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index 49b95891421b..769c57420ab5 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -7061,7 +7061,7 @@ sal_Bool SvxMSDffManager::ConvertToOle2( SvStream& rStm, sal_uInt32 nReadLen, { sal_Char * pBuf = new sal_Char[ 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; } else diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx index 2f0cf778e067..f534f3472e80 100644 --- a/filter/source/msfilter/svdfppt.cxx +++ b/filter/source/msfilter/svdfppt.cxx @@ -402,7 +402,7 @@ SvStream& operator>>( SvStream& rIn, PptFontEntityAtom& rAtom ) break; default : - rAtom.eCharSet = gsl_getSystemTextEncoding(); + rAtom.eCharSet = osl_getThreadTextEncoding(); } switch ( lfPitchAndFamily & 0xf0 ) { @@ -526,7 +526,7 @@ SdrEscherImport::SdrEscherImport( PowerPointImportParam& rParam, const String& r pFonts ( NULL ), nStreamLen ( 0 ), nTextStylesIndex ( 0xffff ), - eCharSetSystem ( gsl_getSystemTextEncoding() ), + eCharSetSystem ( osl_getThreadTextEncoding() ), bWingdingsChecked ( sal_False ), bWingdingsAvailable ( sal_False ), bMonotypeSortsChecked ( sal_False ), diff --git a/filter/source/xsltdialog/xmlfileview.cxx b/filter/source/xsltdialog/xmlfileview.cxx index 87b71a4d2833..58133dc0a097 100644 --- a/filter/source/xsltdialog/xmlfileview.cxx +++ b/filter/source/xsltdialog/xmlfileview.cxx @@ -146,7 +146,7 @@ XMLFileWindow::XMLFileWindow( Window* pParent ) : pVScrollbar(0), nCurTextWidth(0), nStartLine(USHRT_MAX), - eSourceEncoding(gsl_getSystemTextEncoding()), + eSourceEncoding(osl_getThreadTextEncoding()), bHighlighting(false) { CreateTextEngine(); diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx index f61fde297a9f..21461c2089b9 100644 --- a/forms/source/component/DatabaseForm.cxx +++ b/forms/source/component/DatabaseForm.cxx @@ -1043,7 +1043,7 @@ void ODatabaseForm::InsertTextPart( INetMIMEMessage& rParent, const ::rtl::OUStr pChild->SetContentDisposition( aContentDisp ); pChild->SetContentType( UniString::CreateFromAscii("text/plain") ); - rtl_TextEncoding eSystemEncoding = gsl_getSystemTextEncoding(); + rtl_TextEncoding eSystemEncoding = osl_getThreadTextEncoding(); const sal_Char* pBestMatchingEncoding = rtl_getBestMimeCharsetFromTextEncoding( eSystemEncoding ); UniString aBestMatchingEncoding = UniString::CreateFromAscii( pBestMatchingEncoding ); pChild->SetContentTransferEncoding(aBestMatchingEncoding); diff --git a/framework/source/services/substitutepathvars.cxx b/framework/source/services/substitutepathvars.cxx index 0958fdc2b032..c9627bfebaa1 100644 --- a/framework/source/services/substitutepathvars.cxx +++ b/framework/source/services/substitutepathvars.cxx @@ -779,7 +779,7 @@ rtl::OUString SubstitutePathVariables::GetPathVariableValue() const if ( pEnv ) { 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 ); bool bAppendSep = false; diff --git a/lotuswordpro/source/filter/lwpatomholder.cxx b/lotuswordpro/source/filter/lwpatomholder.cxx index de680fe9350a..922ef6550c83 100644 --- a/lotuswordpro/source/filter/lwpatomholder.cxx +++ b/lotuswordpro/source/filter/lwpatomholder.cxx @@ -82,7 +82,7 @@ void LwpAtomHolder::Read(LwpObjectStream *pStrm) } m_nAtom = m_nAssocAtom = len; - //rtl_TextEncoding rEncode = gsl_getSystemTextEncoding(); + //rtl_TextEncoding rEncode = osl_getThreadTextEncoding(); rtl_TextEncoding rEncode = RTL_TEXTENCODING_MS_1252; len = LwpTools::QuickReadUnicode(pStrm, m_String, diskSize-sizeof(diskSize), rEncode); } diff --git a/lotuswordpro/source/filter/lwpdrawobj.cxx b/lotuswordpro/source/filter/lwpdrawobj.cxx index 745990244ff9..e0eeea1e95aa 100644 --- a/lotuswordpro/source/filter/lwpdrawobj.cxx +++ b/lotuswordpro/source/filter/lwpdrawobj.cxx @@ -1084,7 +1084,7 @@ XFFrame* LwpDrawTextBox::CreateDrawObj(const rtl::OUString& rStyleName ) rtl_TextEncoding aEncoding; if (!m_aTextRec.nTextCharacterSet) { - aEncoding = gsl_getSystemTextEncoding(); + aEncoding = osl_getThreadTextEncoding(); } else { @@ -1283,7 +1283,7 @@ XFFrame* LwpDrawTextArt::CreateDrawObj(const rtl::OUString& rStyleName) rtl_TextEncoding aEncoding; if (!m_aTextArtRec.nTextCharacterSet) { - aEncoding = gsl_getSystemTextEncoding(); + aEncoding = osl_getThreadTextEncoding(); } else { diff --git a/lotuswordpro/source/filter/lwpgrfobj.cxx b/lotuswordpro/source/filter/lwpgrfobj.cxx index f836c7afc723..d77dbcb863fe 100644 --- a/lotuswordpro/source/filter/lwpgrfobj.cxx +++ b/lotuswordpro/source/filter/lwpgrfobj.cxx @@ -724,7 +724,7 @@ void LwpGraphicObject::XFConvertEquation(XFContentContainer * pCont) { 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; } pXFNote->Add(pXFNotePara); diff --git a/lotuswordpro/source/filter/lwptblformula.cxx b/lotuswordpro/source/filter/lwptblformula.cxx index 23c207b2aa2b..0647a1d4142e 100644 --- a/lotuswordpro/source/filter/lwptblformula.cxx +++ b/lotuswordpro/source/filter/lwptblformula.cxx @@ -125,7 +125,7 @@ sal_Bool LwpFormulaInfo::ReadText() *(pBuf.get()+nStrLen)='\0'; String aText; aText += String::CreateFromAscii("\""); - aText.Append(String(pBuf.get(),nStrLen,gsl_getSystemTextEncoding())); + aText.Append(String(pBuf.get(),nStrLen,osl_getThreadTextEncoding())); aText += String::CreateFromAscii("\""); m_aStack.push_back(new LwpFormulaText(aText)); diff --git a/reportdesign/source/filter/xml/xmlfilter.cxx b/reportdesign/source/filter/xml/xmlfilter.cxx index ee31100a5227..a8c9b69eb593 100644 --- a/reportdesign/source/filter/xml/xmlfilter.cxx +++ b/reportdesign/source/filter/xml/xmlfilter.cxx @@ -1015,7 +1015,7 @@ SvXMLImportContext *ORptFilter::CreateFontDeclsContext( XMLFontStylesContext *pFSContext = new XMLFontStylesContext( *this, XML_NAMESPACE_OFFICE, rLocalName, xAttrList, - gsl_getSystemTextEncoding() ); + osl_getThreadTextEncoding() ); SetFontDecls( pFSContext ); return pFSContext; } diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx index ae68670d0836..3ff97ed4fc0a 100644 --- a/sc/source/core/data/documen2.cxx +++ b/sc/source/core/data/documen2.cxx @@ -225,7 +225,7 @@ ScDocument::ScDocument( ScDocumentMode eMode, { SetStorageGrammar( formula::FormulaGrammar::GRAM_STORAGE_DEFAULT); - eSrcSet = gsl_getSystemTextEncoding(); + eSrcSet = osl_getThreadTextEncoding(); if ( eMode == SCDOCMODE_DOCUMENT ) { diff --git a/sc/source/core/data/documen9.cxx b/sc/source/core/data/documen9.cxx index e0ef5f30ccb1..df140ba64376 100644 --- a/sc/source/core/data/documen9.cxx +++ b/sc/source/core/data/documen9.cxx @@ -572,7 +572,7 @@ void ScDocument::UpdateFontCharSet() bool bUpdateOld = ( nSrcVer < SC_FONTCHARSET ); - CharSet eSysSet = gsl_getSystemTextEncoding(); + CharSet eSysSet = osl_getThreadTextEncoding(); if ( eSrcSet != eSysSet || bUpdateOld ) { sal_uInt32 nCount,i; diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx index 48e8f45a5d4f..d655d6a5f0a0 100644 --- a/sc/source/core/data/global.cxx +++ b/sc/source/core/data/global.cxx @@ -697,7 +697,7 @@ CharSet ScGlobal::GetCharsetValue( const String& rCharSet ) { sal_Int32 nVal = rCharSet.ToInt32(); if ( !nVal || nVal == RTL_TEXTENCODING_DONTKNOW ) - return gsl_getSystemTextEncoding(); + return osl_getThreadTextEncoding(); return (CharSet) nVal; } // 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_863")) return RTL_TEXTENCODING_IBM_863; else if (rCharSet.EqualsIgnoreCaseAscii("IBMPC_865")) return RTL_TEXTENCODING_IBM_865; - else return gsl_getSystemTextEncoding(); + else return osl_getThreadTextEncoding(); } //------------------------------------------------------------------------ diff --git a/sc/source/core/tool/autoform.cxx b/sc/source/core/tool/autoform.cxx index c288e9f3ee57..bed7269cfc4e 100644 --- a/sc/source/core/tool/autoform.cxx +++ b/sc/source/core/tool/autoform.cxx @@ -382,7 +382,7 @@ sal_Bool ScAutoFormatDataField::Load( SvStream& rStream, const ScAfVersions& rVe } // adjust charset in font - CharSet eSysSet = gsl_getSystemTextEncoding(); + CharSet eSysSet = osl_getThreadTextEncoding(); CharSet eSrcSet = rStream.GetStreamCharSet(); if( eSrcSet != eSysSet && aFont.GetCharSet() == eSrcSet ) aFont.SetCharSet(eSysSet); @@ -1130,7 +1130,7 @@ sal_Bool ScAutoFormat::Save() rStream << nVal << (sal_uInt8)2 // Anzahl von Zeichen des Headers incl. diesem << (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 bRet = (rStream.GetError() == 0); diff --git a/sc/source/core/tool/ddelink.cxx b/sc/source/core/tool/ddelink.cxx index 80e2438308a9..bb7fda3c1b99 100644 --- a/sc/source/core/tool/ddelink.cxx +++ b/sc/source/core/tool/ddelink.cxx @@ -45,7 +45,7 @@ TYPEINIT2(ScDdeLink,::sfx2::SvBaseLink,SfxBroadcaster); -#define DDE_TXT_ENCODING gsl_getSystemTextEncoding() +#define DDE_TXT_ENCODING osl_getThreadTextEncoding() sal_Bool ScDdeLink::bIsInUpdate = false; diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx index 739c321b242e..be55bfedd517 100644 --- a/sc/source/core/tool/interpr1.cxx +++ b/sc/source/core/tool/interpr1.cxx @@ -2951,7 +2951,7 @@ void ScInterpreter::ScCode() RTL_UNICODETOTEXT_FLAGS_UNDEFINED_DEFAULT | RTL_UNICODETOTEXT_FLAGS_INVALID_DEFAULT | 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; 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); } } diff --git a/sc/source/filter/ftools/ftools.cxx b/sc/source/filter/ftools/ftools.cxx index e34bd7863634..e9e3b1177b43 100644 --- a/sc/source/filter/ftools/ftools.cxx +++ b/sc/source/filter/ftools/ftools.cxx @@ -128,7 +128,7 @@ SEEEEEEE EEEEEEEE IMMMMMMM MMMMMMMM MMMMMMMM MMMMMMMM MMMMMMMM MMMMMMMM MMMMMMMM rtl_TextEncoding ScfTools::GetSystemTextEncoding() { - return gsl_getSystemTextEncoding(); + return osl_getThreadTextEncoding(); } String ScfTools::GetHexStr( sal_uInt16 nValue ) diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx index 82032faa40be..c205830acf18 100644 --- a/sc/source/filter/xml/xmlimprt.cxx +++ b/sc/source/filter/xml/xmlimprt.cxx @@ -1923,7 +1923,7 @@ SvXMLImportContext *ScXMLImport::CreateFontDeclsContext(const sal_uInt16 nPrefix const uno::Reference<xml::sax::XAttributeList>& xAttrList) { XMLFontStylesContext *pFSContext = new XMLFontStylesContext( - *this, nPrefix, rLocalName, xAttrList, gsl_getSystemTextEncoding()); + *this, nPrefix, rLocalName, xAttrList, osl_getThreadTextEncoding()); SetFontDecls(pFSContext); SvXMLImportContext* pContext = pFSContext; return pContext; diff --git a/sc/source/ui/dbgui/asciiopt.cxx b/sc/source/ui/dbgui/asciiopt.cxx index f328b0a67e3d..f68ba2d2ca2b 100644 --- a/sc/source/ui/dbgui/asciiopt.cxx +++ b/sc/source/ui/dbgui/asciiopt.cxx @@ -56,7 +56,7 @@ ScAsciiOptions::ScAsciiOptions() : bQuotedFieldAsText(false), bDetectSpecialNumber(false), cTextSep ( cDefaultTextSep ), - eCharSet ( gsl_getSystemTextEncoding() ), + eCharSet ( osl_getThreadTextEncoding() ), eLang ( LANGUAGE_SYSTEM ), bCharSetSystem ( false ), nStartRow ( 1 ), diff --git a/sc/source/ui/dbgui/imoptdlg.cxx b/sc/source/ui/dbgui/imoptdlg.cxx index 56946006ce02..9c8ca82257cd 100644 --- a/sc/source/ui/dbgui/imoptdlg.cxx +++ b/sc/source/ui/dbgui/imoptdlg.cxx @@ -113,7 +113,7 @@ String ScImportOptions::BuildString() const void ScImportOptions::SetTextEncoding( rtl_TextEncoding nEnc ) { eCharSet = (nEnc == RTL_TEXTENCODING_DONTKNOW ? - gsl_getSystemTextEncoding() : nEnc); + osl_getThreadTextEncoding() : nEnc); aStrFont = ScGlobal::GetCharsetString( nEnc ); } diff --git a/sc/source/ui/dbgui/scuiasciiopt.cxx b/sc/source/ui/dbgui/scuiasciiopt.cxx index 9806e80659a0..3d36cd8e4455 100644 --- a/sc/source/ui/dbgui/scuiasciiopt.cxx +++ b/sc/source/ui/dbgui/scuiasciiopt.cxx @@ -387,7 +387,7 @@ ScImportAsciiDlg::ScImportAsciiDlg( Window* pParent,String aDatName, // independent document linkage. aLbCharSet.InsertTextEncoding( RTL_TEXTENCODING_DONTKNOW, aCharSetUser ); aLbCharSet.SelectTextEncoding( ePreselectUnicode == RTL_TEXTENCODING_DONTKNOW ? - gsl_getSystemTextEncoding() : ePreselectUnicode ); + osl_getThreadTextEncoding() : ePreselectUnicode ); if( nCharSet >= 0 && ePreselectUnicode == RTL_TEXTENCODING_DONTKNOW ) aLbCharSet.SelectEntryPos( static_cast<sal_uInt16>(nCharSet) ); @@ -563,7 +563,7 @@ void ScImportAsciiDlg::SetSelectedCharSet() meCharSet = aLbCharSet.GetSelectTextEncoding(); mbCharSetSystem = (meCharSet == RTL_TEXTENCODING_DONTKNOW); if( mbCharSetSystem ) - meCharSet = gsl_getSystemTextEncoding(); + meCharSet = osl_getThreadTextEncoding(); } String ScImportAsciiDlg::GetSeparators() const diff --git a/sc/source/ui/dbgui/scuiimoptdlg.cxx b/sc/source/ui/dbgui/scuiimoptdlg.cxx index 4fa3e6868875..8279092b7e60 100644 --- a/sc/source/ui/dbgui/scuiimoptdlg.cxx +++ b/sc/source/ui/dbgui/scuiimoptdlg.cxx @@ -235,7 +235,7 @@ ScImportOptionsDlg::ScImportOptionsDlg( } aLbFont.SelectTextEncoding( pOptions ? pOptions->eCharSet : - gsl_getSystemTextEncoding() ); + osl_getThreadTextEncoding() ); // optionaler Titel: if ( pStrTitle ) diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx index 9f6186a7c909..1494834d1936 100644 --- a/sc/source/ui/docshell/docsh4.cxx +++ b/sc/source/ui/docshell/docsh4.cxx @@ -2034,7 +2034,7 @@ long ScDocShell::DdeGetData( const String& rItem, aDdeTextFmt.EqualsAscii( "FSYLK" ) ) { rtl::OString aData; - if( aObj.ExportByteString( aData, gsl_getSystemTextEncoding(), + if( aObj.ExportByteString( aData, osl_getThreadTextEncoding(), SOT_FORMATSTR_ID_SYLK ) ) { rValue <<= ::com::sun::star::uno::Sequence< sal_Int8 >( @@ -2067,7 +2067,7 @@ long ScDocShell::DdeSetData( const String& rItem, { if( rItem.EqualsIgnoreCaseAscii( "Format" ) ) { - if ( ScByteSequenceToString::GetString( aDdeTextFmt, rValue, gsl_getSystemTextEncoding() ) ) + if ( ScByteSequenceToString::GetString( aDdeTextFmt, rValue, osl_getThreadTextEncoding() ) ) { aDdeTextFmt.ToUpperAscii(); return 1; @@ -2081,7 +2081,7 @@ long ScDocShell::DdeSetData( const String& rItem, aDdeTextFmt.EqualsAscii( "FSYLK" ) ) { 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; } diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx index a10affc84d5b..9d744bde320f 100644 --- a/sc/source/ui/docshell/impex.cxx +++ b/sc/source/ui/docshell/impex.cxx @@ -325,7 +325,7 @@ sal_Bool ScImportExport::ImportString( const ::rtl::OUString& rText, sal_uLong n //break; default: { - rtl_TextEncoding eEnc = gsl_getSystemTextEncoding(); + rtl_TextEncoding eEnc = osl_getThreadTextEncoding(); ::rtl::OString aTmp( rText.getStr(), rText.getLength(), eEnc ); SvMemoryStream aStrm( (void*)aTmp.getStr(), aTmp.getLength() * sizeof(sal_Char), STREAM_READ ); 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" ); if ( nFmt != FORMAT_STRING ) { - rtl_TextEncoding eEnc = gsl_getSystemTextEncoding(); + rtl_TextEncoding eEnc = osl_getThreadTextEncoding(); rtl::OString aTmp; sal_Bool bOk = ExportByteString( aTmp, eEnc, nFmt ); 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" ); if ( eEnc == RTL_TEXTENCODING_UNICODE ) - eEnc = gsl_getSystemTextEncoding(); + eEnc = osl_getThreadTextEncoding(); if (!nSizeLimit) nSizeLimit = STRING_MAXLEN; diff --git a/sc/source/ui/docshell/servobj.cxx b/sc/source/ui/docshell/servobj.cxx index 90c497ea6688..2bbff8fb3050 100644 --- a/sc/source/ui/docshell/servobj.cxx +++ b/sc/source/ui/docshell/servobj.cxx @@ -189,7 +189,7 @@ sal_Bool ScServerObject::GetData( aDdeTextFmt.EqualsAscii( "FSYLK" ) ) { 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 >( (const sal_Int8*)aByteData.getStr(), diff --git a/sc/source/ui/view/viewfun5.cxx b/sc/source/ui/view/viewfun5.cxx index f5571aba06e9..14ec8008c913 100644 --- a/sc/source/ui/view/viewfun5.cxx +++ b/sc/source/ui/view/viewfun5.cxx @@ -676,7 +676,7 @@ bool ScViewFunc::PasteLink( const uno::Reference<datatransfer::XTransferable>& r sal_Int32 nSeqLen = aSequence.getLength(); const char* p = reinterpret_cast<const char*>(aSequence.getConstArray()); - rtl_TextEncoding eSysEnc = gsl_getSystemTextEncoding(); + rtl_TextEncoding eSysEnc = osl_getThreadTextEncoding(); // char array delimited by \0. // app \0 topic \0 item \0 (extra \0) where the extra is optional. diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx index e1b8a2357aff..44dc6aa832dc 100644 --- a/sd/source/core/sdpage.cxx +++ b/sd/source/core/sdpage.cxx @@ -111,7 +111,7 @@ SdPage::SdPage(SdDrawDocument& rNewDoc, StarBASIC* pBasic, sal_Bool bMasterPage) , mbStopSound(sal_False) , mbScaleObjects(sal_True) , mbBackgroundFullSize( sal_False ) -, meCharSet(gsl_getSystemTextEncoding()) +, meCharSet(osl_getThreadTextEncoding()) , mnPaperBin(PAPERBIN_PRINTER_SETTINGS) , mpPageLink(NULL) , mpItems(NULL) diff --git a/sd/source/ui/func/fuinsfil.cxx b/sd/source/ui/func/fuinsfil.cxx index b98f14fe73c8..84de295daa27 100644 --- a/sd/source/ui/func/fuinsfil.cxx +++ b/sd/source/ui/func/fuinsfil.cxx @@ -597,7 +597,7 @@ void FuInsertFile::InsTextOrRTFinDrMode(SfxMedium* pMedium) if (pDlg->IsLink()) { - pTO->SetTextLink(aFile, aFilterName, gsl_getSystemTextEncoding() ); + pTO->SetTextLink(aFile, aFilterName, osl_getThreadTextEncoding() ); } if( bUndo ) diff --git a/sfx2/source/doc/oleprops.hxx b/sfx2/source/doc/oleprops.hxx index 85337322eb40..b725cea5e3fb 100644 --- a/sfx2/source/doc/oleprops.hxx +++ b/sfx2/source/doc/oleprops.hxx @@ -108,7 +108,7 @@ class SfxOleTextEncoding { public: inline explicit SfxOleTextEncoding() : - mxTextEnc( new rtl_TextEncoding( gsl_getSystemTextEncoding() ) ) {} + mxTextEnc( new rtl_TextEncoding( osl_getThreadTextEncoding() ) ) {} inline explicit SfxOleTextEncoding( rtl_TextEncoding eTextEnc ) : mxTextEnc( new rtl_TextEncoding( eTextEnc ) ) {} inline explicit SfxOleTextEncoding( sal_Int16 nCodePage ) : diff --git a/svx/source/gallery2/gallery1.cxx b/svx/source/gallery2/gallery1.cxx index 50d398a43711..50781af7f183 100644 --- a/svx/source/gallery2/gallery1.cxx +++ b/svx/source/gallery2/gallery1.cxx @@ -197,7 +197,7 @@ public: // ----------- Gallery::Gallery( const String& rMultiPath ) -: nReadTextEncoding ( gsl_getSystemTextEncoding() ) +: nReadTextEncoding ( osl_getThreadTextEncoding() ) , nLastFileNumber ( 0 ) , bMultiPath ( sal_False ) { @@ -533,7 +533,7 @@ void Gallery::ImplWriteImportList() const sal_uInt32 nInventor = (sal_uInt32) COMPAT_FORMAT( 'S', 'G', 'A', '3' ); 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 ) *pOStm << *aImportList[ i ]; diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx index 791a2a907c09..3147e3978f90 100644 --- a/svx/source/gallery2/galtheme.cxx +++ b/svx/source/gallery2/galtheme.cxx @@ -1363,7 +1363,7 @@ SvStream& GalleryTheme::WriteData( SvStream& rOStm ) const rOStm << (sal_uInt16) 0x0004; 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++ ) { @@ -1488,7 +1488,7 @@ SvStream& GalleryTheme::ReadData( SvStream& rIStm ) rIStm >> pObj->nOffset; rIStm >> nTemp; pObj->eObjKind = (SgaObjKind) nTemp; - aFileName = rtl::OStringToOUString(aTempFileName, gsl_getSystemTextEncoding()); + aFileName = rtl::OStringToOUString(aTempFileName, osl_getThreadTextEncoding()); if( bRel ) { diff --git a/svx/source/svdraw/svdibrow.cxx b/svx/source/svdraw/svdibrow.cxx index 3db4a25fd613..a84e92305241 100644 --- a/svx/source/svdraw/svdibrow.cxx +++ b/svx/source/svdraw/svdibrow.cxx @@ -256,7 +256,7 @@ void _SdrItemBrowserControl::ImpCtor() bShowWhichIds = sal_True; // not implemented yet bShowRealValues = sal_True; // not implemented yet - rtl_TextEncoding aTextEncoding = gsl_getSystemTextEncoding(); + rtl_TextEncoding aTextEncoding = osl_getThreadTextEncoding(); InsertDataColumn( ITEMBROWSER_WHICHCOL_ID, @@ -329,7 +329,7 @@ String _SdrItemBrowserControl::GetCellText(long _nRow, sal_uInt16 _nColId) const } else { - rtl_TextEncoding aTextEncoding = gsl_getSystemTextEncoding(); + rtl_TextEncoding aTextEncoding = osl_getThreadTextEncoding(); sRet = XubString("???", aTextEncoding); switch (_nColId) @@ -927,7 +927,7 @@ void _SdrItemBrowserControl::SetAttributes(const SfxItemSet* pSet, const SfxItem { SetMode(MYBROWSEMODE & ~BROWSER_KEEPHIGHLIGHT); if (pSet!=NULL) { - rtl_TextEncoding aTextEncoding = gsl_getSystemTextEncoding(); + rtl_TextEncoding aTextEncoding = osl_getThreadTextEncoding(); sal_uInt16 nEntryNum=0; SfxWhichIter aIter(*pSet); const SfxItemPool* pPool=pSet->GetPool(); @@ -1074,7 +1074,7 @@ _SdrItemBrowserWindow::_SdrItemBrowserWindow(Window* pParent, WinBits nBits): aBrowse(this) { SetOutputSizePixel(aBrowse.GetSizePixel()); - SetText(String("Joe's ItemBrowser", gsl_getSystemTextEncoding())); + SetText(String("Joe's ItemBrowser", osl_getThreadTextEncoding())); aBrowse.Show(); } diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx index fdc87e5554c9..8bbb2c540dce 100644 --- a/svx/source/svdraw/svdmodel.cxx +++ b/svx/source/svdraw/svdmodel.cxx @@ -305,7 +305,7 @@ SdrModel::~SdrModel() { rtl::OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM( "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('\"'); OSL_FAIL(aStr.getStr()); } diff --git a/svx/source/svdraw/svdotxln.cxx b/svx/source/svdraw/svdotxln.cxx index 2d2d7256eeee..52ec7335590d 100644 --- a/svx/source/svdraw/svdotxln.cxx +++ b/svx/source/svdraw/svdotxln.cxx @@ -142,7 +142,7 @@ SdrObjUserData* ImpSdrObjTextLinkUserData::Clone(SdrObject* pObj1) const void SdrTextObj::SetTextLink(const String& rFileName, const String& rFilterName, rtl_TextEncoding eCharSet) { if(eCharSet == RTL_TEXTENCODING_DONTKNOW) - eCharSet = gsl_getSystemTextEncoding(); + eCharSet = osl_getThreadTextEncoding(); ImpSdrObjTextLinkUserData* pData=GetLinkUserData(); if (pData!=NULL) { diff --git a/svx/source/svdraw/svdouno.cxx b/svx/source/svdraw/svdouno.cxx index d6bc6d54f1bc..ddccbe2a35c3 100644 --- a/svx/source/svdraw/svdouno.cxx +++ b/svx/source/svdraw/svdouno.cxx @@ -546,7 +546,7 @@ void SdrUnoObj::SetUnoControlModel( const uno::Reference< awt::XControlModel >& uno::Reference< beans::XPropertySet > xSet(xUnoControlModel, uno::UNO_QUERY); if (xSet.is()) { - uno::Any aValue( xSet->getPropertyValue(String("DefaultControl", gsl_getSystemTextEncoding())) ); + uno::Any aValue( xSet->getPropertyValue(String("DefaultControl", osl_getThreadTextEncoding())) ); ::rtl::OUString aStr; if( aValue >>= aStr ) aUnoControlTypeName = String(aStr); diff --git a/svx/source/xoutdev/xpool.cxx b/svx/source/xoutdev/xpool.cxx index a8c0e5c47a81..c7795dc4b7c3 100644 --- a/svx/source/xoutdev/xpool.cxx +++ b/svx/source/xoutdev/xpool.cxx @@ -47,7 +47,7 @@ XOutdevItemPool::XOutdevItemPool( sal_uInt16 nAttrStart, sal_uInt16 nAttrEnd, 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 const XubString aNullStr; diff --git a/sw/inc/shellio.hxx b/sw/inc/shellio.hxx index d915bb2a26fa..56cd0635f4f6 100644 --- a/sw/inc/shellio.hxx +++ b/sw/inc/shellio.hxx @@ -97,7 +97,7 @@ public: { sFont.Erase(); eCRLF_Flag = GetSystemLineEnd(); - eCharSet = ::gsl_getSystemTextEncoding(); + eCharSet = ::osl_getThreadTextEncoding(); nLanguage = 0; } // for the automatic conversion (mail/news/...) diff --git a/sw/source/core/doc/tblafmt.cxx b/sw/source/core/doc/tblafmt.cxx index 5c321b0fd337..4e3df17fbbaf 100644 --- a/sw/source/core/doc/tblafmt.cxx +++ b/sw/source/core/doc/tblafmt.cxx @@ -337,7 +337,7 @@ sal_Bool SwBoxAutoFmt::Load( SvStream& rStream, const SwAfVersions& rVersions, s READ( aFont, SvxFontItem , rVersions.nFontVersion) if( rStream.GetStreamCharSet() == aFont.GetCharSet() ) - aFont.SetCharSet(::gsl_getSystemTextEncoding()); + aFont.SetCharSet(::osl_getThreadTextEncoding()); READ( aHeight, SvxFontHeightItem , rVersions.nFontHeightVersion) READ( aWeight, SvxWeightItem , rVersions.nWeightVersion) @@ -425,7 +425,7 @@ sal_Bool SwBoxAutoFmt::LoadOld( SvStream& rStream, sal_uInt16 aLoadVer[] ) READ( aFont, SvxFontItem , 0) if( rStream.GetStreamCharSet() == aFont.GetCharSet() ) - aFont.SetCharSet(::gsl_getSystemTextEncoding()); + aFont.SetCharSet(::osl_getThreadTextEncoding()); READ( aHeight, SvxFontHeightItem , 1) READ( aWeight, SvxWeightItem , 2) @@ -1079,7 +1079,7 @@ sal_Bool SwTableAutoFmtTbl::Save( SvStream& rStream ) const sal_uInt16 nVal = AUTOFORMAT_ID; rStream << nVal << (sal_uInt8)2 // Anzahl von Zeichen des Headers incl. diesem - << (sal_uInt8)GetStoreCharSet( ::gsl_getSystemTextEncoding() ); + << (sal_uInt8)GetStoreCharSet( ::osl_getThreadTextEncoding() ); bRet = 0 == rStream.GetError(); diff --git a/sw/source/core/edit/edtox.cxx b/sw/source/core/edit/edtox.cxx index 0cde96d7440a..246d51c7d315 100644 --- a/sw/source/core/edit/edtox.cxx +++ b/sw/source/core/edit/edtox.cxx @@ -346,7 +346,7 @@ void SwEditShell::ApplyAutoMark() SvStream& rStrm = *aMedium.GetInStream(); const String sZero('0'); Push(); - rtl_TextEncoding eChrSet = ::gsl_getSystemTextEncoding(); + rtl_TextEncoding eChrSet = ::osl_getThreadTextEncoding(); // // SearchOptions to be used in loop below diff --git a/sw/source/core/fields/ddefld.cxx b/sw/source/core/fields/ddefld.cxx index bcf4e3e7f685..4b7af34ac3b5 100644 --- a/sw/source/core/fields/ddefld.cxx +++ b/sw/source/core/fields/ddefld.cxx @@ -46,7 +46,7 @@ using rtl::OUString; using namespace ::com::sun::star; -#define DDE_TXT_ENCODING gsl_getSystemTextEncoding() +#define DDE_TXT_ENCODING osl_getThreadTextEncoding() /*-------------------------------------------------------------------- Beschreibung: Globale Variablen diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx index 05b83f1ad632..1059a3fc6107 100644 --- a/sw/source/filter/html/swhtml.cxx +++ b/sw/source/filter/html/swhtml.cxx @@ -378,7 +378,7 @@ SwHTMLParser::SwHTMLParser( SwDoc* pD, const SwPaM& rCrsr, SvStream& rIn, if( pHeaderAttrs ) SetEncodingByHTTPHeader( pHeaderAttrs ); } - pCSS1Parser->SetDfltEncoding( gsl_getSystemTextEncoding() ); + pCSS1Parser->SetDfltEncoding( osl_getThreadTextEncoding() ); // Timer nur bei ganz normalen Dokumenten aufsetzen! SwDocShell* pDocSh = pDoc->GetDocShell(); @@ -3684,7 +3684,7 @@ void SwHTMLParser::NewFontAttr( int nToken ) String aFontName, aStyleName; FontFamily eFamily = FAMILY_DONTKNOW; // Family und Pitch, FontPitch ePitch = PITCH_DONTKNOW; // falls nicht gefunden - rtl_TextEncoding eEnc = gsl_getSystemTextEncoding(); + rtl_TextEncoding eEnc = osl_getThreadTextEncoding(); if( aFace.Len() && !pCSS1Parser->IsIgnoreFontFamily() ) { diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx index 6537e71664c1..cab34860ea91 100644 --- a/sw/source/filter/xml/xmlimp.cxx +++ b/sw/source/filter/xml/xmlimp.cxx @@ -1019,7 +1019,7 @@ SvXMLImportContext *SwXMLImport::CreateFontDeclsContext( XMLFontStylesContext *pFSContext = new XMLFontStylesContext( *this, XML_NAMESPACE_OFFICE, rLocalName, xAttrList, - gsl_getSystemTextEncoding() ); + osl_getThreadTextEncoding() ); SetFontDecls( pFSContext ); return pFSContext; } diff --git a/sw/source/ui/config/uinums.cxx b/sw/source/ui/config/uinums.cxx index 4be6ecfcaab5..939c0e715b44 100644 --- a/sw/source/ui/config/uinums.cxx +++ b/sw/source/ui/config/uinums.cxx @@ -236,7 +236,7 @@ const SwNumRulesWithName& SwNumRulesWithName::operator=(const SwNumRulesWithName SwNumRulesWithName::SwNumRulesWithName( SvStream &rStream, sal_uInt16 nVersion ) { - CharSet eEncoding = gsl_getSystemTextEncoding(); + CharSet eEncoding = osl_getThreadTextEncoding(); rStream.ReadByteString(aName, eEncoding); char c; @@ -275,7 +275,7 @@ void SwNumRulesWithName::MakeNumRule( SwWrtShell& rSh, SwNumRule& rChg ) const void SwNumRulesWithName::Store( SvStream &rStream ) { - CharSet eEncoding = gsl_getSystemTextEncoding(); + CharSet eEncoding = osl_getThreadTextEncoding(); rStream.WriteByteString(aName, eEncoding); for( sal_uInt16 n = 0; n < MAXLEVEL; ++n ) @@ -332,7 +332,7 @@ SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( SvStream& rStream, sal_uInt16 nVersion ) : nCharPoolId( USHRT_MAX ) { - CharSet eEncoding = gsl_getSystemTextEncoding(); + CharSet eEncoding = osl_getThreadTextEncoding(); { sal_uInt16 nUS; sal_Char cChar; @@ -466,7 +466,7 @@ SwNumRulesWithName::_SwNumFmtGlobal::~_SwNumFmtGlobal() void SwNumRulesWithName::_SwNumFmtGlobal::Store( SvStream& rStream ) { - CharSet eEncoding = gsl_getSystemTextEncoding(); + CharSet eEncoding = osl_getThreadTextEncoding(); { String aName; sal_uInt16 nFamily = FAMILY_DONTKNOW, nCharSet = 0, nPitch = 0; diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx index cd0baba09863..87eb03a687aa 100644 --- a/sw/source/ui/dbui/dbmgr.cxx +++ b/sw/source/ui/dbui/dbmgr.cxx @@ -848,7 +848,7 @@ sal_Bool SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell, ::rtl::Reference< MailDispatcher > xMailDispatcher; ::rtl::OUString sBodyMimeType; - rtl_TextEncoding eEncoding = ::gsl_getSystemTextEncoding(); + rtl_TextEncoding eEncoding = ::osl_getThreadTextEncoding(); if(bEMail) { diff --git a/sw/source/ui/dbui/mmoutputpage.cxx b/sw/source/ui/dbui/mmoutputpage.cxx index c7d7fd4223e4..67844640658d 100644 --- a/sw/source/ui/dbui/mmoutputpage.cxx +++ b/sw/source/ui/dbui/mmoutputpage.cxx @@ -1044,7 +1044,7 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton) nEnd = rConfigItem.GetMergedDocumentCount(); } bool bAsBody = false; - rtl_TextEncoding eEncoding = ::gsl_getSystemTextEncoding(); + rtl_TextEncoding eEncoding = ::osl_getThreadTextEncoding(); SfxFilterContainer* pFilterContainer = SwDocShell::Factory().GetFilterContainer(); const SfxFilter *pSfxFlt = 0; sal_uLong nDocType = (sal_uLong)m_aSendAsLB.GetEntryData(m_aSendAsLB.GetSelectEntryPos()); diff --git a/sw/source/ui/dialog/ascfldlg.cxx b/sw/source/ui/dialog/ascfldlg.cxx index eb82e9f2fff5..1e63040d4d9a 100644 --- a/sw/source/ui/dialog/ascfldlg.cxx +++ b/sw/source/ui/dialog/ascfldlg.cxx @@ -372,7 +372,7 @@ IMPL_LINK( SwAsciiFilterDlg, CharSetSelHdl, SvxTextEncodingBox*, pBox ) nOldLng = nLng; rtl_TextEncoding nChrSet = pBox->GetSelectTextEncoding(); - if( nChrSet == gsl_getSystemTextEncoding() ) + if( nChrSet == osl_getThreadTextEncoding() ) eEnd = GetSystemLineEnd(); else { diff --git a/sw/source/ui/dochdl/swdtflvr.cxx b/sw/source/ui/dochdl/swdtflvr.cxx index 1212d9c14c8b..646c511df9cd 100755 --- a/sw/source/ui/dochdl/swdtflvr.cxx +++ b/sw/source/ui/dochdl/swdtflvr.cxx @@ -154,7 +154,7 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::datatransfer; using namespace nsTransferBufferType; -#define DDE_TXT_ENCODING gsl_getSystemTextEncoding() +#define DDE_TXT_ENCODING osl_getThreadTextEncoding() class SwTrnsfrDdeLink : public ::sfx2::SvBaseLink { diff --git a/sw/source/ui/docvw/edtwin2.cxx b/sw/source/ui/docvw/edtwin2.cxx index 169c3e0bd4ac..85ec45f965f4 100644 --- a/sw/source/ui/docvw/edtwin2.cxx +++ b/sw/source/ui/docvw/edtwin2.cxx @@ -163,7 +163,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt) { sTxt = rtl::OStringToOUString(rtl::OString::valueOf( ((SwTblBoxValue*)aCntntAtPos.aFnd.pAttr)->GetValue()), - gsl_getSystemTextEncoding()); + osl_getThreadTextEncoding()); } break; case SwContentAtPos::SW_CURR_ATTRS: diff --git a/sw/source/ui/docvw/srcedtw.cxx b/sw/source/ui/docvw/srcedtw.cxx index 9b468a827748..1f5ca938944b 100644 --- a/sw/source/ui/docvw/srcedtw.cxx +++ b/sw/source/ui/docvw/srcedtw.cxx @@ -230,7 +230,7 @@ SwSrcEditWindow::SwSrcEditWindow( Window* pParent, SwSrcView* pParentView ) : nCurTextWidth(0), nStartLine(USHRT_MAX), - eSourceEncoding(gsl_getSystemTextEncoding()), + eSourceEncoding(osl_getThreadTextEncoding()), bDoSyntaxHighlight(sal_True), bHighlighting(sal_False) { diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index 3fc515d6aa4d..4825fbf21a8b 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -4090,7 +4090,7 @@ void SwEntryBrowseBox::ReadEntries(SvStream& rInStr) { AutoMarkEntry* pToInsert = 0; const String sZero('0'); - rtl_TextEncoding eTEnc = gsl_getSystemTextEncoding(); + rtl_TextEncoding eTEnc = osl_getThreadTextEncoding(); while( !rInStr.GetError() && !rInStr.IsEof() ) { String sLine; @@ -4151,7 +4151,7 @@ void SwEntryBrowseBox::WriteEntries(SvStream& rOutStr) if(pController ->IsModified()) 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++) { AutoMarkEntry* pEntry = aEntryArr[i]; diff --git a/sw/source/ui/utlui/content.cxx b/sw/source/ui/utlui/content.cxx index 49b19766d036..db696356809a 100644 --- a/sw/source/ui/utlui/content.cxx +++ b/sw/source/ui/utlui/content.cxx @@ -3105,7 +3105,7 @@ NaviContentBookmark::NaviContentBookmark( const String &rUrl, void NaviContentBookmark::Copy( TransferDataContainer& rData ) const { - rtl_TextEncoding eSysCSet = gsl_getSystemTextEncoding(); + rtl_TextEncoding eSysCSet = osl_getThreadTextEncoding(); rtl::OStringBuffer sStrBuf(rtl::OUStringToOString(aUrl, eSysCSet)); sStrBuf.append(static_cast<char>(NAVI_BOOKMARK_DELIM)); diff --git a/tools/inc/tools/string.hxx b/tools/inc/tools/string.hxx index 11716ffb9c26..527062d8fd18 100644 --- a/tools/inc/tools/string.hxx +++ b/tools/inc/tools/string.hxx @@ -80,13 +80,6 @@ typedef rtl_TextEncoding CharSet; #endif // ENUM_CHARSET_DECLARED -inline rtl_TextEncoding gsl_getSystemTextEncoding() -{ - return osl_getThreadTextEncoding(); -} - -// ----------------------------------------------------------------------- - // ----------- // - LineEnd - // ----------- diff --git a/vcl/aqua/source/app/salinst.cxx b/vcl/aqua/source/app/salinst.cxx index e0740dd65e6b..89ce6d4d2be0 100644 --- a/vcl/aqua/source/app/salinst.cxx +++ b/vcl/aqua/source/app/salinst.cxx @@ -264,7 +264,7 @@ void SalAbort( const rtl::OUString& rErrorText, bool bDumpCore ) fprintf( stderr, "Application Error " ); else fprintf( stderr, "%s ", - rtl::OUStringToOString( rErrorText, gsl_getSystemTextEncoding() ).getStr() ); + rtl::OUStringToOString( rErrorText, osl_getThreadTextEncoding() ).getStr() ); if( bDumpCore ) abort(); else diff --git a/vcl/ios/source/app/salinst.cxx b/vcl/ios/source/app/salinst.cxx index e91e34fa1e78..6089052221ac 100644 --- a/vcl/ios/source/app/salinst.cxx +++ b/vcl/ios/source/app/salinst.cxx @@ -148,7 +148,7 @@ void SalAbort( const XubString& rErrorText, bool bDumpCore ) fprintf( stderr, "Application Error " ); else fprintf( stderr, "%s ", - ByteString( rErrorText, gsl_getSystemTextEncoding() ).GetBuffer() ); + ByteString( rErrorText, osl_getThreadTextEncoding() ).GetBuffer() ); if( bDumpCore ) abort(); else |