| commit | 54a6a0dc204280783ee74a11234d5eb5f187cd14 | [log] |
|---|---|---|
| author | Noel Grandin <noel.grandin@collabora.co.uk> | Mon Sep 06 13:25:45 2021 +0200 |
| committer | Michael Stahl <michael.stahl@allotropia.de> | Wed Sep 08 11:06:19 2021 +0200 |
| tree | 9c5e88cb8c982f73d9543792a13004ff0b50efa9 | |
| parent | a8d560c4a89614a6bd99c9af3e76927d4405dbf7 [diff] |
tdf#144319 fix formula load regression from commit 67d83e40e2c4f3862c50e6abeabfc24a75119fc8 Author: Noel Grandin <noelgrandin@gmail.com> Date: Sat Dec 19 13:25:53 2020 +0200 speedup rational_FromDouble Change-Id: Icb728b63f950e827f1492087114f927c2f85ddb9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121719 Tested-by: Jenkins Tested-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit f8cf0d2cb4e5e18f48d6b3bfbc7d0e72e7ed5190) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121571 (cherry picked from commit 80730649fd584bb605dd3ecb734d2ac104a55e5c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121756 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Tested-by: Michael Stahl <michael.stahl@allotropia.de>
diff --git a/tools/source/generic/fract.cxx b/tools/source/generic/fract.cxx index 7c0e850d..57dd4e7 100644 --- a/tools/source/generic/fract.cxx +++ b/tools/source/generic/fract.cxx
@@ -43,6 +43,9 @@ // https://github.com/boostorg/boost/issues/335 when these are std::numeric_limits<sal_Int32>::min if (n == d) return 1; // tdf#144319 avoid boost::bad_rational e.g. if numerator=-476741369, denominator=-2147483648 if (d < -std::numeric_limits<sal_Int32>::max()) return 0; return boost::rational<sal_Int32>(n, d); }