summaryrefslogtreecommitdiff
path: root/sdext
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-05-03 14:09:20 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-05-03 15:32:53 +0200
commitc5a0b7af847a71fd50f713934b29305f8ce96c6b (patch)
treed7c0193bc183250c36e467f830a4327ab94dc24e /sdext
parentd19dbcc139d18771e5e20e82a694f1512476e41c (diff)
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 <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sdext')
-rw-r--r--sdext/source/pdfimport/pdfparse/pdfentries.cxx4
-rw-r--r--sdext/source/pdfimport/tree/genericelements.cxx2
2 files changed, 3 insertions, 3 deletions
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_Int32>(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<int>(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_Int32>(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<int>(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() );
}