summaryrefslogtreecommitdiff
path: root/basic/source/sbx/sbxvar.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-07-26 17:16:16 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-07-27 11:35:24 +0200
commitb83cc2b0108a4ec2087221a6150a66578788e5b4 (patch)
treeb3684057b66602ddf01546dcb8306fddbad69a38 /basic/source/sbx/sbxvar.cxx
parent86be39afd5b142f7cbdbe0107b394c5924c414cc (diff)
loplugin:stringloop in basic, framework, sax, svtools
Change-Id: I2bad74a8f103e9dc68c8e0d0e6315697068d2f6d Reviewed-on: https://gerrit.libreoffice.org/58135 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basic/source/sbx/sbxvar.cxx')
-rw-r--r--basic/source/sbx/sbxvar.cxx30
1 files changed, 15 insertions, 15 deletions
diff --git a/basic/source/sbx/sbxvar.cxx b/basic/source/sbx/sbxvar.cxx
index 59751d4d6288..3172cf5f686e 100644
--- a/basic/source/sbx/sbxvar.cxx
+++ b/basic/source/sbx/sbxvar.cxx
@@ -233,7 +233,7 @@ const OUString& SbxVariable::GetName( SbxNameType t ) const
return maName;
}
sal_Unicode cType = ' ';
- OUString aTmp( maName );
+ OUStringBuffer aTmp( maName );
// short type? Then fetch it, possible this is 0.
SbxDataType et = GetType();
if( t == SbxNameType::ShortTypes )
@@ -244,10 +244,10 @@ const OUString& SbxVariable::GetName( SbxNameType t ) const
}
if( cType != ' ' )
{
- aTmp += OUStringLiteral1(cType);
+ aTmp.append(cType);
}
}
- aTmp += "(";
+ aTmp.append("(");
for (SbxParams::const_iterator iter = pInfo->m_Params.begin(); iter != pInfo->m_Params.end(); ++iter)
{
@@ -255,17 +255,17 @@ const OUString& SbxVariable::GetName( SbxNameType t ) const
int nt = i->eType & 0x0FFF;
if (iter != pInfo->m_Params.begin())
{
- aTmp += ",";
+ aTmp.append(",");
}
if( i->nFlags & SbxFlagBits::Optional )
{
- aTmp += GetSbxRes( StringId::Optional );
+ aTmp.append( GetSbxRes( StringId::Optional ) );
}
if( i->eType & SbxBYREF )
{
- aTmp += GetSbxRes( StringId::ByRef );
+ aTmp.append( GetSbxRes( StringId::ByRef ) );
}
- aTmp += i->aName;
+ aTmp.append( i->aName );
cType = ' ';
// short type? Then fetch it, possible this is 0.
if( t == SbxNameType::ShortTypes )
@@ -277,32 +277,32 @@ const OUString& SbxVariable::GetName( SbxNameType t ) const
}
if( cType != ' ' )
{
- aTmp += OUStringLiteral1(cType);
+ aTmp.append(cType);
if( i->eType & SbxARRAY )
{
- aTmp += "()";
+ aTmp.append("()");
}
}
else
{
if( i->eType & SbxARRAY )
{
- aTmp += "()";
+ aTmp.append("()");
}
// long type?
- aTmp += GetSbxRes( StringId::As );
+ aTmp.append(GetSbxRes( StringId::As ));
if( nt < 32 )
{
- aTmp += GetSbxRes( static_cast<StringId>( static_cast<int>( StringId::Types ) + nt ) );
+ aTmp.append(GetSbxRes( static_cast<StringId>( static_cast<int>( StringId::Types ) + nt ) ));
}
else
{
- aTmp += GetSbxRes( StringId::Any );
+ aTmp.append(GetSbxRes( StringId::Any ));
}
}
}
- aTmp += ")";
- const_cast<SbxVariable*>(this)->aToolString = aTmp;
+ aTmp.append(")");
+ const_cast<SbxVariable*>(this)->aToolString = aTmp.makeStringAndClear();
return aToolString;
}