[Libreoffice-commits] core.git: svl/source
Eike Rathke
erack at redhat.com
Fri Aug 5 21:42:42 UTC 2016
svl/source/numbers/zformat.cxx | 5 +++++
1 file changed, 5 insertions(+)
New commits:
commit d83a4d671ad72800037d78f3eada369e4b477d82
Author: Eike Rathke <erack at redhat.com>
Date: Fri Aug 5 23:37:31 2016 +0200
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
diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index 3274ae3..f7face5 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
More information about the Libreoffice-commits
mailing list