Kaydet (Commit) 9c281fda authored tarafından Ricardo Montania's avatar Ricardo Montania Kaydeden (comit) Fridrich Strba

String::AppendAscii cleanup

Change-Id: I3c1ff291488b7747e143982aa7ea95169175c2c2
Reviewed-on: https://gerrit.libreoffice.org/2914Reviewed-by: 's avatarFridrich Strba <fridrich@documentfoundation.org>
Tested-by: 's avatarFridrich Strba <fridrich@documentfoundation.org>
üst 43f59b86
...@@ -1339,7 +1339,7 @@ EntryDescriptor ModulWindow::CreateEntryDescriptor() ...@@ -1339,7 +1339,7 @@ EntryDescriptor ModulWindow::CreateEntryDescriptor()
ScriptDocument aDocument( GetDocument() ); ScriptDocument aDocument( GetDocument() );
String aLibName( GetLibName() ); String aLibName( GetLibName() );
LibraryLocation eLocation = aDocument.getLibraryLocation( aLibName ); LibraryLocation eLocation = aDocument.getLibraryLocation( aLibName );
String aModName( GetName() ); OUString aModName( GetName() );
String aLibSubName; String aLibSubName;
if( xBasic.Is() && aDocument.isInVBAMode() && XModule().Is() ) if( xBasic.Is() && aDocument.isInVBAMode() && XModule().Is() )
{ {
...@@ -1355,7 +1355,7 @@ EntryDescriptor ModulWindow::CreateEntryDescriptor() ...@@ -1355,7 +1355,7 @@ EntryDescriptor ModulWindow::CreateEntryDescriptor()
ModuleInfoHelper::getObjectName( xLib, aModName, sObjName ); ModuleInfoHelper::getObjectName( xLib, aModName, sObjName );
if( !sObjName.isEmpty() ) if( !sObjName.isEmpty() )
{ {
aModName.AppendAscii(" (").Append(sObjName).AppendAscii(")"); aModName += " (" + sObjName + ")";
} }
} }
break; break;
......
...@@ -509,16 +509,15 @@ sal_Bool ODbaseIndex::CreateImpl() ...@@ -509,16 +509,15 @@ sal_Bool ODbaseIndex::CreateImpl()
aName = getString(xCol->getFastPropertyValue(PROPERTY_ID_NAME)); aName = getString(xCol->getFastPropertyValue(PROPERTY_ID_NAME));
const String aQuote(m_pTable->getConnection()->getMetaData()->getIdentifierQuoteString()); const String aQuote(m_pTable->getConnection()->getMetaData()->getIdentifierQuoteString());
String aStatement; OUString aStatement( "SELECT " );
aStatement.AssignAscii("SELECT ");
aStatement += aQuote; aStatement += aQuote;
aStatement += aName; aStatement += aName;
aStatement += aQuote; aStatement += aQuote;
aStatement.AppendAscii(" FROM "); aStatement += " FROM ";
aStatement += aQuote; aStatement += aQuote;
aStatement += m_pTable->getName().getStr(); aStatement += m_pTable->getName().getStr();
aStatement += aQuote; aStatement += aQuote;
aStatement.AppendAscii(" ORDER BY "); aStatement += " ORDER BY ";
aStatement += aQuote; aStatement += aQuote;
aStatement += aName; aStatement += aName;
aStatement += aQuote; aStatement += aQuote;
......
...@@ -2318,8 +2318,8 @@ namespace ...@@ -2318,8 +2318,8 @@ namespace
aURL.SetURL(aName); aURL.SetURL(aName);
aURL.setExtension( _sExtension ); aURL.setExtension( _sExtension );
String sNewName(newName); OUString sNewName(newName);
sNewName.AppendAscii("."); sNewName += ".";
sNewName += _sExtension; sNewName += _sExtension;
try try
......
...@@ -521,10 +521,10 @@ SvxHyphenWordDialog::~SvxHyphenWordDialog() ...@@ -521,10 +521,10 @@ SvxHyphenWordDialog::~SvxHyphenWordDialog()
void SvxHyphenWordDialog::SetWindowTitle( LanguageType nLang ) void SvxHyphenWordDialog::SetWindowTitle( LanguageType nLang )
{ {
String aLangStr( SvtLanguageTable::GetLanguageString( nLang ) ); String aLangStr( SvtLanguageTable::GetLanguageString( nLang ) );
String aTmp( aLabel ); OUString aTmp( aLabel );
aTmp.AppendAscii( RTL_CONSTASCII_STRINGPARAM( " (" ) ); aTmp += " (";
aTmp.Append( aLangStr ); aTmp += aLangStr;
aTmp.Append( sal_Unicode( ')' ) ); aTmp += ")";
SetText( aTmp ); SetText( aTmp );
} }
......
...@@ -134,8 +134,8 @@ SvxPostItDialog::~SvxPostItDialog() ...@@ -134,8 +134,8 @@ SvxPostItDialog::~SvxPostItDialog()
void SvxPostItDialog::ShowLastAuthor(const String& rAuthor, const String& rDate) void SvxPostItDialog::ShowLastAuthor(const String& rAuthor, const String& rDate)
{ {
String sTxt( rAuthor ); OUString sTxt( rAuthor );
sTxt.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ", " ) ); sTxt += ", ";
sTxt += rDate; sTxt += rDate;
m_pLastEditFT->SetText( sTxt ); m_pLastEditFT->SetText( sTxt );
} }
...@@ -187,23 +187,23 @@ IMPL_LINK_NOARG(SvxPostItDialog, Stamp) ...@@ -187,23 +187,23 @@ IMPL_LINK_NOARG(SvxPostItDialog, Stamp)
Time aTime( Time::SYSTEM ); Time aTime( Time::SYSTEM );
String aTmp( SvtUserOptions().GetID() ); String aTmp( SvtUserOptions().GetID() );
const LocaleDataWrapper& rLocaleWrapper( Application::GetSettings().GetLocaleDataWrapper() ); const LocaleDataWrapper& rLocaleWrapper( Application::GetSettings().GetLocaleDataWrapper() );
String aStr( m_pEditED->GetText() ); OUString aStr( m_pEditED->GetText() );
aStr.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "\n---- " ) ); aStr += "\n---- ";
if ( aTmp.Len() > 0 ) if ( aTmp.Len() > 0 )
{ {
aStr += aTmp; aStr += aTmp;
aStr.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ", " ) ); aStr += ", ";
} }
aStr += rLocaleWrapper.getDate(aDate); aStr += rLocaleWrapper.getDate(aDate);
aStr.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ", " ) ); aStr += ", ";
aStr += rLocaleWrapper.getTime(aTime, sal_False, sal_False); aStr += rLocaleWrapper.getTime(aTime, sal_False, sal_False);
aStr.AppendAscii( RTL_CONSTASCII_STRINGPARAM( " ----\n" ) ); aStr += " ----\n";
aStr = convertLineEnd(aStr, GetSystemLineEnd()); aStr = convertLineEnd(aStr, GetSystemLineEnd());
m_pEditED->SetText(aStr); m_pEditED->SetText(aStr);
xub_StrLen nLen = aStr.Len(); xub_StrLen nLen = aStr.getLength();
m_pEditED->GrabFocus(); m_pEditED->GrabFocus();
m_pEditED->SetSelection( Selection( nLen, nLen ) ); m_pEditED->SetSelection( Selection( nLen, nLen ) );
return 0; return 0;
......
...@@ -118,9 +118,9 @@ SvxNewDictionaryDialog::SvxNewDictionaryDialog( Window* pParent, ...@@ -118,9 +118,9 @@ SvxNewDictionaryDialog::SvxNewDictionaryDialog( Window* pParent,
IMPL_LINK_NOARG(SvxNewDictionaryDialog, OKHdl_Impl) 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 // add extension for personal dictionaries
sDict.AppendAscii(".dic"); sDict += ".dic";
Reference< XSearchableDictionaryList > xDicList( SvxGetDictionaryList() ); Reference< XSearchableDictionaryList > xDicList( SvxGetDictionaryList() );
...@@ -133,7 +133,7 @@ IMPL_LINK_NOARG(SvxNewDictionaryDialog, OKHdl_Impl) ...@@ -133,7 +133,7 @@ IMPL_LINK_NOARG(SvxNewDictionaryDialog, OKHdl_Impl)
sal_Bool bFound = sal_False; sal_Bool bFound = sal_False;
sal_uInt16 i; sal_uInt16 i;
for (i = 0; !bFound && i < nCount; ++i ) for (i = 0; !bFound && i < nCount; ++i )
if ( sDict.EqualsIgnoreCaseAscii( String(pDic[i]->getName()) )) if ( sDict.equalsIgnoreAsciiCase( pDic[i]->getName()) )
bFound = sal_True; bFound = sal_True;
if ( bFound ) if ( bFound )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment