summaryrefslogtreecommitdiff
path: root/basctl
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-07-28 11:27:41 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-07-28 17:22:39 +0200
commitfa87224130a4ab6c4b79f993cc990adc4be0465b (patch)
tree89ef6c5fbae775cfc508d96e20d052fa6bad114a /basctl
parente1d7b0973d8318bd7f153350e2e8a38bec3b3e7b (diff)
loplugin:stringloop basctl,chart2,connectivity
Change-Id: I21353dace60705d55b3d70f1e0bc610d55b84d63 Reviewed-on: https://gerrit.libreoffice.org/58210 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basctl')
-rw-r--r--basctl/source/basicide/baside2b.cxx32
1 files changed, 16 insertions, 16 deletions
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index f32885c1292d..26c8b5170bf0 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -1890,15 +1890,15 @@ void StackWindow::UpdateCalls()
SbMethod* pMethod = StarBASIC::GetActiveMethod( nScope );
while ( pMethod )
{
- OUString aEntry( OUString::number(nScope ));
+ OUStringBuffer aEntry( OUString::number(nScope ));
if ( aEntry.getLength() < 2 )
- aEntry = " " + aEntry;
- aEntry += ": " + pMethod->GetName();
+ aEntry.insert(0, " ");
+ aEntry.append(": ").append(pMethod->GetName());
SbxArray* pParams = pMethod->GetParameters();
SbxInfo* pInfo = pMethod->GetInfo();
if ( pParams )
{
- aEntry += "(";
+ aEntry.append("(");
// 0 is the sub's name...
for ( sal_uInt16 nParam = 1; nParam < pParams->Count(); nParam++ )
{
@@ -1906,34 +1906,34 @@ void StackWindow::UpdateCalls()
assert(pVar && "Parameter?!");
if ( !pVar->GetName().isEmpty() )
{
- aEntry += pVar->GetName();
+ aEntry.append(pVar->GetName());
}
else if ( pInfo )
{
const SbxParamInfo* pParam = pInfo->GetParam( nParam );
if ( pParam )
{
- aEntry += pParam->aName;
+ aEntry.append(pParam->aName);
}
}
- aEntry += "=";
+ aEntry.append("=");
SbxDataType eType = pVar->GetType();
if( eType & SbxARRAY )
{
- aEntry += "..." ;
+ aEntry.append("...");
}
else if( eType != SbxOBJECT )
{
- aEntry += pVar->GetOUString();
+ aEntry.append(pVar->GetOUString());
}
if ( nParam < ( pParams->Count() - 1 ) )
{
- aEntry += ", ";
+ aEntry.append(", ");
}
}
- aEntry += ")";
+ aEntry.append(")");
}
- aTreeListBox->InsertEntry( aEntry );
+ aTreeListBox->InsertEntry( aEntry.makeStringAndClear() );
nScope++;
pMethod = StarBASIC::GetActiveMethod( nScope );
}
@@ -2168,7 +2168,7 @@ void WatchTreeListBox::RequestingChildren( SvTreeListEntry * pParent )
// Copy data and create name
- OUString aIndexStr = "(";
+ OUStringBuffer aIndexStr = "(";
pChildItem->mpArrayParentItem = pItem;
pChildItem->nDimLevel = nThisLevel;
pChildItem->nDimCount = pItem->nDimCount;
@@ -2177,10 +2177,10 @@ void WatchTreeListBox::RequestingChildren( SvTreeListEntry * pParent )
for( j = 0 ; j < nParentLevel ; j++ )
{
short n = pChildItem->vIndices[j] = pItem->vIndices[j];
- aIndexStr += OUString::number( n ) + ",";
+ aIndexStr.append(OUString::number( n )).append(",");
}
pChildItem->vIndices[nParentLevel] = sal::static_int_cast<short>( i );
- aIndexStr += OUString::number( i ) + ")";
+ aIndexStr.append(OUString::number( i )).append(")");
OUString aDisplayName;
WatchItem* pArrayRootItem = pChildItem->GetRootItem();
@@ -2188,7 +2188,7 @@ void WatchTreeListBox::RequestingChildren( SvTreeListEntry * pParent )
aDisplayName = pItem->maDisplayName;
else
aDisplayName = pItem->maName;
- aDisplayName += aIndexStr;
+ aDisplayName += aIndexStr.makeStringAndClear();
pChildItem->maDisplayName = aDisplayName;
SvTreeListEntry* pChildEntry = SvTreeListBox::InsertEntry( aDisplayName, pEntry );