From c5a0b7af847a71fd50f713934b29305f8ce96c6b Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 3 May 2021 14:09:20 +0200 Subject: loplugin:stringadd improvement for appending numbers I was wrong, the Concat framework already optimised appending numbers by stack-allocating small buffers, so include them in the plugin Change-Id: I922edbdde273c89abfe21d51c5d25dc01c97db25 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115037 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sdext/source/pdfimport/pdfparse/pdfentries.cxx | 4 ++-- sdext/source/pdfimport/tree/genericelements.cxx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'sdext') diff --git a/sdext/source/pdfimport/pdfparse/pdfentries.cxx b/sdext/source/pdfimport/pdfparse/pdfentries.cxx index 0054faba9bd1..bc379e5e2508 100644 --- a/sdext/source/pdfimport/pdfparse/pdfentries.cxx +++ b/sdext/source/pdfimport/pdfparse/pdfentries.cxx @@ -1366,7 +1366,7 @@ PDFFileImplData* PDFFile::impl_getData() const { OUStringBuffer aTmp; for( int i = 0; i < aEnt.getLength(); i++ ) - aTmp.append(" ").append(static_cast(sal_uInt8(aEnt[i])), 16); + aTmp.append(" " + OUString::number(sal_uInt8(aEnt[i]), 16)); SAL_WARN("sdext.pdfimport.pdfparse", "O entry has length " << static_cast(aEnt.getLength()) << ", should be 32 <" << aTmp.makeStringAndClear() << ">" ); } @@ -1386,7 +1386,7 @@ PDFFileImplData* PDFFile::impl_getData() const { OUStringBuffer aTmp; for( int i = 0; i < aEnt.getLength(); i++ ) - aTmp.append(" ").append(static_cast(sal_uInt8(aEnt[i])), 16); + aTmp.append(" " + OUString::number(sal_uInt8(aEnt[i]), 16)); SAL_WARN("sdext.pdfimport.pdfparse", "U entry has length " << static_cast(aEnt.getLength()) << ", should be 32 <" << aTmp.makeStringAndClear() << ">" ); } diff --git a/sdext/source/pdfimport/tree/genericelements.cxx b/sdext/source/pdfimport/tree/genericelements.cxx index 3754d811e4ab..b02e2c0a727d 100644 --- a/sdext/source/pdfimport/tree/genericelements.cxx +++ b/sdext/source/pdfimport/tree/genericelements.cxx @@ -167,7 +167,7 @@ void PolyPolyElement::emitStructure( int nLevel) for( int n = 0; n < nPoints; n++ ) { basegfx::B2DPoint aPoint = aPoly.getB2DPoint( n ); - buff.append( " (").append(aPoint.getX()).append(",").append(aPoint.getY()).append(")"); + buff.append( " (" + OUString::number(aPoint.getX()) + "," + OUString::number(aPoint.getY()) + ")"); } SAL_WARN( "sdext", " " << buff.makeStringAndClear() ); } -- cgit