diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2021-11-14 00:09:43 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2021-11-13 23:38:37 +0100 |
commit | 7b8f630db30ee0066a9f4b6e540368d2fcad7fa8 (patch) | |
tree | e40626d45db8a228defeca6e66aba9055974d0a6 /vcl/win | |
parent | 44f20abf66ce3f9806ad95522d7d9ae698350499 (diff) |
Use o3tl::convert
Change-Id: I78db3001d602ec1a0847785b3c127b9d345f5af7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125173
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'vcl/win')
-rw-r--r-- | vcl/win/dtrans/FmtFilter.cxx | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/vcl/win/dtrans/FmtFilter.cxx b/vcl/win/dtrans/FmtFilter.cxx index 535f6c122712..27d051f7e8a7 100644 --- a/vcl/win/dtrans/FmtFilter.cxx +++ b/vcl/win/dtrans/FmtFilter.cxx @@ -22,6 +22,7 @@ #include "FmtFilter.hxx" #include <o3tl/safeint.hxx> +#include <o3tl/unit_conversion.hxx> #include <osl/diagnose.h> #include <shobjidl.h> @@ -79,33 +80,33 @@ Sequence< sal_Int8 > WinMFPictToOOMFPict( Sequence< sal_Int8 >& aMetaFilePict ) switch( pMFPict->mm ) { case MM_TEXT: - nInch = 72; + nInch = o3tl::convert(1, o3tl::Length::in, o3tl::Length::pt); break; case MM_LOMETRIC: - nInch = 100; + nInch = o3tl::convert(1, o3tl::Length::in, o3tl::Length::mm10); break; case MM_HIMETRIC: - nInch = 1000; + nInch = o3tl::convert(1, o3tl::Length::in, o3tl::Length::mm100); break; case MM_LOENGLISH: - nInch = 254; + nInch = o3tl::convert(1, o3tl::Length::in, o3tl::Length::in100); break; case MM_HIENGLISH: case MM_ISOTROPIC: case MM_ANISOTROPIC: - nInch = 2540; + nInch = o3tl::convert(1, o3tl::Length::in, o3tl::Length::in1000); break; case MM_TWIPS: - nInch = 1440; + nInch = o3tl::convert(1, o3tl::Length::in, o3tl::Length::twip); break; default: - nInch = 576; + nInch = o3tl::convert(1, o3tl::Length::in, o3tl::Length::master); } pMFHeader->key = 0x9AC6CDD7L; |