summaryrefslogtreecommitdiff
path: root/sc/source/ui/formdlg
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-08-01 17:03:18 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-08-01 21:40:17 +0200
commit52f69445c55c9af8ad97bee6da335b4592d56d4d (patch)
treed88b7e629213b157af2113b64e54aaf08fc2cfc7 /sc/source/ui/formdlg
parent28580110807a38e3ba6f8385f22871b8dfe0a910 (diff)
loplugin:stringloop in sc
Change-Id: I12c020d5dd75d9c8ffcb7a2e8d6ff310628fa04d Reviewed-on: https://gerrit.libreoffice.org/58432 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui/formdlg')
-rw-r--r--sc/source/ui/formdlg/dwfunctr.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/sc/source/ui/formdlg/dwfunctr.cxx b/sc/source/ui/formdlg/dwfunctr.cxx
index 7abb24ee10f3..527c3a5de512 100644
--- a/sc/source/ui/formdlg/dwfunctr.cxx
+++ b/sc/source/ui/formdlg/dwfunctr.cxx
@@ -277,7 +277,7 @@ void ScFunctionWin::UpdateFunctionList()
void ScFunctionWin::DoEnter()
{
OUString aFirstArgStr;
- OUString aArgStr;
+ OUStringBuffer aArgStr;
OUString aString=aFuncList->GetSelectedEntry();
SfxViewShell* pCurSh = SfxViewShell::Current();
nArgs=0;
@@ -327,11 +327,11 @@ void ScFunctionWin::DoEnter()
for ( sal_uInt16 nArg = 1;
nArg < nFix && !pDesc->pDefArgFlags[nArg].bOptional; nArg++ )
{
- aArgStr += "; ";
+ aArgStr.append("; ");
OUString sTmp = pDesc->maDefArgNames[nArg];
sTmp = comphelper::string::strip(sTmp, ' ');
sTmp = sTmp.replaceAll(" ", "_");
- aArgStr += sTmp;
+ aArgStr.append(sTmp);
}
}
}
@@ -349,7 +349,7 @@ void ScFunctionWin::DoEnter()
if(nArgs>0)
{
pHdl->InsertFunction(aString);
- pEdView->InsertText(aArgStr,true);
+ pEdView->InsertText(aArgStr.makeStringAndClear(),true);
ESelection aESel=pEdView->GetSelection();
aESel.nEndPos = aESel.nStartPos + aFirstArgStr.getLength();
pEdView->SetSelection(aESel);