From 4a96fb8ec0130e1036913093836bcf28bc37a49b Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 16 Oct 2019 10:13:30 +0200 Subject: loplugin:bufferadd loosen some constraints and extend O*StringView to have a constructor that takes a pointer and a length Change-Id: I6120e96280f030757e855a6596efdae438b7e1e8 Reviewed-on: https://gerrit.libreoffice.org/80872 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sdext/source/pdfimport/misc/pdfihelper.cxx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'sdext/source/pdfimport/misc/pdfihelper.cxx') diff --git a/sdext/source/pdfimport/misc/pdfihelper.cxx b/sdext/source/pdfimport/misc/pdfihelper.cxx index 2936a62965d8..3c6c85538158 100644 --- a/sdext/source/pdfimport/misc/pdfihelper.cxx +++ b/sdext/source/pdfimport/misc/pdfihelper.cxx @@ -101,10 +101,7 @@ OUString pdfi::getColorString( const rendering::ARGBColor& rCol ) OUString pdfi::getPercentString(double value) { - OUStringBuffer buf(32); - buf.append(value); - buf.append("%"); - return buf.makeStringAndClear(); + return OUString::number(value) + "%"; } OUString pdfi::unitMMString( double fMM ) -- cgit