[Libreoffice-commits] core.git: tools/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sat Dec 8 15:27:34 UTC 2018


 tools/source/generic/fract.cxx |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit 44266a536ffc44325345a343cda2a8a87b4e3e50
Author:     Rene Engelhard <rene at debian.org>
AuthorDate: Sat Dec 8 16:25:31 2018 +0100
Commit:     Rene Engelhard <rene at debian.org>
CommitDate: Sat Dec 8 16:27:12 2018 +0100

    fix build
    
    no idea why this wasn't found on my (incremental) build
    
    Change-Id: I78079d4c3196584b171d7566245a7f71b9d43649

diff --git a/tools/source/generic/fract.cxx b/tools/source/generic/fract.cxx
index 365bf57dc818..266b32fadf3e 100644
--- a/tools/source/generic/fract.cxx
+++ b/tools/source/generic/fract.cxx
@@ -186,8 +186,13 @@ namespace
         T den = r.denominator();
 
         // Avoid overflow and preserve normalization
+#if BOOST_VERSION >= 106700
+        T gcd1 = boost::integer::gcd(i.numerator(), den);
+        T gcd2 = boost::integer::gcd(num, i.denominator());
+#else
         T gcd1 = boost::math::gcd(i.numerator(), den);
         T gcd2 = boost::math::gcd(num, i.denominator());
+#endif
 
         bool fail = false;
         fail |= o3tl::checked_multiply(i.numerator() / gcd1, num / gcd2, num);


More information about the Libreoffice-commits mailing list