diff options
author | Eike Rathke <erack@redhat.com> | 2013-03-15 17:52:15 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2013-03-15 19:34:04 +0100 |
commit | 7c66e99f1d1f2e640157b079088aba35b33e0fc0 (patch) | |
tree | fb78c44a85deb941e233ebde759e27f40e7b3190 /svl | |
parent | 5c6dd7a8438f17f768c069f0bcc52d6420aa3e3e (diff) |
simplify logic
Change-Id: I60726b445712cc15f8453812ce6313167314a8df
Diffstat (limited to 'svl')
-rw-r--r-- | svl/source/numbers/zformat.cxx | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx index eca7005e2663..1ded02f8e59f 100644 --- a/svl/source/numbers/zformat.cxx +++ b/svl/source/numbers/zformat.cxx @@ -2521,14 +2521,12 @@ bool SvNumberformat::GetOutputString(double fNumber, nIx = 2; } } - if (nIx == 1 && fNumber < 0.0 && // negatives Format - IsNegativeRealNegative() ) // ohne Vorzeichen + if (fNumber < 0.0 && + ((nIx == 0 && IsNegativeRealNegative2()) || // 1st, usually positive subformat + (nIx == 1 && IsNegativeRealNegative()))) // 2nd, usually negative subformat { - fNumber = -fNumber; // Vorzeichen eliminieren + fNumber = -fNumber; // eliminate sign } - if(nIx == 0 && - IsNegativeRealNegative2() && fNumber < 0.0) - fNumber = -fNumber; *ppColor = NumFor[nIx].GetColor(); const ImpSvNumberformatInfo& rInfo = NumFor[nIx].Info(); const sal_uInt16 nAnz = NumFor[nIx].GetCount(); |