Kaydet (Commit) 8a9448aa authored tarafından Ricardo Montania's avatar Ricardo Montania Kaydeden (comit) Luboš Luňák

String.AppendAscii Drop

Signed-off-by: 's avatarLuboš Luňák <l.lunak@suse.cz>
https://gerrit.libreoffice.org/#/c/3892/

Change-Id: I12175a81f0a74546b5e00633176f204b9a3fb35c
üst 8d08ba5e
......@@ -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 ) );
}
......
......@@ -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
......
......@@ -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 );
......
......@@ -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 =
......
......@@ -485,12 +485,7 @@ LwpFormulaCellAddr::LwpFormulaCellAddr(sal_Int16 aCol, sal_Int16 aRow)
*/
OUString LwpFormulaCellAddr::ToString(LwpTableLayout* pCellsMap)
{
String aCellAddr;
aCellAddr.AppendAscii("<");//&lt;
aCellAddr += LwpFormulaTools::GetCellAddr(m_aRow,m_aCol,pCellsMap);
aCellAddr.AppendAscii(">");//&gt;
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("<");//&lt;
aCellAddr += LwpFormulaTools::GetCellAddr(m_aStartRow,m_aStartCol,pCellsMap);
aCellAddr.AppendAscii(":");
aCellAddr += LwpFormulaTools::GetCellAddr(m_aEndRow,m_aEndCol,pCellsMap);
aCellAddr.AppendAscii(">");//&gt;
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
{
......
......@@ -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 ) )
......
......@@ -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 );
}
......
......@@ -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,
......
......@@ -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 );
}
}
......
......@@ -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() )
{
......
......@@ -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) );
......
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