[Libreoffice-commits] core.git: sw/inc sw/source

Caolán McNamara caolanm at redhat.com
Thu Feb 16 10:06:55 UTC 2017


 sw/inc/pagedesc.hxx                |    4 ++--
 sw/source/core/layout/paintfrm.cxx |    1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

New commits:
commit a6afec6b004aaab3dd5c114bf92725b54d89b4c1
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Feb 16 09:53:28 2017 +0000

    crashtesting: enum values need to not change
    
    in
    
    SwPageFootnoteInfoItem::PutValue
    (sw/source/uibase/utlui/uiitems.cxx)
    aFootnoteInfo.SetAdj((SwFootnoteAdj)nSet);                                                                                    │
    
    MID_LINE_ADJUST takes a sal_Int16 and casts it to SwFootnoteAdj so
    the implicit 0 and 2 for Left and Right needs to be retained
    
    Change-Id: I87725550cd698df8155508c9976d6d2304af05be

diff --git a/sw/inc/pagedesc.hxx b/sw/inc/pagedesc.hxx
index 2c62328..9b9378f 100644
--- a/sw/inc/pagedesc.hxx
+++ b/sw/inc/pagedesc.hxx
@@ -45,7 +45,7 @@ class SwPageDescs;
 /// Separator line adjustment.
 enum class SwFootnoteAdj
 {
-    Left, Right
+    Left = 0, Center = 1, Right = 2
 };
 
 /// Footnote information.
@@ -76,7 +76,7 @@ public:
     void SetLineStyle(editeng::SvxBorderStyle const eSet) {m_eLineStyle = eSet;}
     void SetLineColor(const Color& rCol)    { m_LineColor = rCol;}
     void SetWidth(const Fraction & rNew)    { m_Width = rNew; }
-    void SetAdj(SwFootnoteAdj const eNew)        { m_eAdjust = eNew; }
+    void SetAdj(SwFootnoteAdj const eNew)   { m_eAdjust = eNew; }
     void SetTopDist   (SwTwips const nNew)  { m_nTopDist = nNew; }
     void SetBottomDist(SwTwips const nNew)  { m_nBottomDist = nNew; }
 
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index a1051bc..51ed713 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -5578,6 +5578,7 @@ void SwFootnoteContFrame::PaintLine( const SwRect& rRect,
         case SwFootnoteAdj::Left:
             /* do nothing */; break;
         default:
+            SAL_WARN("sw.core", "New adjustment for footnote lines?");
             assert(false);
     }
     SwTwips nLineWidth = rInf.GetLineWidth();


More information about the Libreoffice-commits mailing list