[Libreoffice-commits] core.git: include/tools
Mike Kaganski (via logerrit)
logerrit at kemper.freedesktop.org
Tue Nov 10 10:14:16 UTC 2020
include/tools/UnitConversion.hxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 373c8b46e66276df01d0e9e6f1dd808d64779e10
Author: Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Tue Nov 10 10:45:36 2020 +0200
Commit: Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Tue Nov 10 11:13:38 2020 +0100
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 at collabora.com>
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; }
More information about the Libreoffice-commits
mailing list