diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-07-26 17:16:16 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-07-27 11:35:24 +0200 |
commit | b83cc2b0108a4ec2087221a6150a66578788e5b4 (patch) | |
tree | b3684057b66602ddf01546dcb8306fddbad69a38 /basic/source/sbx | |
parent | 86be39afd5b142f7cbdbe0107b394c5924c414cc (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')
-rw-r--r-- | basic/source/sbx/sbxexec.cxx | 6 | ||||
-rw-r--r-- | basic/source/sbx/sbxvar.cxx | 30 |
2 files changed, 18 insertions, 18 deletions
diff --git a/basic/source/sbx/sbxexec.cxx b/basic/source/sbx/sbxexec.cxx index a74cdf5c2655..7f177c27814d 100644 --- a/basic/source/sbx/sbxexec.cxx +++ b/basic/source/sbx/sbxexec.cxx @@ -140,7 +140,7 @@ static SbxVariableRef Operand else if( !bVar && *p == '"' ) { // A string - OUString aString; + OUStringBuffer aString; p++; for( ;; ) { @@ -157,9 +157,9 @@ static SbxVariableRef Operand break; } } - aString += OUStringLiteral1(*p++); + aString.append(*p++); } - refVar->PutString( aString ); + refVar->PutString( aString.makeStringAndClear() ); } else { 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; } |