summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2011-11-24 12:06:54 +0100
committerDavid Tardon <dtardon@redhat.com>2011-11-25 09:07:49 +0100
commitfba911fea7b87e332b8db9e511b875feedbcb59c (patch)
tree55e119a74d03fe61c4c7181dd295ed8cfa3d2427 /sc/source
parent20c8eb409e2b48d57f392c146f7414bab3551664 (diff)
gsl_getSystemTextEncoding -> osl_getThreadTextEncoding
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/core/data/documen2.cxx2
-rw-r--r--sc/source/core/data/documen9.cxx2
-rw-r--r--sc/source/core/data/global.cxx4
-rw-r--r--sc/source/core/tool/autoform.cxx4
-rw-r--r--sc/source/core/tool/ddelink.cxx2
-rw-r--r--sc/source/core/tool/interpr1.cxx4
-rw-r--r--sc/source/filter/ftools/ftools.cxx2
-rw-r--r--sc/source/filter/xml/xmlimprt.cxx2
-rw-r--r--sc/source/ui/dbgui/asciiopt.cxx2
-rw-r--r--sc/source/ui/dbgui/imoptdlg.cxx2
-rw-r--r--sc/source/ui/dbgui/scuiasciiopt.cxx4
-rw-r--r--sc/source/ui/dbgui/scuiimoptdlg.cxx2
-rw-r--r--sc/source/ui/docshell/docsh4.cxx6
-rw-r--r--sc/source/ui/docshell/impex.cxx6
-rw-r--r--sc/source/ui/docshell/servobj.cxx2
-rw-r--r--sc/source/ui/view/viewfun5.cxx2
16 files changed, 24 insertions, 24 deletions
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.