[Libreoffice-commits] core.git: cui/source include/svx svx/inc

Miklos Vajna (via logerrit) logerrit at kemper.freedesktop.org
Tue May 5 14:36:06 UTC 2020


 cui/source/tabpages/swpossizetabpage.cxx |   11 +++++++----
 include/svx/swframeposstrings.hxx        |    1 +
 svx/inc/swframeposstrings.hrc            |    1 +
 3 files changed, 9 insertions(+), 4 deletions(-)

New commits:
commit 8af2c4e3a517e3b75f2ace9719c1ca03153baddf
Author:     Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Tue May 5 13:59:16 2020 +0200
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Tue May 5 16:35:18 2020 +0200

    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 at collabora.com>
    Tested-by: Jenkins

diff --git a/cui/source/tabpages/swpossizetabpage.cxx b/cui/source/tabpages/swpossizetabpage.cxx
index f8d6beeb9649..a0a80e80e537 100644
--- a/cui/source/tabpages/swpossizetabpage.cxx
+++ b/cui/source/tabpages/swpossizetabpage.cxx
@@ -99,13 +99,15 @@ 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[] =
@@ -118,6 +120,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},
@@ -265,7 +268,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[] =
@@ -322,7 +325,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 06cbc4028c6b..346553c70ec8 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"),


More information about the Libreoffice-commits mailing list