From 9c281fda84bea4407bb8265d1e125fc6e429064d Mon Sep 17 00:00:00 2001 From: Ricardo Montania Date: Fri, 22 Mar 2013 13:52:16 -0300 Subject: String::AppendAscii cleanup Change-Id: I3c1ff291488b7747e143982aa7ea95169175c2c2 Reviewed-on: https://gerrit.libreoffice.org/2914 Reviewed-by: Fridrich Strba Tested-by: Fridrich Strba --- cui/source/dialogs/hyphen.cxx | 8 ++++---- cui/source/dialogs/postdlg.cxx | 16 ++++++++-------- cui/source/options/optdict.cxx | 6 +++--- 3 files changed, 15 insertions(+), 15 deletions(-) (limited to 'cui/source') diff --git a/cui/source/dialogs/hyphen.cxx b/cui/source/dialogs/hyphen.cxx index 82bef8d49f11..26326647096a 100644 --- a/cui/source/dialogs/hyphen.cxx +++ b/cui/source/dialogs/hyphen.cxx @@ -521,10 +521,10 @@ SvxHyphenWordDialog::~SvxHyphenWordDialog() void SvxHyphenWordDialog::SetWindowTitle( LanguageType nLang ) { String aLangStr( SvtLanguageTable::GetLanguageString( nLang ) ); - String aTmp( aLabel ); - aTmp.AppendAscii( RTL_CONSTASCII_STRINGPARAM( " (" ) ); - aTmp.Append( aLangStr ); - aTmp.Append( sal_Unicode( ')' ) ); + OUString aTmp( aLabel ); + aTmp += " ("; + aTmp += aLangStr; + aTmp += ")"; SetText( aTmp ); } diff --git a/cui/source/dialogs/postdlg.cxx b/cui/source/dialogs/postdlg.cxx index cec8c014ebbc..4e2465ec2239 100644 --- a/cui/source/dialogs/postdlg.cxx +++ b/cui/source/dialogs/postdlg.cxx @@ -134,8 +134,8 @@ SvxPostItDialog::~SvxPostItDialog() void SvxPostItDialog::ShowLastAuthor(const String& rAuthor, const String& rDate) { - String sTxt( rAuthor ); - sTxt.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ", " ) ); + OUString sTxt( rAuthor ); + sTxt += ", "; sTxt += rDate; m_pLastEditFT->SetText( sTxt ); } @@ -187,23 +187,23 @@ IMPL_LINK_NOARG(SvxPostItDialog, Stamp) Time aTime( Time::SYSTEM ); String aTmp( SvtUserOptions().GetID() ); const LocaleDataWrapper& rLocaleWrapper( Application::GetSettings().GetLocaleDataWrapper() ); - String aStr( m_pEditED->GetText() ); - aStr.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "\n---- " ) ); + OUString aStr( m_pEditED->GetText() ); + aStr += "\n---- "; if ( aTmp.Len() > 0 ) { aStr += aTmp; - aStr.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ", " ) ); + aStr += ", "; } aStr += rLocaleWrapper.getDate(aDate); - aStr.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ", " ) ); + aStr += ", "; aStr += rLocaleWrapper.getTime(aTime, sal_False, sal_False); - aStr.AppendAscii( RTL_CONSTASCII_STRINGPARAM( " ----\n" ) ); + aStr += " ----\n"; aStr = convertLineEnd(aStr, GetSystemLineEnd()); m_pEditED->SetText(aStr); - xub_StrLen nLen = aStr.Len(); + xub_StrLen nLen = aStr.getLength(); m_pEditED->GrabFocus(); m_pEditED->SetSelection( Selection( nLen, nLen ) ); return 0; diff --git a/cui/source/options/optdict.cxx b/cui/source/options/optdict.cxx index 33534bc2eba7..86b180f0e887 100644 --- a/cui/source/options/optdict.cxx +++ b/cui/source/options/optdict.cxx @@ -118,9 +118,9 @@ SvxNewDictionaryDialog::SvxNewDictionaryDialog( Window* pParent, IMPL_LINK_NOARG(SvxNewDictionaryDialog, OKHdl_Impl) { - String sDict = comphelper::string::stripEnd(aNameEdit.GetText(), ' '); + OUString sDict = comphelper::string::stripEnd(aNameEdit.GetText(), ' '); // add extension for personal dictionaries - sDict.AppendAscii(".dic"); + sDict += ".dic"; Reference< XSearchableDictionaryList > xDicList( SvxGetDictionaryList() ); @@ -133,7 +133,7 @@ IMPL_LINK_NOARG(SvxNewDictionaryDialog, OKHdl_Impl) sal_Bool bFound = sal_False; sal_uInt16 i; for (i = 0; !bFound && i < nCount; ++i ) - if ( sDict.EqualsIgnoreCaseAscii( String(pDic[i]->getName()) )) + if ( sDict.equalsIgnoreAsciiCase( pDic[i]->getName()) ) bFound = sal_True; if ( bFound ) -- cgit