diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-12-15 14:57:53 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-12-17 09:35:24 +0000 |
commit | fd84daf696a368c2c7561b5253b32a63ecdeca4a (patch) | |
tree | 49a32e1364d7adf7413aa18d5e0245b9378c8d9a | |
parent | a1175f3d6ba3e16f81bb12b55c590fc605695b5f (diff) |
UniString::ToUpperAscii -> OUString::toAsciiUpperCase
Change-Id: I70f2238021c79a34b97a6bdbcc374d8b1ffb2a31
-rw-r--r-- | connectivity/source/drivers/file/FDatabaseMetaData.cxx | 13 | ||||
-rw-r--r-- | sc/source/core/tool/compiler.cxx | 7 | ||||
-rw-r--r-- | sc/source/core/tool/editutil.cxx | 14 | ||||
-rw-r--r-- | svtools/source/misc/imagemgr.cxx | 10 | ||||
-rw-r--r-- | svx/source/svdraw/svdview.cxx | 5 | ||||
-rw-r--r-- | sw/source/ui/docvw/srcedtw.cxx | 6 | ||||
-rw-r--r-- | vcl/source/control/field2.cxx | 10 |
7 files changed, 31 insertions, 34 deletions
diff --git a/connectivity/source/drivers/file/FDatabaseMetaData.cxx b/connectivity/source/drivers/file/FDatabaseMetaData.cxx index 703ee24bbca0..dfe7f640a0b9 100644 --- a/connectivity/source/drivers/file/FDatabaseMetaData.cxx +++ b/connectivity/source/drivers/file/FDatabaseMetaData.cxx @@ -105,16 +105,17 @@ namespace } // get two extensions which differ by case only - String sExtension1 = aContentURL.getExtension(); - String sExtension2( sExtension1 ); - sExtension2.ToLowerAscii(); - if ( sExtension2 == sExtension1 ) + OUString sExtension1(aContentURL.getExtension()); + OUString sExtension2(sExtension1.toAsciiLowerCase()); + if (sExtension2 == sExtension1) + { // the extension was already in lower case - sExtension2.ToUpperAscii(); + sExtension2 = sExtension2.toAsciiUpperCase(); + } // the complete URL for the second extension INetURLObject aURL2( aContentURL ); - if ( sExtension2.Len() ) + if (!sExtension2.isEmpty()) aURL2.SetExtension( sExtension2 ); if ( aURL2.GetMainURL(INetURLObject::NO_DECODE) == aContentURL.GetMainURL(INetURLObject::NO_DECODE) ) return -1; diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index 6be204bc59fa..4656e2b2c1c0 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -3515,19 +3515,18 @@ void ScCompiler::AutoCorrectParsedSymbol() } } -static inline bool lcl_UpperAsciiOrI18n( String& rUpper, const String& rOrg, FormulaGrammar::Grammar eGrammar ) +static inline bool lcl_UpperAsciiOrI18n( String& rUpper, const OUString& rOrg, FormulaGrammar::Grammar eGrammar ) { if (FormulaGrammar::isODFF( eGrammar )) { // ODFF has a defined set of English function names, avoid i18n // overhead. - rUpper = rOrg; - rUpper.ToUpperAscii(); + rUpper = rOrg.toAsciiUpperCase(); return true; } else { - rUpper = ScGlobal::pCharClass->uppercase( rOrg ); + rUpper = ScGlobal::pCharClass->uppercase(rOrg); return false; } } diff --git a/sc/source/core/tool/editutil.cxx b/sc/source/core/tool/editutil.cxx index 5fd4de45de96..016124f28bf2 100644 --- a/sc/source/core/tool/editutil.cxx +++ b/sc/source/core/tool/editutil.cxx @@ -580,9 +580,9 @@ static String lcl_GetCharStr( sal_Int32 nNo ) return aStr; } -static String lcl_GetNumStr( sal_Int32 nNo, SvxNumType eType ) +static OUString lcl_GetNumStr(sal_Int32 nNo, SvxNumType eType) { - String aTmpStr(rtl::OUString('0')); + OUString aTmpStr('0'); if( nNo ) { switch( eType ) @@ -597,11 +597,11 @@ static String lcl_GetNumStr( sal_Int32 nNo, SvxNumType eType ) if( nNo < 4000 ) aTmpStr = SvxNumberFormat::CreateRomanString( nNo, ( eType == SVX_ROMAN_UPPER ) ); else - aTmpStr.Erase(); + aTmpStr = OUString(); break; case SVX_NUMBER_NONE: - aTmpStr.Erase(); + aTmpStr = OUString(); break; // CHAR_SPECIAL: @@ -609,12 +609,12 @@ static String lcl_GetNumStr( sal_Int32 nNo, SvxNumType eType ) // case ARABIC: ist jetzt default default: - aTmpStr = String::CreateFromInt32( nNo ); + aTmpStr = OUString::valueOf(nNo); break; } if( SVX_CHARS_UPPER_LETTER == eType ) - aTmpStr.ToUpperAscii(); + aTmpStr = aTmpStr.toAsciiUpperCase(); } return aTmpStr; } @@ -641,7 +641,7 @@ String ScHeaderEditEngine::CalcFieldValue( const SvxFieldItem& rField, if (!pFieldData) return rtl::OUString("?"); - rtl::OUString aRet; + OUString aRet; sal_Int32 nClsId = pFieldData->GetClassId(); switch (nClsId) { diff --git a/svtools/source/misc/imagemgr.cxx b/svtools/source/misc/imagemgr.cxx index 3952c0248c9e..f8bc484539c9 100644 --- a/svtools/source/misc/imagemgr.cxx +++ b/svtools/source/misc/imagemgr.cxx @@ -529,8 +529,8 @@ String SvFileInformationManager::GetDescription_Impl( const INetURLObject& rObje { RTL_LOGFILE_CONTEXT_AUTHOR( aTimeLog, "svtools", "hb93813", "SvFileInformationManager::GetDescription_Impl()" ); - String sDescription; - String sExtension( rObject.getExtension() ), sURL( rObject.GetMainURL( INetURLObject::NO_DECODE ) ); + OUString sExtension(rObject.getExtension()); + String sDescription, sURL( rObject.GetMainURL( INetURLObject::NO_DECODE ) ); sal_uInt16 nResId = 0; sal_Bool bShowExt = sal_False, bDetected = sal_False, bOnlyFile = sal_False; sal_Bool bFolder = bDetectFolder ? CONTENT_HELPER::IsFolder( sURL ) : sal_False; @@ -552,10 +552,10 @@ String SvFileInformationManager::GetDescription_Impl( const INetURLObject& rObje if ( !bDetected ) { // search a description by extension - sal_Bool bExt = ( sExtension.Len() > 0 ); + bool bExt = !sExtension.isEmpty(); if ( bExt ) { - sExtension.ToLowerAscii(); + sExtension = sExtension.toAsciiLowerCase(); nResId = GetDescriptionId_Impl( sExtension, bShowExt ); } if ( !nResId ) @@ -574,7 +574,7 @@ String SvFileInformationManager::GetDescription_Impl( const INetURLObject& rObje if ( bOnlyFile ) { bShowExt = sal_False; - sExtension.ToUpperAscii(); + sExtension = sExtension.toAsciiUpperCase(); sDescription = sExtension; sDescription += '-'; } diff --git a/svx/source/svdraw/svdview.cxx b/svx/source/svdraw/svdview.cxx index 1b1f0c3ad967..7333a36331b6 100644 --- a/svx/source/svdraw/svdview.cxx +++ b/svx/source/svdraw/svdview.cxx @@ -1284,9 +1284,8 @@ XubString SdrView::GetStatusText() if(aStr.Len()) { // capitalize first letter - String aTmpStr(aStr.Copy(0, 1)); - aTmpStr.ToUpperAscii(); - aStr.Replace(0, 1, aTmpStr); + OUString aTmpStr(aStr.Copy(0, 1)); + aStr.Replace(0, 1, aTmpStr.toAsciiUpperCase()); } return aStr; } diff --git a/sw/source/ui/docvw/srcedtw.cxx b/sw/source/ui/docvw/srcedtw.cxx index 1e4058657c97..0e5e46dfbba4 100644 --- a/sw/source/ui/docvw/srcedtw.cxx +++ b/sw/source/ui/docvw/srcedtw.cxx @@ -139,8 +139,8 @@ static void lcl_Highlight(const String& rSource, SwTextPortions& aPortionList) if(nSrchPos > nActPos + 1) { // some string was found - String sToken = rSource.Copy(nActPos + 1, nSrchPos - nActPos - 1 ); - sToken.ToUpperAscii(); + OUString sToken = rSource.Copy(nActPos + 1, nSrchPos - nActPos - 1 ); + sToken = sToken.toAsciiUpperCase(); int nToken = ::GetHTMLToken(sToken); if(nToken) { @@ -154,7 +154,7 @@ static void lcl_Highlight(const String& rSource, SwTextPortions& aPortionList) // what was that? SAL_WARN( "sw.level2", - "Token " << rtl::OUString(sToken) + "Token " << sToken << " not recognised!"); } diff --git a/vcl/source/control/field2.cxx b/vcl/source/control/field2.cxx index 725f697411b4..cdc358a598bb 100644 --- a/vcl/source/control/field2.cxx +++ b/vcl/source/control/field2.cxx @@ -2383,12 +2383,10 @@ static sal_Bool ImplTimeGetValue( const XubString& rStr, Time& rTime, return sal_False; aStr.ToUpperAscii(); - XubString aAM( rLocaleDataWrapper.getTimeAM() ); - XubString aPM( rLocaleDataWrapper.getTimePM() ); - aAM.ToUpperAscii(); - aPM.ToUpperAscii(); - rtl::OUString aAM2("AM"); // aAM is localized - rtl::OUString aPM2("PM"); // aPM is localized + OUString aAM(rLocaleDataWrapper.getTimeAM().toAsciiUpperCase()); + OUString aPM(rLocaleDataWrapper.getTimePM().toAsciiUpperCase()); + OUString aAM2("AM"); // aAM is localized + OUString aPM2("PM"); // aPM is localized if ( (nHour < 12) && ( ( aStr.Search( aPM ) != STRING_NOTFOUND ) || ( aStr.Search( aPM2 ) != STRING_NOTFOUND ) ) ) nHour += 12; |