diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2021-07-16 01:03:06 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2021-07-16 03:46:26 +0200 |
commit | 01c0cf63be7155531e1240d79e3936f8c4600864 (patch) | |
tree | 774a3476e298a2aac68cea7359f87efc33e635da /svx | |
parent | da13b76e07231131cb951868a314ee6f51c0f254 (diff) |
Move validity check to svl::Items, to avoid invalid WhichRangesContainer
This uncovered lots of pre-existing invalid ranges, e.g. introduced
in commit 6dbfbebad37fd84208e4c336f0864d26019db153, or in much older
commit 46952138c938730afcc3607e1a524bb590b0e30e.
Also this makes the static in svl::Items to be array of WhichPair,
to avoid questionable reinterpret_cast in WhichRangesContainer ctor.
Change-Id: I86030b2a2ac0a6d98870f8f7f5cc83e071c6597c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119003
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/dialog/hdft.cxx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/svx/source/dialog/hdft.cxx b/svx/source/dialog/hdft.cxx index 0fa7b35a4a3f..4fa388274755 100644 --- a/svx/source/dialog/hdft.cxx +++ b/svx/source/dialog/hdft.cxx @@ -55,14 +55,13 @@ const tools::Long DEF_DIST_WRITER = 500; // 5mm (Writer) const tools::Long DEF_DIST_CALC = 250; // 2.5mm (Calc) const WhichRangesContainer SvxHFPage::pRanges(svl::Items< - SID_ATTR_BRUSH, SID_ATTR_BRUSH, - // Support DrawingLayer FillStyles (no real call to below GetRanges() // detected, still do the complete transition) XATTR_FILL_FIRST, XATTR_FILL_LAST, - SID_ATTR_BORDER_OUTER, SID_ATTR_BORDER_OUTER, + SID_ATTR_BRUSH, SID_ATTR_BRUSH, SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER, + SID_ATTR_BORDER_OUTER, SID_ATTR_BORDER_OUTER, SID_ATTR_BORDER_SHADOW, SID_ATTR_BORDER_SHADOW, SID_ATTR_LRSPACE, SID_ATTR_LRSPACE, SID_ATTR_ULSPACE, SID_ATTR_ULSPACE, @@ -72,8 +71,8 @@ const WhichRangesContainer SvxHFPage::pRanges(svl::Items< SID_ATTR_PAGE_ON, SID_ATTR_PAGE_ON, SID_ATTR_PAGE_DYNAMIC, SID_ATTR_PAGE_DYNAMIC, SID_ATTR_PAGE_SHARED, SID_ATTR_PAGE_SHARED, - SID_ATTR_PAGE_SHARED_FIRST, SID_ATTR_PAGE_SHARED_FIRST, - SID_ATTR_HDFT_DYNAMIC_SPACING, SID_ATTR_HDFT_DYNAMIC_SPACING + SID_ATTR_HDFT_DYNAMIC_SPACING, SID_ATTR_HDFT_DYNAMIC_SPACING, + SID_ATTR_PAGE_SHARED_FIRST, SID_ATTR_PAGE_SHARED_FIRST >::value); namespace svx { |