diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2011-11-10 05:18:58 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2011-11-10 05:20:35 +0100 |
commit | 832c18da69aa944dffae8f7d7a351f352a94cfcf (patch) | |
tree | b6dc2c369bf98e096102e125d531c07497a8af23 /svl | |
parent | 1833e05aebcdbb277a7945efc34230dc3138c610 (diff) |
change the code a bit to make it a bit more clear
this should do nearly the same as the old code
Diffstat (limited to 'svl')
-rw-r--r-- | svl/source/numbers/zformat.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx index d9d71d59c818..214d89f7c9af 100644 --- a/svl/source/numbers/zformat.cxx +++ b/svl/source/numbers/zformat.cxx @@ -2252,9 +2252,13 @@ bool SvNumberformat::GetOutputString(double fNumber, { if (rScan.GetStandardPrec() == SvNumberFormatter::UNLIMITED_PRECISION) { - bool bSign = ::rtl::math::isSignBitSet(fNumber) && fNumber != 0.0; + bool bSign = ::rtl::math::isSignBitSet(fNumber); if (bSign) + { + if (!(fNumber < 0.0)) + bSign = false; fNumber = -fNumber; + } ImpGetOutputStdToPrecision(fNumber, OutString, 10); // Use 10 decimals for general 'unlimited' format. if (fNumber < EXP_LOWER_BOUND) { |