summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo Montania <ricardo@linuxafundo.com.br>2013-03-22 13:52:16 -0300
committerFridrich Strba <fridrich@documentfoundation.org>2013-03-22 17:17:18 +0000
commit9c281fda84bea4407bb8265d1e125fc6e429064d (patch)
tree83ac360ed343a617cea32c7956b361edd7e08e26
parent43f59b86cd2c65bf408bea8108b56839b21b8b4e (diff)
String::AppendAscii cleanup
Change-Id: I3c1ff291488b7747e143982aa7ea95169175c2c2 Reviewed-on: https://gerrit.libreoffice.org/2914 Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
-rw-r--r--basctl/source/basicide/baside2.cxx4
-rw-r--r--connectivity/source/drivers/dbase/DIndex.cxx7
-rw-r--r--connectivity/source/drivers/dbase/DTable.cxx4
-rw-r--r--cui/source/dialogs/hyphen.cxx8
-rw-r--r--cui/source/dialogs/postdlg.cxx16
-rw-r--r--cui/source/options/optdict.cxx6
6 files changed, 22 insertions, 23 deletions
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx
index 72d594d82000..f8962c5f7c31 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -1339,7 +1339,7 @@ EntryDescriptor ModulWindow::CreateEntryDescriptor()
ScriptDocument aDocument( GetDocument() );
String aLibName( GetLibName() );
LibraryLocation eLocation = aDocument.getLibraryLocation( aLibName );
- String aModName( GetName() );
+ OUString aModName( GetName() );
String aLibSubName;
if( xBasic.Is() && aDocument.isInVBAMode() && XModule().Is() )
{
@@ -1355,7 +1355,7 @@ EntryDescriptor ModulWindow::CreateEntryDescriptor()
ModuleInfoHelper::getObjectName( xLib, aModName, sObjName );
if( !sObjName.isEmpty() )
{
- aModName.AppendAscii(" (").Append(sObjName).AppendAscii(")");
+ aModName += " (" + sObjName + ")";
}
}
break;
diff --git a/connectivity/source/drivers/dbase/DIndex.cxx b/connectivity/source/drivers/dbase/DIndex.cxx
index 0cb4630d1823..1e70a5cb84a9 100644
--- a/connectivity/source/drivers/dbase/DIndex.cxx
+++ b/connectivity/source/drivers/dbase/DIndex.cxx
@@ -509,16 +509,15 @@ sal_Bool ODbaseIndex::CreateImpl()
aName = getString(xCol->getFastPropertyValue(PROPERTY_ID_NAME));
const String aQuote(m_pTable->getConnection()->getMetaData()->getIdentifierQuoteString());
- String aStatement;
- aStatement.AssignAscii("SELECT ");
+ OUString aStatement( "SELECT " );
aStatement += aQuote;
aStatement += aName;
aStatement += aQuote;
- aStatement.AppendAscii(" FROM ");
+ aStatement += " FROM ";
aStatement += aQuote;
aStatement += m_pTable->getName().getStr();
aStatement += aQuote;
- aStatement.AppendAscii(" ORDER BY ");
+ aStatement += " ORDER BY ";
aStatement += aQuote;
aStatement += aName;
aStatement += aQuote;
diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx
index ee2d7df1209a..386d802a1764 100644
--- a/connectivity/source/drivers/dbase/DTable.cxx
+++ b/connectivity/source/drivers/dbase/DTable.cxx
@@ -2318,8 +2318,8 @@ namespace
aURL.SetURL(aName);
aURL.setExtension( _sExtension );
- String sNewName(newName);
- sNewName.AppendAscii(".");
+ OUString sNewName(newName);
+ sNewName += ".";
sNewName += _sExtension;
try
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 )