diff options
author | Eike Rathke <erack@redhat.com> | 2016-08-05 23:37:31 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2016-08-05 23:42:04 +0200 |
commit | d83a4d671ad72800037d78f3eada369e4b477d82 (patch) | |
tree | c25ba6c218b819dcf55c506b5953a15c3cde9747 /svl | |
parent | f2e3de4dfcf10f9a59f8fc3f051c620fd50ef3c2 (diff) |
force integer display if numerator and denominator are equal
So with {# ?/?} format 1.96 is displayed as "2" insted of "1 1/1"
Change-Id: I756deeb884d41726c7d476a236d3c68b89fe9cba
Diffstat (limited to 'svl')
-rw-r--r-- | svl/source/numbers/zformat.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx index 3274ae392d16..f7face59ccf4 100644 --- a/svl/source/numbers/zformat.cxx +++ b/svl/source/numbers/zformat.cxx @@ -2517,6 +2517,11 @@ bool SvNumberformat::ImpGetFractionOutput(double fNumber, fRemainder = 0.0; // exit while loop } } + if (nFrac == nDiv) + { + ++fNum; + nFrac = 0; + } } if (rInfo.nCntPre == 0) // Improper fraction |