diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2020-11-10 12:23:02 +0200 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2020-11-10 15:43:19 +0100 |
commit | f37b87ea5c87a683a39758a2875539f6bf59cf93 (patch) | |
tree | b9f2313b2eca445a46c14eedea24f017e8b8f5dd /include | |
parent | afbbfb3b55beb937555a972d9edbb47ede91001a (diff) |
This converts to/from mm100s, not twips
Change-Id: Ie13e38c78b5e9a65b0dc572628f4fcc93b2c2a17
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105530
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/tools/UnitConversion.hxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/tools/UnitConversion.hxx b/include/tools/UnitConversion.hxx index d568b78a2dd6..e78ef315b432 100644 --- a/include/tools/UnitConversion.hxx +++ b/include/tools/UnitConversion.hxx @@ -33,10 +33,10 @@ constexpr double convertPointToTwip(double fNumber) { return fNumber * 20.0; } 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; } +// Convert PPT's "master unit" (1/576 inch) to mm/100 +constexpr sal_Int64 convertMasterUnitToMm100(sal_Int64 n) { return n * (2540.0 / 576.0); } -// Convert twips to PPT's "master unit" -constexpr sal_Int64 convertTwipToMasterUnit(sal_Int64 n) { return n / (2540.0 / 576.0); } +// Convert mm/100 to PPT's "master unit" +constexpr sal_Int64 convertMm100ToMasterUnit(sal_Int64 n) { return n / (2540.0 / 576.0); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |