summaryrefslogtreecommitdiff
path: root/sdext/source/pdfimport/misc/pdfihelper.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sdext/source/pdfimport/misc/pdfihelper.cxx')
-rw-r--r--sdext/source/pdfimport/misc/pdfihelper.cxx12
1 files changed, 2 insertions, 10 deletions
diff --git a/sdext/source/pdfimport/misc/pdfihelper.cxx b/sdext/source/pdfimport/misc/pdfihelper.cxx
index bd29d406b1be..8268be6b9d46 100644
--- a/sdext/source/pdfimport/misc/pdfihelper.cxx
+++ b/sdext/source/pdfimport/misc/pdfihelper.cxx
@@ -107,20 +107,12 @@ OUString pdfi::getPercentString(double value)
OUString pdfi::unitMMString( double fMM )
{
- OUStringBuffer aBuf( 32 );
- aBuf.append( rtl_math_round( fMM, 2, rtl_math_RoundingMode_Floor ) );
- aBuf.append( "mm" );
-
- return aBuf.makeStringAndClear();
+ return OUString::number(rtl_math_round( fMM, 2, rtl_math_RoundingMode_Floor )) + "mm";
}
OUString pdfi::convertPixelToUnitString( double fPix )
{
- OUStringBuffer aBuf( 32 );
- aBuf.append( rtl_math_round( convPx2mm( fPix ), 2, rtl_math_RoundingMode_Floor ) );
- aBuf.append( "mm" );
-
- return aBuf.makeStringAndClear();
+ return OUString::number( rtl_math_round( convPx2mm( fPix ), 2, rtl_math_RoundingMode_Floor ) ) + "mm";
}