diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-08-28 15:09:33 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-08-29 09:05:18 +0200 |
commit | 4c91b89d8ce9c34179f31854dc88bd0a9fa84cba (patch) | |
tree | 1fe9cc9db455779d33c24320fedc1e25888b3e5c /xmloff/source/style | |
parent | a1f31211920bfae1a21ea375fa5280c9c6595e15 (diff) |
new loplugin:oustringbuffer
look for places where we are appending the temporary result of adding
strings together, to an OUStringBuffer, where we could rather call
append repeatedly and avoid the temporary creation
Change-Id: I481435124291ac7fb54b91a78344a9fe5b379a82
Reviewed-on: https://gerrit.libreoffice.org/59708
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff/source/style')
-rw-r--r-- | xmloff/source/style/xmlbahdl.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/style/xmlexppr.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/style/xmlnumfi.cxx | 6 |
3 files changed, 7 insertions, 5 deletions
diff --git a/xmloff/source/style/xmlbahdl.cxx b/xmloff/source/style/xmlbahdl.cxx index 6a348b436006..debf07244872 100644 --- a/xmloff/source/style/xmlbahdl.cxx +++ b/xmloff/source/style/xmlbahdl.cxx @@ -488,7 +488,9 @@ bool XMLColorPropHdl::exportXML( OUString& rStrExpValue, const Any& rValue, cons Sequence< double > aHSL; if( (rValue >>= aHSL) && (aHSL.getLength() == 3) ) { - aOut.append( "hsl(" + OUString::number(aHSL[0]) + "," + OUString::number(aHSL[1] * 100.0) + "%," + OUString::number(aHSL[2] * 100.0) + "%)" ); + aOut.append( "hsl(" ).append( OUString::number(aHSL[0]) ).append( "," ) + .append( OUString::number(aHSL[1] * 100.0) ).append( "%," ) + .append( OUString::number(aHSL[2] * 100.0) ).append( "%)" ); rStrExpValue = aOut.makeStringAndClear(); bRet = true; diff --git a/xmloff/source/style/xmlexppr.cxx b/xmloff/source/style/xmlexppr.cxx index 80dd7e979dc9..e86521ca7f4a 100644 --- a/xmloff/source/style/xmlexppr.cxx +++ b/xmloff/source/style/xmlexppr.cxx @@ -949,7 +949,7 @@ void SvXMLExportPropertyMapper::_exportXML( pNamespaceMap = pNewNamespaceMap; } pNewNamespaceMap->Add( sPrefix, sNamespace ); - sNameBuffer.append( GetXMLToken(XML_XMLNS) + ":" + sPrefix ); + sNameBuffer.append( GetXMLToken(XML_XMLNS) ).append( ":" ).append( sPrefix ); rAttrList.AddAttribute( sNameBuffer.makeStringAndClear(), sNamespace ); } diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx index 59b48edf7c70..17a86b0ebfaf 100644 --- a/xmloff/source/style/xmlnumfi.cxx +++ b/xmloff/source/style/xmlnumfi.cxx @@ -2044,7 +2044,7 @@ void SvXMLNumFormatContext::AddCurrency( const OUString& rContent, LanguageType if ( nLang != LANGUAGE_SYSTEM ) { // '-' sign and language code in hex: - aFormatCode.append("-" + OUString::number(sal_uInt16(nLang), 16).toAsciiUpperCase()); + aFormatCode.append("-").append(OUString::number(sal_uInt16(nLang), 16).toAsciiUpperCase()); } aFormatCode.append( ']' ); // end of "new" currency symbol @@ -2075,7 +2075,7 @@ void SvXMLNumFormatContext::AddNfKeyword( sal_uInt16 nIndex ) if ( !bTruncate && !bHasDateTime ) { // with truncate-on-overflow = false, add "[]" to first time part - aFormatCode.append("[" + sKeyword + "]"); + aFormatCode.append("[").append(sKeyword).append("]"); } else { @@ -2200,7 +2200,7 @@ void SvXMLNumFormatContext::AddCondition( const sal_Int32 nIndex ) sRealCond = sRealCond.replaceAt( nPos, 1, rDecSep ); } } - aConditions.append("[" + sRealCond + "]"); + aConditions.append("[").append(sRealCond).append("]"); } const SvNumberformat* pFormat = pFormatter->GetEntry(l_nKey); |