96 lines
5.0 KiB
Diff
96 lines
5.0 KiB
Diff
|
From 1b9c1803f6f42adc23f65ff4182c15192c4b7b92 Mon Sep 17 00:00:00 2001
|
||
|
From: Miklos Vajna <vmiklos@collabora.com>
|
||
|
Date: Tue, 5 May 2020 13:59:16 +0200
|
||
|
Subject: [PATCH] sw from-bottom relative orientation: add UI
|
||
|
|
||
|
And fix the value of LAST: it seems this went wrong in commit
|
||
|
c2fc91664f71c447209d2cd29c0df1d7faba4927 (Convert LB flags to scoped
|
||
|
enum, 2016-05-14), where the upper limit went from 0x80000000 to
|
||
|
0x080000, which means it started to matter if we allow equality or not.
|
||
|
Other places compare LAST without allowing equality, so leave that
|
||
|
unchanged and instead give LAST its own value.
|
||
|
|
||
|
Change-Id: I0ceac18475f5f50b792c7a8442648c9ba2a25236
|
||
|
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93477
|
||
|
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
||
|
Tested-by: Jenkins
|
||
|
(cherry picked from commit 8af2c4e3a517e3b75f2ace9719c1ca03153baddf)
|
||
|
---
|
||
|
cui/source/tabpages/swpossizetabpage.cxx | 11 +++++++----
|
||
|
include/svx/swframeposstrings.hxx | 1 +
|
||
|
svx/inc/swframeposstrings.hrc | 1 +
|
||
|
3 files changed, 9 insertions(+), 4 deletions(-)
|
||
|
|
||
|
diff --git a/cui/source/tabpages/swpossizetabpage.cxx b/cui/source/tabpages/swpossizetabpage.cxx
|
||
|
index 46a210559892..d4ade3ea4dfc 100644
|
||
|
--- a/cui/source/tabpages/swpossizetabpage.cxx
|
||
|
+++ b/cui/source/tabpages/swpossizetabpage.cxx
|
||
|
@@ -94,10 +94,12 @@ enum class LB {
|
||
|
// #i22341#
|
||
|
VertLine = 0x080000, // vertical text line
|
||
|
|
||
|
- LAST = VertLine
|
||
|
+ RelPagePrintAreaBottom = 0x100000, // bottom of text area of page
|
||
|
+
|
||
|
+ LAST = 0x200000
|
||
|
};
|
||
|
namespace o3tl {
|
||
|
- template<> struct typed_flags<LB> : is_typed_flags<LB, 0x0fffff> {};
|
||
|
+ template<> struct typed_flags<LB> : is_typed_flags<LB, 0x3fffff> {};
|
||
|
}
|
||
|
|
||
|
static RelationMap const aRelationMap[] =
|
||
|
@@ -110,6 +112,7 @@ static RelationMap const aRelationMap[] =
|
||
|
{SwFPos::REL_FRM_RIGHT, SwFPos::MIR_REL_FRM_RIGHT, LB::RelFrameRight, RelOrientation::FRAME_RIGHT},
|
||
|
{SwFPos::REL_PG_FRAME, SwFPos::REL_PG_FRAME, LB::RelPageFrame, RelOrientation::PAGE_FRAME},
|
||
|
{SwFPos::REL_PG_PRTAREA,SwFPos::REL_PG_PRTAREA, LB::RelPagePrintArea, RelOrientation::PAGE_PRINT_AREA},
|
||
|
+ {SwFPos::REL_PG_PRTAREA_BOTTOM,SwFPos::REL_PG_PRTAREA_BOTTOM, LB::RelPagePrintAreaBottom, RelOrientation::PAGE_PRINT_AREA_BOTTOM},
|
||
|
{SwFPos::REL_CHAR, SwFPos::REL_CHAR, LB::RelChar, RelOrientation::CHAR},
|
||
|
|
||
|
{SwFPos::FLY_REL_PG_LEFT, SwFPos::FLY_MIR_REL_PG_LEFT, LB::FlyRelPageLeft, RelOrientation::PAGE_LEFT},
|
||
|
@@ -257,7 +260,7 @@ static FrmMap const aVParaMap[] =
|
||
|
{SwFPos::TOP, SwFPos::TOP, VertOrientation::TOP, VERT_PARA_REL},
|
||
|
{SwFPos::BOTTOM, SwFPos::BOTTOM, VertOrientation::BOTTOM, VERT_PARA_REL},
|
||
|
{SwFPos::CENTER_VERT, SwFPos::CENTER_VERT, VertOrientation::CENTER, VERT_PARA_REL},
|
||
|
- {SwFPos::FROMTOP, SwFPos::FROMTOP, VertOrientation::NONE, VERT_PARA_REL}
|
||
|
+ {SwFPos::FROMTOP, SwFPos::FROMTOP, VertOrientation::NONE, VERT_PARA_REL|LB::RelPagePrintAreaBottom}
|
||
|
};
|
||
|
|
||
|
static FrmMap const aVParaHtmlMap[] =
|
||
|
@@ -314,7 +317,7 @@ static FrmMap aVCharMap[] =
|
||
|
{SwFPos::BOTTOM, SwFPos::BOTTOM, VertOrientation::BOTTOM, VERT_CHAR_REL|LB::RelChar},
|
||
|
{SwFPos::BELOW, SwFPos::BELOW, VertOrientation::CHAR_BOTTOM, LB::RelChar},
|
||
|
{SwFPos::CENTER_VERT, SwFPos::CENTER_VERT, VertOrientation::CENTER, VERT_CHAR_REL|LB::RelChar},
|
||
|
- {SwFPos::FROMTOP, SwFPos::FROMTOP, VertOrientation::NONE, VERT_CHAR_REL},
|
||
|
+ {SwFPos::FROMTOP, SwFPos::FROMTOP, VertOrientation::NONE, VERT_CHAR_REL|LB::RelPagePrintAreaBottom},
|
||
|
{SwFPos::FROMBOTTOM, SwFPos::FROMBOTTOM, VertOrientation::NONE, LB::RelChar|LB::VertLine},
|
||
|
{SwFPos::TOP, SwFPos::TOP, VertOrientation::LINE_TOP, LB::VertLine},
|
||
|
{SwFPos::BOTTOM, SwFPos::BOTTOM, VertOrientation::LINE_BOTTOM, LB::VertLine},
|
||
|
diff --git a/include/svx/swframeposstrings.hxx b/include/svx/swframeposstrings.hxx
|
||
|
index c0ef3a3520d0..61d06d459cdf 100644
|
||
|
--- a/include/svx/swframeposstrings.hxx
|
||
|
+++ b/include/svx/swframeposstrings.hxx
|
||
|
@@ -49,6 +49,7 @@ public:
|
||
|
MIR_REL_FRM_RIGHT ,
|
||
|
REL_PG_FRAME ,
|
||
|
REL_PG_PRTAREA ,
|
||
|
+ REL_PG_PRTAREA_BOTTOM ,
|
||
|
REL_BASE ,
|
||
|
REL_CHAR ,
|
||
|
REL_ROW ,
|
||
|
diff --git a/svx/inc/swframeposstrings.hrc b/svx/inc/swframeposstrings.hrc
|
||
|
index df4d92a976fb..b08a9a3b525b 100644
|
||
|
--- a/svx/inc/swframeposstrings.hrc
|
||
|
+++ b/svx/inc/swframeposstrings.hrc
|
||
|
@@ -43,6 +43,7 @@ const char* RID_SVXSW_FRAMEPOSITIONS[] =
|
||
|
NC_("RID_SVXSW_FRAMEPOSITIONS", "Outer paragraph border"),
|
||
|
NC_("RID_SVXSW_FRAMEPOSITIONS", "Entire page"),
|
||
|
NC_("RID_SVXSW_FRAMEPOSITIONS", "Page text area"),
|
||
|
+ NC_("RID_SVXSW_FRAMEPOSITIONS", "Page text area bottom"),
|
||
|
NC_("RID_SVXSW_FRAMEPOSITIONS", "Base line"),
|
||
|
NC_("RID_SVXSW_FRAMEPOSITIONS", "Character"),
|
||
|
NC_("RID_SVXSW_FRAMEPOSITIONS", "Row"),
|
||
|
--
|
||
|
2.26.1
|
||
|
|