From 24c079605645cf29ba366ca39b7c1177da8b317f Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 7 Oct 2013 14:26:21 +0200 Subject: convert sc/source/ui/dbgui/*.cxx from String to OUString Change-Id: Iba489d8301f8885dee919e5a433281ce3761988f --- sc/source/ui/dbgui/asciiopt.cxx | 46 ++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'sc/source/ui/dbgui/asciiopt.cxx') diff --git a/sc/source/ui/dbgui/asciiopt.cxx b/sc/source/ui/dbgui/asciiopt.cxx index ba7ee4ab45c3..076b8f84cbab 100644 --- a/sc/source/ui/dbgui/asciiopt.cxx +++ b/sc/source/ui/dbgui/asciiopt.cxx @@ -179,20 +179,20 @@ bool ScAsciiOptions::operator==( const ScAsciiOptions& rCmp ) const return false; } -static OUString lcl_decodeSepString( const String & rSepNums, bool & o_bMergeFieldSeps ) +static OUString lcl_decodeSepString( const OUString & rSepNums, bool & o_bMergeFieldSeps ) { - String aFieldSeps; + OUString aFieldSeps; xub_StrLen nSub = comphelper::string::getTokenCount( rSepNums, '/'); for (xub_StrLen i=0; i= 1 ) @@ -212,7 +212,7 @@ void ScAsciiOptions::ReadFromString( const OUString& rString ) bFixedLen = bMergeFieldSeps = false; aToken = rString.getToken(0,','); - if ( aToken.EqualsAscii(pStrFix) ) + if ( aToken.equalsAscii(pStrFix) ) bFixedLen = true; aFieldSeps = lcl_decodeSepString( aToken, bMergeFieldSeps); } @@ -221,7 +221,7 @@ void ScAsciiOptions::ReadFromString( const OUString& rString ) if ( nCount >= 2 ) { aToken = rString.getToken(1,','); - sal_Int32 nVal = aToken.ToInt32(); + sal_Int32 nVal = aToken.toInt32(); cTextSep = (sal_Unicode) nVal; } @@ -236,7 +236,7 @@ void ScAsciiOptions::ReadFromString( const OUString& rString ) if ( nCount >= 4 ) { aToken = rString.getToken(3,','); - nStartRow = aToken.ToInt32(); + nStartRow = aToken.toInt32(); } // Column info. @@ -254,8 +254,8 @@ void ScAsciiOptions::ReadFromString( const OUString& rString ) pColFormat = new sal_uInt8[nInfoCount]; for (sal_uInt16 nInfo=0; nInfo= 6) { aToken = rString.getToken(5, ','); - eLang = static_cast(aToken.ToInt32()); + eLang = static_cast(aToken.toInt32()); } // Import quoted field as text. if (nCount >= 7) { aToken = rString.getToken(6, ','); - bQuotedFieldAsText = aToken.EqualsAscii("true") ? true : false; + bQuotedFieldAsText = aToken.equalsAscii("true") ? true : false; } // Detect special numbers. if (nCount >= 8) { aToken = rString.getToken(7, ','); - bDetectSpecialNumber = aToken.EqualsAscii("true") ? true : false; + bDetectSpecialNumber = aToken.equalsAscii("true") ? true : false; } else bDetectSpecialNumber = true; // default of versions that didn't add the parameter @@ -362,22 +362,22 @@ OUString ScAsciiOptions::WriteToString() const sal_Unicode ScAsciiOptions::GetWeightedFieldSep( const OUString & rFieldSeps, bool bDecodeNumbers ) { bool bMergeFieldSeps = false; - String aFieldSeps( bDecodeNumbers ? lcl_decodeSepString( rFieldSeps, bMergeFieldSeps) : rFieldSeps); - if (aFieldSeps.Len() <= 1) - return aFieldSeps.GetChar(0); + OUString aFieldSeps( bDecodeNumbers ? lcl_decodeSepString( rFieldSeps, bMergeFieldSeps) : rFieldSeps); + if (aFieldSeps.getLength() <= 1) + return aFieldSeps[0]; else { // There can be only one separator for output. See also fdo#53449 - if (aFieldSeps.Search(',') != STRING_NOTFOUND) + if (aFieldSeps.indexOf(',') != -1) return ','; - else if (aFieldSeps.Search('\t') != STRING_NOTFOUND) + else if (aFieldSeps.indexOf('\t') != -1) return '\t'; - else if (aFieldSeps.Search(';') != STRING_NOTFOUND) + else if (aFieldSeps.indexOf(';') != -1) return ';'; - else if (aFieldSeps.Search(' ') != STRING_NOTFOUND) + else if (aFieldSeps.indexOf(' ') != -1) return ' '; else - return aFieldSeps.GetChar(0); + return aFieldSeps[0]; } } -- cgit