vcl/source/outdev/textline.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
New commits: commit a8931211b623cb38b7f703cf9a994ac66162f03a Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Sat Apr 13 23:36:22 2024 +0500 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Sun Apr 14 06:53:58 2024 +0200 Use more o3tl::convert Change-Id: I8a3c5d0e1a29219ab27bde75809ca9d8dce7e093 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166059 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/vcl/source/outdev/textline.cxx b/vcl/source/outdev/textline.cxx index 0dfd98d602f1..51937edc48ff 100644 --- a/vcl/source/outdev/textline.cxx +++ b/vcl/source/outdev/textline.cxx @@ -494,8 +494,8 @@ void OutputDevice::ImplDrawStraightTextLine( tools::Long nBaseX, tools::Long nBa nDashWidth = 100; nSpaceWidth = 50; } - nDashWidth = ((nDashWidth*mnDPIX)+1270)/2540; - nSpaceWidth = ((nSpaceWidth*mnDPIX)+1270)/2540; + nDashWidth = o3tl::convert(nDashWidth * mnDPIX, o3tl::Length::mm100, o3tl::Length::in); + nSpaceWidth = o3tl::convert(nSpaceWidth * mnDPIX, o3tl::Length::mm100, o3tl::Length::in); // DashWidth will be increased if the line is getting too thick // in proportion to the line's length if ( nDashWidth < nMinDashWidth ) @@ -521,7 +521,7 @@ void OutputDevice::ImplDrawStraightTextLine( tools::Long nBaseX, tools::Long nBa nDotWidth += mnDPIY/2; nDotWidth /= mnDPIY; - tools::Long nDashWidth = ((100*mnDPIX)+1270)/2540; + tools::Long nDashWidth = o3tl::convert(100 * mnDPIX, o3tl::Length::mm100, o3tl::Length::in); tools::Long nMinDashWidth = nDotWidth*4; // DashWidth will be increased if the line is getting too thick // in proportion to the line's length @@ -556,7 +556,7 @@ void OutputDevice::ImplDrawStraightTextLine( tools::Long nBaseX, tools::Long nBa nDotWidth += mnDPIY/2; nDotWidth /= mnDPIY; - tools::Long nDashWidth = ((100*mnDPIX)+1270)/2540; + tools::Long nDashWidth = o3tl::convert(100 * mnDPIX, o3tl::Length::mm100, o3tl::Length::in); tools::Long nMinDashWidth = nDotWidth*4; // DashWidth will be increased if the line is getting too thick // in proportion to the line's length