From b83cc2b0108a4ec2087221a6150a66578788e5b4 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 26 Jul 2018 17:16:16 +0200 Subject: loplugin:stringloop in basic, framework, sax, svtools Change-Id: I2bad74a8f103e9dc68c8e0d0e6315697068d2f6d Reviewed-on: https://gerrit.libreoffice.org/58135 Tested-by: Jenkins Reviewed-by: Noel Grandin --- basic/source/sbx/sbxvar.cxx | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'basic/source/sbx/sbxvar.cxx') 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( static_cast( StringId::Types ) + nt ) ); + aTmp.append(GetSbxRes( static_cast( static_cast( StringId::Types ) + nt ) )); } else { - aTmp += GetSbxRes( StringId::Any ); + aTmp.append(GetSbxRes( StringId::Any )); } } } - aTmp += ")"; - const_cast(this)->aToolString = aTmp; + aTmp.append(")"); + const_cast(this)->aToolString = aTmp.makeStringAndClear(); return aToolString; } -- cgit