From 84580785ba7081939296a0ae2da076e067612d4f Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Sat, 13 Apr 2024 23:37:38 +0500 Subject: Use more o3tl::convert Change-Id: I922502c80d79b8432a46e97178bc87f43847f996 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166061 Tested-by: Jenkins Reviewed-by: Mike Kaganski --- sw/source/filter/html/css1atr.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sw/source') diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx index 48badab293dd..0cbf5b36da86 100644 --- a/sw/source/filter/html/css1atr.cxx +++ b/sw/source/filter/html/css1atr.cxx @@ -118,7 +118,7 @@ namespace o3tl { template<> struct typed_flags : is_typed_flags {}; } -#define DOT_LEADERS_MAX_WIDTH 18 +constexpr int DOT_LEADERS_MAX_WIDTH = 18; // cm static SwHTMLWriter& OutCSS1_SwFormat( SwHTMLWriter& rWrt, const SwFormat& rFormat, IDocumentStylePoolAccess /*SwDoc*/ *pDoc, SwDoc *pTemplate ); @@ -2822,7 +2822,7 @@ static SwHTMLWriter& OutCSS1_SvxTextLeftMargin(SwHTMLWriter & rWrt, SfxPoolItem // max-width = max-width - margin-left for TOC paragraphs with dot leaders if (rWrt.m_bParaDotLeaders) - rWrt.OutCSS1_UnitProperty(sCSS1_P_max_width, tools::Long(DOT_LEADERS_MAX_WIDTH/2.54*72*20) - nLeftMargin); + rWrt.OutCSS1_UnitProperty(sCSS1_P_max_width, o3tl::convert(DOT_LEADERS_MAX_WIDTH, o3tl::Length::cm, o3tl::Length::twip) - nLeftMargin); } @@ -2859,7 +2859,7 @@ static SwHTMLWriter& OutCSS1_SvxLRSpace( SwHTMLWriter& rWrt, const SfxPoolItem& // max-width = max-width - margin-left for TOC paragraphs with dot leaders if( rWrt.m_bParaDotLeaders ) - rWrt.OutCSS1_UnitProperty( sCSS1_P_max_width, tools::Long(DOT_LEADERS_MAX_WIDTH/2.54*72*20) - nLeftMargin ); + rWrt.OutCSS1_UnitProperty( sCSS1_P_max_width, o3tl::convert(DOT_LEADERS_MAX_WIDTH, o3tl::Length::cm, o3tl::Length::twip) - nLeftMargin ); } -- cgit