diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2023-06-12 12:23:17 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2023-06-12 12:58:51 +0200 |
commit | cf0fe26f95b5435d65623165cf7ba381eaa0738a (patch) | |
tree | 8422705a6d631ee49ed45a18e27f2eb2b2fd6ac9 /editeng | |
parent | db9d42f8ac4cb4669b79cf5f718f4013a1e81c31 (diff) |
tdf#154349: round before converting to an integer
Commit cfff893b9c82843a90aac4ecdb3a3936721b74a0 (Move unit conversion
code to o3tl, and unify on that in more places, 2021-02-14) changed a
custom conversion code in CalcToUnit doing inexact conversion from
points to mm/20 (with "* 10 / 567"), with correct conversion function.
A side effect was, however, that the imprecise arithmetics provided
floating-point values that rounded down to correct integers (or maybe
it was all the chain of calculations down to this function), while
the correctly converted values could round down to a smaller value.
Fix this problem using rounding.
Change-Id: I42e0d56b068832ef309f6b696f661642e62ddacb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152894
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'editeng')
0 files changed, 0 insertions, 0 deletions