summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx13
1 files changed, 5 insertions, 8 deletions
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 746636a5beb8..0a4d5953a42f 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -845,17 +845,14 @@ static void appendFixedInt( sal_Int32 nValue, OStringBuffer& rBuffer )
rBuffer.append( '-' );
nValue = -nValue;
}
- sal_Int32 nFactor = 10;
- sal_Int32 nInt = nValue / nFactor;
+ const sal_Int32 nFactor = 10;
+ const sal_Int32 nInt = nValue / nFactor;
rBuffer.append( nInt );
sal_Int32 nDecimal = nValue % nFactor;
- if( nDecimal )
+ if (nDecimal)
{
- rBuffer.append( '.' );
- // omit trailing zeros
- while( (nDecimal % 10) == 0 )
- nDecimal /= 10;
- rBuffer.append( nDecimal );
+ rBuffer.append('.');
+ rBuffer.append(nDecimal);
}
}