diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2021-07-21 23:16:28 +0900 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2021-07-24 07:10:31 +0200 |
commit | 77a192aa016279acc0b0f9df584d1ce31bde41a4 (patch) | |
tree | 97f81b6d3f70a0e95f85226275e81afb447f76f1 /include/svx | |
parent | cb2827f5f65324f309fa0e3c30d0b19ad237410e (diff) |
sw: define to constexpr, use MM50 from svx and use o3tl::convert
MM50 is a constant representing 0.5cm in twips. Use o3tl::convert
for to init the constant instead. It matches the constant which I
checked with a static_assert.
Change-Id: Ib6c37a44ef5b22258e913fd3809a37ab0d18671b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119396
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'include/svx')
-rw-r--r-- | include/svx/flagsdef.hxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/svx/flagsdef.hxx b/include/svx/flagsdef.hxx index b098b141be11..3fbb70ca6b5e 100644 --- a/include/svx/flagsdef.hxx +++ b/include/svx/flagsdef.hxx @@ -21,6 +21,8 @@ #include <o3tl/typed_flags_set.hxx> #include <o3tl/enumarray.hxx> +#include <o3tl/unit_conversion.hxx> +#include <tools/long.hxx> // Border-Modes for SvxBorderTabPage enum class SwBorderModes @@ -99,7 +101,7 @@ enum SvxModeType // 1/2 cm in TWIPS // Is also used for minimum size of LayFrms of any kind -#define MM50 283 //from original svx/inc/paragrph.hxx +constexpr tools::Long MM50 = o3tl::convert(tools::Long(5), o3tl::Length::mm, o3tl::Length::twip); enum class TabulatorDisableFlags { TypeLeft = 0x0001, |