diff options
author | Ricardo Montania <ricardo@linuxafundo.com.br> | 2013-05-13 16:14:52 -0300 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2013-05-15 15:58:17 +0200 |
commit | 8a9448aabcee0171b0dc3b0401600de09455fb10 (patch) | |
tree | 200f609afeab42dd1281833607ae5f4fedf9dcee | |
parent | 8d08ba5e7530580afd61930bfc00ae513962b754 (diff) |
String.AppendAscii Drop
Signed-off-by: Luboš Luňák <l.lunak@suse.cz>
https://gerrit.libreoffice.org/#/c/3892/
Change-Id: I12175a81f0a74546b5e00633176f204b9a3fb35c
-rw-r--r-- | formula/source/ui/dlg/formula.cxx | 18 | ||||
-rw-r--r-- | framework/source/uielement/langselectionmenucontroller.cxx | 24 | ||||
-rw-r--r-- | linguistic/source/misc2.cxx | 9 | ||||
-rw-r--r-- | linguistic/workben/sspellimp.cxx | 6 | ||||
-rw-r--r-- | lotuswordpro/source/filter/lwptblformula.cxx | 42 | ||||
-rw-r--r-- | padmin/source/adddlg.cxx | 8 | ||||
-rw-r--r-- | padmin/source/cmddlg.cxx | 5 | ||||
-rw-r--r-- | padmin/source/padialog.cxx | 13 | ||||
-rw-r--r-- | padmin/source/prtsetup.cxx | 4 | ||||
-rw-r--r-- | reportdesign/source/ui/dlg/AddField.cxx | 5 | ||||
-rw-r--r-- | sc/source/core/data/stlpool.cxx | 20 |
11 files changed, 61 insertions, 93 deletions
diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx index 51bb4e49c336..4891bd157e91 100644 --- a/formula/source/ui/dlg/formula.cxx +++ b/formula/source/ui/dlg/formula.cxx @@ -823,11 +823,10 @@ void FormulaDlg_Impl::FillControls(sal_Bool &rbNext, sal_Bool &rbPrev) // 2. Page or Edit: show selected function xub_StrLen nFStart = pData->GetFStart(); - String aFormula = m_pHelper->getCurrentFormula(); + OUString aFormula = OUString(m_pHelper->getCurrentFormula()) + " )"; xub_StrLen nNextFStart = nFStart; xub_StrLen nNextFEnd = 0; - aFormula.AppendAscii(RTL_CONSTASCII_STRINGPARAM( " )" )); DeleteArgs(); const IFunctionDescription* pOldFuncDesc = pFuncDesc; sal_Bool bTestFlag = sal_False; @@ -1035,8 +1034,7 @@ IMPL_LINK_NOARG(FormulaDlg_Impl, DblClkHdl) const IFunctionDescription* pDesc = pFuncPage->GetFuncDesc(nFunc); m_pHelper->insertEntryToLRUList(pDesc); - String aFuncName = pFuncPage->GetSelFunctionName(); - aFuncName.AppendAscii(RTL_CONSTASCII_STRINGPARAM( "()" )); + OUString aFuncName = OUString( pFuncPage->GetSelFunctionName() ) + "()"; m_pHelper->setCurrentFormula(aFuncName); pMEdit->ReplaceSelected(aFuncName); @@ -1428,16 +1426,14 @@ void FormulaDlg_Impl::RefInputStartAfter( RefEdit* /*pEdit*/, RefButton* /*pButt if( pTheRefEdit ) { - String aStr = aTitle2; - aStr += ' '; - aStr += aFtEditName.GetText(); - aStr.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "( " ) ); + OUString aStr = OUString(aTitle2) + " " + aFtEditName.GetText() + "( "; + if( pParaWin->GetActiveLine() > 0 ) - aStr.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "...; " ) ); + aStr += "...; "; aStr += pParaWin->GetActiveArgName(); if( pParaWin->GetActiveLine() + 1 < nArgs ) - aStr.AppendAscii(RTL_CONSTASCII_STRINGPARAM( "; ..." )); - aStr.AppendAscii( RTL_CONSTASCII_STRINGPARAM( " )" ) ); + aStr += "; ..."; + aStr += " )"; m_pParent->SetText( MnemonicGenerator::EraseAllMnemonicChars( aStr ) ); } diff --git a/framework/source/uielement/langselectionmenucontroller.cxx b/framework/source/uielement/langselectionmenucontroller.cxx index 28a67b95a603..5bcbbf3326af 100644 --- a/framework/source/uielement/langselectionmenucontroller.cxx +++ b/framework/source/uielement/langselectionmenucontroller.cxx @@ -207,23 +207,23 @@ void LanguageSelectionMenuController::fillPopupMenu( Reference< css::awt::XPopup if ( pVCLPopupMenu ) pPopupMenu = (PopupMenu *)pVCLPopupMenu->GetMenu(); - String aCmd; - String aCmd_Dialog; - String aCmd_Language; + OUString aCmd; + OUString aCmd_Dialog; + OUString aCmd_Language; if( eMode == MODE_SetLanguageSelectionMenu ) { - aCmd_Dialog.AppendAscii(".uno:FontDialog?Language:string=*"); - aCmd_Language.AppendAscii(".uno:LanguageStatus?Language:string=Current_"); + aCmd_Dialog += ".uno:FontDialog?Language:string=*"; + aCmd_Language += ".uno:LanguageStatus?Language:string=Current_"; } else if ( eMode == MODE_SetLanguageParagraphMenu ) { - aCmd_Dialog.AppendAscii(".uno:FontDialogForParagraph"); - aCmd_Language.AppendAscii(".uno:LanguageStatus?Language:string=Paragraph_"); + aCmd_Dialog += ".uno:FontDialogForParagraph"; + aCmd_Language += ".uno:LanguageStatus?Language:string=Paragraph_"; } else if ( eMode == MODE_SetLanguageAllTextMenu ) { - aCmd_Dialog.AppendAscii(".uno:LanguageStatus?Language:string=*"); - aCmd_Language.AppendAscii(".uno:LanguageStatus?Language:string=Default_"); + aCmd_Dialog += ".uno:LanguageStatus?Language:string=*"; + aCmd_Language += ".uno:LanguageStatus?Language:string=Default_"; } SvtLanguageTable aLanguageTable; @@ -264,15 +264,13 @@ void LanguageSelectionMenuController::fillPopupMenu( Reference< css::awt::XPopup // entry for LANGUAGE_NONE ++nItemId; pPopupMenu->InsertItem( nItemId, String(FwlResId( STR_LANGSTATUS_NONE )) ); - aCmd=aCmd_Language; - aCmd.AppendAscii("LANGUAGE_NONE"); + aCmd = aCmd_Language + "LANGUAGE_NONE"; pPopupMenu->SetItemCommand( nItemId, aCmd ); // entry for 'Reset to default language' ++nItemId; pPopupMenu->InsertItem( nItemId, String(FwlResId( STR_RESET_TO_DEFAULT_LANGUAGE )) ); - aCmd=aCmd_Language; - aCmd.AppendAscii("RESET_LANGUAGES"); + aCmd = aCmd_Language + "RESET_LANGUAGES"; pPopupMenu->SetItemCommand( nItemId, aCmd ); // entry for opening the Format/Character dialog diff --git a/linguistic/source/misc2.cxx b/linguistic/source/misc2.cxx index d3ed5504a06a..eab239de6f03 100644 --- a/linguistic/source/misc2.cxx +++ b/linguistic/source/misc2.cxx @@ -73,12 +73,9 @@ static uno::Sequence< OUString > GetMultiPaths_Impl( uno::Reference< uno::XComponentContext > xContext( comphelper::getProcessComponentContext() ); try { - String aInternal( rPathPrefix ); - String aUser( rPathPrefix ); - String aWriteable( rPathPrefix ); - aInternal .AppendAscii( "_internal" ); - aUser .AppendAscii( "_user" ); - aWriteable.AppendAscii( "_writable" ); + OUString aInternal( rPathPrefix + "_internal" ); + OUString aUser( rPathPrefix + "_user" ); + OUString aWriteable( rPathPrefix + "_writable" ); uno::Reference< util::XPathSettings > xPathSettings = util::PathSettings::create( xContext ); diff --git a/linguistic/workben/sspellimp.cxx b/linguistic/workben/sspellimp.cxx index 91a18a3e0478..775c2fab20de 100644 --- a/linguistic/workben/sspellimp.cxx +++ b/linguistic/workben/sspellimp.cxx @@ -450,9 +450,9 @@ sal_Bool SAL_CALL SpellChecker_writeInfo( { try { - String aImpl( '/' ); - aImpl += SpellChecker::getImplementationName_Static().getStr(); - aImpl.AppendAscii( "/UNO/SERVICES" ); + OUString aImpl( "/" + SpellChecker::getImplementationName_Static().getStr() + + "/UNO/SERVICES" ); + Reference< registry::XRegistryKey > xNewKey = pRegistryKey->createKey( aImpl ); Sequence< OUString > aServices = diff --git a/lotuswordpro/source/filter/lwptblformula.cxx b/lotuswordpro/source/filter/lwptblformula.cxx index a9988bc27249..0b69d05ac7e9 100644 --- a/lotuswordpro/source/filter/lwptblformula.cxx +++ b/lotuswordpro/source/filter/lwptblformula.cxx @@ -485,12 +485,7 @@ LwpFormulaCellAddr::LwpFormulaCellAddr(sal_Int16 aCol, sal_Int16 aRow) */ OUString LwpFormulaCellAddr::ToString(LwpTableLayout* pCellsMap) { - String aCellAddr; - aCellAddr.AppendAscii("<");//< - - aCellAddr += LwpFormulaTools::GetCellAddr(m_aRow,m_aCol,pCellsMap); - - aCellAddr.AppendAscii(">");//> + OUString aCellAddr = "<" + LwpFormulaTools::GetCellAddr(m_aRow,m_aCol,pCellsMap) + ">"; return aCellAddr; } @@ -521,14 +516,9 @@ LwpFormulaCellRangeAddr::LwpFormulaCellRangeAddr(sal_Int16 aStartCol, */ OUString LwpFormulaCellRangeAddr::ToString(LwpTableLayout* pCellsMap) { - String aCellAddr; - aCellAddr.AppendAscii("<");//< - - aCellAddr += LwpFormulaTools::GetCellAddr(m_aStartRow,m_aStartCol,pCellsMap); - aCellAddr.AppendAscii(":"); - aCellAddr += LwpFormulaTools::GetCellAddr(m_aEndRow,m_aEndCol,pCellsMap); - - aCellAddr.AppendAscii(">");//> + OUString aCellAddr = "<" + + LwpFormulaTools::GetCellAddr(m_aStartRow,m_aStartCol,pCellsMap) + ":" + + LwpFormulaTools::GetCellAddr(m_aEndRow,m_aEndCol,pCellsMap) + ">"; return aCellAddr; } @@ -602,24 +592,21 @@ String LwpFormulaFunc::ToArgString(LwpTableLayout* pCellsMap) */ OUString LwpFormulaFunc::ToString(LwpTableLayout* pCellsMap) { - String aFormula; + OUString aFormula; - String aFuncName = LwpFormulaTools::GetName(m_nTokenType); - aFormula += aFuncName; - aFormula.AppendAscii(" ");//Append a blank space + OUString aFuncName = LwpFormulaTools::GetName(m_nTokenType) + " "; //Append args vector<LwpFormulaArg*>::iterator aItr; for (aItr=m_aArgs.begin();aItr!=m_aArgs.end();++aItr) { - aFormula.Append( (*aItr)->ToArgString(pCellsMap) ); - aFormula.AppendAscii("|");//separator + aFormula += (*aItr)->ToArgString(pCellsMap) + "|"; //separator } //erase the last "|" if (!m_aArgs.empty()) { - aFormula.Erase(aFormula.Len()-1,1); + aFormula.replaceAt(aFormula.getLength()-1,1,""); } else { @@ -638,22 +625,19 @@ OUString LwpFormulaFunc::ToString(LwpTableLayout* pCellsMap) */ OUString LwpFormulaOp::ToString(LwpTableLayout* pCellsMap) { - String aFormula; + OUString aFormula; if (2==m_aArgs.size()) { vector<LwpFormulaArg*>::iterator aItr = m_aArgs.end(); --aItr; - aFormula.Append( (*aItr)->ToArgString(pCellsMap) ); - aFormula.AppendAscii(" "); + aFormula += (*aItr)->ToArgString(pCellsMap) + " "; + OUString aFuncName = LwpFormulaTools::GetName(m_nTokenType); - String aFuncName = LwpFormulaTools::GetName(m_nTokenType); - aFormula.Append(aFuncName); - - aFormula.AppendAscii(" "); + aFormula += aFuncName + " "; --aItr; - aFormula.Append( (*aItr)->ToArgString(pCellsMap) ); + aFormula += (*aItr)->ToArgString(pCellsMap); } else { diff --git a/padmin/source/adddlg.cxx b/padmin/source/adddlg.cxx index 4adb755c2e0f..bb3487abe5f9 100644 --- a/padmin/source/adddlg.cxx +++ b/padmin/source/adddlg.cxx @@ -274,10 +274,10 @@ IMPL_LINK( APChooseDriverPage, ClickBtnHdl, PushButton*, pButton ) FindFiles( aPPDDir, aFiles, OUString( "PS;PPD;PS.GZ;PPD.GZ" ), true ); for( file = aFiles.begin(); file != aFiles.end(); ++file ) { - String aFile( aPPDDir ); - if( aFile.GetChar( aFile.Len() ) != '/' ) - aFile.AppendAscii( "/" ); - aFile.Append( *file ); + OUString aFile( aPPDDir ); + if( !aFile.endsWith( "/" ) ) + aFile += "/"; + aFile += *file; int nPos = file->SearchBackward( '.' ); if( file->Copy( 0, nPos ) == String( aPPD ) ) diff --git a/padmin/source/cmddlg.cxx b/padmin/source/cmddlg.cxx index c9b21edc4d67..bbbbdc7a564a 100644 --- a/padmin/source/cmddlg.cxx +++ b/padmin/source/cmddlg.cxx @@ -529,9 +529,8 @@ void RTSCommandPage::UpdateCommands() void RTSCommandPage::ConnectCommand() { - String aString( m_aConnectedTo.GetText().getToken( 0, ':' ) ); - aString.AppendAscii( ": " ); - aString += m_aCommandsCB.GetText(); + OUString aString = ( m_aConnectedTo.GetText().getToken( 0, ':' ) ) + + ": " + m_aCommandsCB.GetText(); m_aConnectedTo.SetText( aString ); } diff --git a/padmin/source/padialog.cxx b/padmin/source/padialog.cxx index c6adfc93f779..fe6184843c04 100644 --- a/padmin/source/padialog.cxx +++ b/padmin/source/padialog.cxx @@ -254,10 +254,9 @@ void PADialog::UpdateText() if( !aDev.isEmpty() ) { const PrinterInfo& rInfo = m_rPIManager.getPrinterInfo( aDev ); - String aDriver( rInfo.m_aPrinterName ); - aDriver.AppendAscii( " (" ); - aDriver += String( rInfo.m_aDriverName ); - aDriver.Append( ')' ); + + OUString aDriver = rInfo.m_aPrinterName + " (" + rInfo.m_aDriverName + ")"; + m_aDriver.SetText( aDriver ); m_aCommand.SetText( rInfo.m_aCommand ); m_aComment.SetText( rInfo.m_aComment ); @@ -707,12 +706,10 @@ void PADialog::UpdateDevice() if( bAutoQueue ) continue; - String aEntry( *it ); + OUString aEntry( *it ); if( *it == m_rPIManager.getDefaultPrinter() ) { - aEntry.AppendAscii( " (" ); - aEntry += m_aDefPrt; - aEntry.AppendAscii( ")" ); + aEntry += " (" + OUString( m_aDefPrt ) + ")"; } int nPos = m_aDevicesLB.InsertEntry( aEntry, diff --git a/padmin/source/prtsetup.cxx b/padmin/source/prtsetup.cxx index 53d09ce0c5e4..d9d87cf1f214 100644 --- a/padmin/source/prtsetup.cxx +++ b/padmin/source/prtsetup.cxx @@ -708,9 +708,7 @@ void RTSFontSubstPage::update() for( it = m_pParent->m_aJobData.m_aFontSubstitutes.begin(); it != m_pParent->m_aJobData.m_aFontSubstitutes.end(); ++it ) { - String aEntry( it->first ); - aEntry.AppendAscii( " -> " ); - aEntry.Append( String( it->second ) ); + OUString aEntry = it->first + " -> " + it->second; m_aSubstitutionsBox.InsertEntry( aEntry ); } } diff --git a/reportdesign/source/ui/dlg/AddField.cxx b/reportdesign/source/ui/dlg/AddField.cxx index 54ff5c2f7e58..d849d0182ec7 100644 --- a/reportdesign/source/ui/dlg/AddField.cxx +++ b/reportdesign/source/ui/dlg/AddField.cxx @@ -320,7 +320,7 @@ void OAddFieldWindow::Update() m_aActions.EnableItem(m_aActions.GetItemId(j),sal_False); } - String aTitle(ModuleRes(RID_STR_FIELDSELECTION)); + OUString aTitle(ModuleRes(RID_STR_FIELDSELECTION)); SetText(aTitle); if ( m_xRowSet.is() ) { @@ -357,8 +357,7 @@ void OAddFieldWindow::Update() lcl_addToList( *m_pListBox, aParamNames ); // set title - aTitle.AppendAscii(" "); - aTitle += m_aCommandName.getStr(); + aTitle += " " + OUString( m_aCommandName.getStr() ); SetText( aTitle ); if ( !m_aCommandName.isEmpty() ) { diff --git a/sc/source/core/data/stlpool.cxx b/sc/source/core/data/stlpool.cxx index 99f14d65ba08..c008123990e7 100644 --- a/sc/source/core/data/stlpool.cxx +++ b/sc/source/core/data/stlpool.cxx @@ -241,8 +241,8 @@ void ScStyleSheetPool::CreateStandardStyles() Color aColBlack ( COL_BLACK ); Color aColGrey ( COL_LIGHTGRAY ); - String aStr; - xub_StrLen nStrLen; + OUString aStr; + sal_Int32 nStrLen; String aHelpFile;//XXX JN welcher Text??? SfxItemSet* pSet = NULL; SfxItemSet* pHFSet = NULL; @@ -388,9 +388,9 @@ void ScStyleSheetPool::CreateStandardStyles() // Fusszeile: // [leer][Seite \SEITE\][leer] //---------------------------------------- - aStr = SCSTR( STR_PAGE ); aStr += ' '; + aStr = SCSTR( STR_PAGE ) + " "; pEdEngine->SetText( aStr ); - nStrLen = aStr.Len(); + nStrLen = aStr.getLength(); pEdEngine->QuickInsertField( SvxFieldItem(SvxPageField(), EE_FEATURE_FIELD), ESelection(0,nStrLen,0,nStrLen) ); pTxtObj = pEdEngine->CreateTextObject(); pFooterItem->SetLeftArea ( *pEmptyTxtObj ); @@ -437,7 +437,7 @@ void ScStyleSheetPool::CreateStandardStyles() // Kopfzeile: // [\TABELLE\ (\DATEI\)][leer][\DATUM\, \ZEIT\] //---------------------------------------- - aStr = OUString(" ()"); + aStr = " ()"; pEdEngine->SetText( aStr ); pEdEngine->QuickInsertField( SvxFieldItem(SvxFileField(), EE_FEATURE_FIELD), ESelection(0,2,0,2) ); pEdEngine->QuickInsertField( SvxFieldItem(SvxTableField(), EE_FEATURE_FIELD), ESelection() ); @@ -445,7 +445,7 @@ void ScStyleSheetPool::CreateStandardStyles() pHeaderItem->SetLeftArea( *pTxtObj ); pHeaderItem->SetCenterArea( *pEmptyTxtObj ); DELETEZ( pTxtObj ); - aStr = OUString(", "); + aStr = ", "; pEdEngine->SetText( aStr ); pEdEngine->QuickInsertField( SvxFieldItem(SvxTimeField(), EE_FEATURE_FIELD), ESelection(0,2,0,2) ); pEdEngine->QuickInsertField( SvxFieldItem(SvxDateField(Date( Date::SYSTEM ),SVXDATETYPE_VAR), EE_FEATURE_FIELD), @@ -459,10 +459,10 @@ void ScStyleSheetPool::CreateStandardStyles() // Fusszeile: // [leer][Seite: \SEITE\ / \SEITEN\][leer] //---------------------------------------- - aStr = SCSTR( STR_PAGE ); aStr += ' '; - nStrLen = aStr.Len(); - aStr.AppendAscii(RTL_CONSTASCII_STRINGPARAM(" / ")); - xub_StrLen nStrLen2 = aStr.Len(); + aStr = SCSTR( STR_PAGE ) + " "; + nStrLen = aStr.getLength(); + aStr += " / "; + sal_Int32 nStrLen2 = aStr.getLength(); pEdEngine->SetText( aStr ); pEdEngine->QuickInsertField( SvxFieldItem(SvxPagesField(), EE_FEATURE_FIELD), ESelection(0,nStrLen2,0,nStrLen2) ); pEdEngine->QuickInsertField( SvxFieldItem(SvxPageField(), EE_FEATURE_FIELD), ESelection(0,nStrLen,0,nStrLen) ); |