summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2021-08-16 10:31:55 +0200
committerMike Kaganski <mike.kaganski@collabora.com>2021-08-16 11:32:15 +0200
commita6ca6215a5ec82e833ebfcd2ebd4455cb504fd8e (patch)
treec3ece9e06021e09c613be8c221c0b4d5f352ab6f /sw/source
parentf4538c29079a4a940540e5194075aaeee4d0ba3a (diff)
Use o3tl::toTwips to define MINBODY
This changes its value from 56 to the proper 57. See 9be17c52b7c565758088b8020a543d7b840e31a7, which had changed the previous 5-mm value to the incorrectly rounded 1-mm value; and cefce1a247a4674c5726a31b61571eab16328a0b, which had unified the other places mentioning i19922. Change-Id: I7186320b4c1a2a65a6f728ed8bafcbf0eb45c4cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120441 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/uibase/sidebar/PageMarginControl.hxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/sw/source/uibase/sidebar/PageMarginControl.hxx b/sw/source/uibase/sidebar/PageMarginControl.hxx
index 88e2d0e11e97..aa199dd4adde 100644
--- a/sw/source/uibase/sidebar/PageMarginControl.hxx
+++ b/sw/source/uibase/sidebar/PageMarginControl.hxx
@@ -19,6 +19,9 @@
#ifndef INCLUDED_SW_SOURCE_UIBASE_SIDEBAR_PAGEMARGINCONTROL_HXX
#define INCLUDED_SW_SOURCE_UIBASE_SIDEBAR_PAGEMARGINCONTROL_HXX
+#include <sal/config.h>
+
+#include <o3tl/unit_conversion.hxx>
#include <svtools/toolbarmenu.hxx>
#define SWPAGE_NARROW_VALUE 720
@@ -28,7 +31,7 @@
#define SWPAGE_WIDE_VALUE3 1800
// #i19922# - tdf#126051 see cui/source/tabpages/page.cxx and svx/source/dialog/hdft.cxx
-const tools::Long MINBODY = 56; // 1mm in twips rounded
+constexpr tools::Long MINBODY = o3tl::toTwips(1, o3tl::Length::mm); // 1mm in twips rounded
class PageMarginPopup;