summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2024-04-13 23:37:38 +0500
committerMike Kaganski <mike.kaganski@collabora.com>2024-04-14 08:58:39 +0200
commit84580785ba7081939296a0ae2da076e067612d4f (patch)
treed0a8f5dee13055d474b5adc9fbc8cd96674783d9 /sw/source
parentfce1fb034d282dc6e0434bf16c49d5f602d813bd (diff)
Use more o3tl::convert
Change-Id: I922502c80d79b8432a46e97178bc87f43847f996 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166061 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/filter/html/css1atr.cxx6
1 files changed, 3 insertions, 3 deletions
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<Css1FrameSize> : is_typed_flags<Css1FrameSize, 0x17> {};
}
-#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 );
}