diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2020-11-10 10:45:36 +0200 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2020-11-10 11:13:38 +0100 |
commit | 373c8b46e66276df01d0e9e6f1dd808d64779e10 (patch) | |
tree | b1157ef0156596909bab8de2d6e281408c79520a | |
parent | 9dd43f97b0d8223b571573d1fe5d899fc38d89ba (diff) |
Don't use arbitrarily truncated pre-calculated constant
Change-Id: I384151afacb83790f707f9b05e0142234e6e1adf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105467
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
-rw-r--r-- | include/tools/UnitConversion.hxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/tools/UnitConversion.hxx b/include/tools/UnitConversion.hxx index 028e5dcecfae..d568b78a2dd6 100644 --- a/include/tools/UnitConversion.hxx +++ b/include/tools/UnitConversion.hxx @@ -31,7 +31,7 @@ constexpr sal_Int64 convertPointToMm100(sal_Int64 nNumber) constexpr double convertPointToTwip(double fNumber) { return fNumber * 20.0; } -constexpr double convertPointToMm100(double fNumber) { return fNumber * 35.27777777778; } +constexpr double convertPointToMm100(double fNumber) { return fNumber * (2540.0 / 72.0); } // Convert PPT's "master unit" (1/576 inch) to twips constexpr sal_Int64 convertMasterUnitToTwip(sal_Int64 n) { return n * 2540.0 / 576.0; } |