From 335de1a2216523527f2a6a9aef4f5997f775e648 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 21 Apr 2021 20:44:57 +0200 Subject: no need makeStringAndClear() when appending to buffer it just creates an unnecessary temporary Change-Id: Ide3cd99b2ac4f2a621e5d55ce4bdc95d05430709 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114467 Tested-by: Jenkins Reviewed-by: Noel Grandin --- xmloff/source/draw/animationexport.cxx | 2 +- xmloff/source/draw/shapeexport.cxx | 2 +- xmloff/source/style/xmlnumfi.cxx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'xmloff') diff --git a/xmloff/source/draw/animationexport.cxx b/xmloff/source/draw/animationexport.cxx index 5ad5965dc5b9..339d3b268768 100644 --- a/xmloff/source/draw/animationexport.cxx +++ b/xmloff/source/draw/animationexport.cxx @@ -1470,7 +1470,7 @@ void AnimationsExporterImpl::convertValue( XMLTokenEnum eAttributeName, OUString convertValue( eAttributeName, sTmp, pValuePair->First ); sTmp.append( ',' ); convertValue( eAttributeName, sTmp2, pValuePair->Second ); - sTmp.append( sTmp2.makeStringAndClear() ); + sTmp.append( sTmp2 ); } else if( auto pSequence = o3tl::tryAccess>(rValue) ) { diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx index 6dea19c1daf6..37e9258f2861 100644 --- a/xmloff/source/draw/shapeexport.cxx +++ b/xmloff/source/draw/shapeexport.cxx @@ -1365,7 +1365,7 @@ void XMLShapeExport::ImpExportQRCode(const uno::Reference& xSha break; } mrExport.AddAttribute(XML_NAMESPACE_LO_EXT, XML_QRCODE_ERROR_CORRECTION, temp); - mrExport.AddAttribute(XML_NAMESPACE_LO_EXT, XML_QRCODE_BORDER, OUStringBuffer(20).append(aQRCode.Border).makeStringAndClear()); + mrExport.AddAttribute(XML_NAMESPACE_LO_EXT, XML_QRCODE_BORDER, OUString::number(aQRCode.Border)); SvXMLElementExport aQRCodeElement(mrExport, XML_NAMESPACE_LO_EXT, XML_QRCODE, true, true); diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx index 824a05c68e9a..8bfaf4d35464 100644 --- a/xmloff/source/style/xmlnumfi.cxx +++ b/xmloff/source/style/xmlnumfi.cxx @@ -1767,7 +1767,7 @@ void SvXMLNumFormatContext::AddNumber( const SvXMLNumberInfo& rInfo ) } } - aFormatCode.append( aNumStr.makeStringAndClear() ); + aFormatCode.append( aNumStr ); if ( ( rInfo.bDecReplace || rInfo.nMinDecimalDigits < rInfo.nDecimals ) && nPrec ) // add decimal replacement (dashes) { -- cgit