[Libreoffice-commits] core.git: Branch 'feature/SwFrameBorder' - sw/source

Armin Le Grand Armin.Le.Grand at cib.de
Thu Nov 30 16:16:40 UTC 2017


 sw/source/core/inc/frame.hxx                                        |   18 -
 sw/source/core/layout/calcmove.cxx                                  |   30 --
 sw/source/core/layout/findfrm.cxx                                   |    2 
 sw/source/core/layout/flyincnt.cxx                                  |    5 
 sw/source/core/layout/ftnfrm.cxx                                    |    4 
 sw/source/core/layout/newfrm.cxx                                    |  114 ----------
 sw/source/core/layout/pagechg.cxx                                   |    3 
 sw/source/core/layout/sectfrm.cxx                                   |    2 
 sw/source/core/layout/ssfrm.cxx                                     |    3 
 sw/source/core/layout/tabfrm.cxx                                    |    4 
 sw/source/core/layout/wsfrm.cxx                                     |   13 -
 sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx |    2 
 12 files changed, 25 insertions(+), 175 deletions(-)

New commits:
commit 67c42d21152882fadf5f00791b2b3a7f69125350
Author: Armin Le Grand <Armin.Le.Grand at cib.de>
Date:   Thu Nov 30 17:13:12 2017 +0100

    SwFrameBorder: Removed IsInverse() from SwFrame
    
    IsInverse was always false and never set, elliminating it
    from SwFrame makes the code cleaner and reduces cases for
    SwRectFnSet from 5 to 3, making it also more understandable.
    Cleaned up all the code using it, ran all UnitTests, works
    well. In question, this single commit can be re-applied.
    
    Change-Id: If077c65a6dacd83de61d259cddbb3cd4c5e25a2f

diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx
index b1bbc0cc629b..aaff5532ee09 100644
--- a/sw/source/core/inc/frame.hxx
+++ b/sw/source/core/inc/frame.hxx
@@ -382,8 +382,6 @@ protected:
     SwFrameType mnFrameType;  //Who am I?
 
     bool mbInDtor      : 1;
-    bool mbReverse     : 1; // Next line above/at the right side instead
-                                 // under/at the left side of the previous line
     bool mbInvalidR2L  : 1;
     bool mbDerivedR2L  : 1;
     bool mbRightToLeft : 1;
@@ -583,9 +581,7 @@ public:
 
     bool IsInBalancedSection() const;
 
-    bool IsReverse() const { return mbReverse; }
     inline bool IsVertical() const;
-
     inline bool IsVertLR() const;
 
     void SetDerivedVert( bool bNew ){ mbDerivedVert = bNew; }
@@ -1291,31 +1287,24 @@ struct SwRectFnCollection
 typedef SwRectFnCollection* SwRectFn;
 
 // This class allows to use proper methods regardless of orientation (LTR/RTL, horizontal or vertical)
-extern SwRectFn fnRectHori, fnRectVert, fnRectB2T, fnRectVL2R, fnRectVertL2R;
+extern SwRectFn fnRectHori, fnRectVert, fnRectVertL2R;
 class SwRectFnSet {
 public:
     explicit SwRectFnSet(const SwFrame *pFrame)
         : m_bVert(pFrame->IsVertical())
-        , m_bRev(pFrame->IsReverse())
         , m_bVertL2R(pFrame->IsVertLR())
     {
-        m_fnRect = m_bVert ?
-            (m_bRev ? fnRectVL2R : (m_bVertL2R ? fnRectVertL2R : fnRectVert)) :
-            (m_bRev ? fnRectB2T : fnRectHori);
+        m_fnRect = m_bVert ? (m_bVertL2R ? fnRectVertL2R : fnRectVert) : fnRectHori;
     }
 
     void Refresh(const SwFrame *pFrame)
     {
         m_bVert = pFrame->IsVertical();
-        m_bRev = pFrame->IsReverse();
         m_bVertL2R = pFrame->IsVertLR();
-        m_fnRect = m_bVert ?
-            (m_bRev ? fnRectVL2R : (m_bVertL2R ? fnRectVertL2R : fnRectVert)) :
-            (m_bRev ? fnRectB2T : fnRectHori);
+        m_fnRect = m_bVert ? (m_bVertL2R ? fnRectVertL2R : fnRectVert) : fnRectHori;
     }
 
     bool IsVert() const    { return m_bVert; }
-    bool IsRev() const     { return m_bRev; }
     bool IsVertL2R() const { return m_bVertL2R; }
     SwRectFn FnRect() const { return m_fnRect; }
 
@@ -1380,7 +1369,6 @@ public:
 
 private:
     bool m_bVert;
-    bool m_bRev;
     bool m_bVertL2R;
     SwRectFn m_fnRect;
 };
diff --git a/sw/source/core/layout/calcmove.cxx b/sw/source/core/layout/calcmove.cxx
index 00703c236c16..6057b2115b28 100644
--- a/sw/source/core/layout/calcmove.cxx
+++ b/sw/source/core/layout/calcmove.cxx
@@ -519,27 +519,20 @@ void SwFrame::MakePos()
                 }
 
                 // cells may now leave their uppers
-                if( aRectFnSet.IsVert() && SwFrameType::Cell & nMyType && !mbReverse )
+                if( aRectFnSet.IsVert() && SwFrameType::Cell & nMyType )
                 {
                     aFrm.Pos().setX(aFrm.Pos().getX() - aFrm.Width() + pPrv->getFrameArea().Width());
                 }
             }
             else if( aRectFnSet.IsVert() && FRM_NOTE_VERT & nMyType )
             {
-                if( mbReverse )
+                if ( aRectFnSet.IsVertL2R() )
                 {
                     aFrm.Pos().setX(aFrm.Pos().getX() + pPrv->getFrameArea().Width());
                 }
                 else
                 {
-                    if ( aRectFnSet.IsVertL2R() )
-                    {
-                        aFrm.Pos().setX(aFrm.Pos().getX() + pPrv->getFrameArea().Width());
-                    }
-                    else
-                    {
-                        aFrm.Pos().setX(aFrm.Pos().getX() - aFrm.Width());
-                    }
+                    aFrm.Pos().setX(aFrm.Pos().getX() - aFrm.Width());
                 }
             }
             else
@@ -588,21 +581,14 @@ void SwFrame::MakePos()
                     }
 
                     // cells may now leave their uppers
-                    if( aRectFnSet.IsVert() && SwFrameType::Cell & nMyType && !mbReverse )
+                    if( aRectFnSet.IsVert() && SwFrameType::Cell & nMyType )
                     {
                         aFrm.Pos().setX(aFrm.Pos().getX() - aFrm.Width() + pPrv->getFrameArea().Width());
                     }
                 }
                 else if( aRectFnSet.IsVert() && FRM_NOTE_VERT & nMyType )
                 {
-                    if( mbReverse )
-                    {
-                        aFrm.Pos().setX(aFrm.Pos().getX() + pPrv->getFrameArea().Width());
-                    }
-                    else
-                    {
-                        aFrm.Pos().setX(aFrm.Pos().getX() - aFrm.Width());
-                    }
+                    aFrm.Pos().setX(aFrm.Pos().getX() - aFrm.Width());
                 }
                 else
                 {
@@ -634,7 +620,7 @@ void SwFrame::MakePos()
                         aFrm.Pos().setX(aFrm.Pos().getX() + GetUpper()->getFramePrintArea().Width() - aFrm.Width());
                     }
                 }
-                else if( aRectFnSet.IsVert() && !aRectFnSet.IsVertL2R() && FRM_NOTE_VERT & nMyType && !mbReverse )
+                else if( aRectFnSet.IsVert() && !aRectFnSet.IsVertL2R() && FRM_NOTE_VERT & nMyType )
                 {
                     aFrm.Pos().setX(aFrm.Pos().getX() - aFrm.Width() + GetUpper()->getFramePrintArea().Width());
                 }
@@ -647,7 +633,7 @@ void SwFrame::MakePos()
             aFrm.Pos().setY(0);
         }
 
-        if( IsBodyFrame() && aRectFnSet.IsVert() && !aRectFnSet.IsVertL2R() && !mbReverse && GetUpper() )
+        if( IsBodyFrame() && aRectFnSet.IsVert() && !aRectFnSet.IsVertL2R() && GetUpper() )
         {
             SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
             aFrm.Pos().setX(aFrm.Pos().getX() + GetUpper()->getFramePrintArea().Width() - aFrm.Width());
@@ -1138,7 +1124,7 @@ bool SwContentFrame::MakePrtArea( const SwBorderAttrs &rAttrs )
 
             {
                 SwFrameAreaDefinition::FramePrintAreaWriteAccess aPrt(*this);
-                aRectFnSet.SetPosY( aPrt, (!aRectFnSet.IsVert() || mbReverse) ? nUpper : nLower);
+                aRectFnSet.SetPosY( aPrt, !aRectFnSet.IsVert() ? nUpper : nLower);
             }
 
             nUpper += nLower;
diff --git a/sw/source/core/layout/findfrm.cxx b/sw/source/core/layout/findfrm.cxx
index 3a3607934481..73d4a86c0bce 100644
--- a/sw/source/core/layout/findfrm.cxx
+++ b/sw/source/core/layout/findfrm.cxx
@@ -1399,8 +1399,6 @@ void SwFrame::SetDirFlags( bool bVert )
             if( pAsk )
             {
                 mbVertical = pAsk->IsVertical();
-                mbReverse  = pAsk->IsReverse();
-
                 mbVertLR  = pAsk->IsVertLR();
 
                 if ( !pAsk->mbInvalidVert )
diff --git a/sw/source/core/layout/flyincnt.cxx b/sw/source/core/layout/flyincnt.cxx
index b8164d674a3d..af87a79ea1bd 100644
--- a/sw/source/core/layout/flyincnt.cxx
+++ b/sw/source/core/layout/flyincnt.cxx
@@ -36,7 +36,7 @@ SwFlyInContentFrame::SwFlyInContentFrame( SwFlyFrameFormat *pFormat, SwFrame* pS
     // OD 2004-05-27 #i26791# - member <aRelPos> moved to <SwAnchoredObject>
     Point aRelPos;
     if( pAnch && pAnch->IsVertical() )
-        aRelPos.setX(pAnch->IsReverse() ? nRel : -nRel);
+        aRelPos.setX(-nRel);
     else
         aRelPos.setY(nRel);
     SetCurrRelPos( aRelPos );
@@ -163,11 +163,8 @@ void SwFlyInContentFrame::MakeObjPos()
         //Update the current values in the format if needed, during this we of
         //course must not send any Modify.
         const bool bVert = GetAnchorFrame()->IsVertical();
-        const bool bRev = GetAnchorFrame()->IsReverse();
         SwTwips nOld = rVert.GetPos();
         SwTwips nAct = bVert ? -GetCurrRelPos().X() : GetCurrRelPos().Y();
-        if( bRev )
-            nAct = -nAct;
         if( nAct != nOld )
         {
             SwFormatVertOrient aVert( rVert );
diff --git a/sw/source/core/layout/ftnfrm.cxx b/sw/source/core/layout/ftnfrm.cxx
index 23fd2a19c624..eb9212d3fff8 100644
--- a/sw/source/core/layout/ftnfrm.cxx
+++ b/sw/source/core/layout/ftnfrm.cxx
@@ -340,7 +340,7 @@ SwTwips SwFootnoteContFrame::GrowFrame( SwTwips nDist, bool bTst, bool )
         SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
         aRectFnSet.SetHeight( aFrm, aRectFnSet.GetHeight(aFrm) + nDist );
 
-        if( IsVertical() && !IsVertLR() && !IsReverse() )
+        if( IsVertical() && !IsVertLR() )
         {
             aFrm.Pos().X() -= nDist;
         }
@@ -387,7 +387,7 @@ SwTwips SwFootnoteContFrame::GrowFrame( SwTwips nDist, bool bTst, bool )
             SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
             aFrm.SSize().Height() -= nDist;
 
-            if( IsVertical() && !IsVertLR() && !IsReverse() )
+            if( IsVertical() && !IsVertLR() )
             {
                 aFrm.Pos().X() += nDist;
             }
diff --git a/sw/source/core/layout/newfrm.cxx b/sw/source/core/layout/newfrm.cxx
index 9adafe9ee72a..0c4af5d82def 100644
--- a/sw/source/core/layout/newfrm.cxx
+++ b/sw/source/core/layout/newfrm.cxx
@@ -167,116 +167,6 @@ static SwRectFnCollection aVertical = {
     /*.fnSetTopAndHeight =*/&SwRect::SetRightAndWidth
 };
 
-static SwRectFnCollection aBottomToTop = {
-    /*.fnGetTop =*/&SwRect::Bottom_,
-    /*.fnGetBottom =*/&SwRect::Top_,
-    /*.fnGetLeft =*/&SwRect::Left_,
-    /*.fnGetRight =*/&SwRect::Right_,
-    /*.fnGetWidth =*/&SwRect::Width_,
-    /*.fnGetHeight =*/&SwRect::Height_,
-    /*.fnGetPos =*/&SwRect::BottomLeft,
-    /*.fnGetSize =*/&SwRect::Size_,
-
-    /*.fnSetTop =*/&SwRect::Bottom_,
-    /*.fnSetBottom =*/&SwRect::Top_,
-    /*.fnSetLeft =*/&SwRect::Left_,
-    /*.fnSetRight =*/&SwRect::Right_,
-    /*.fnSetWidth =*/&SwRect::Width_,
-    /*.fnSetHeight =*/&SwRect::Height_,
-
-    /*.fnSubTop =*/&SwRect::AddBottom,
-    /*.fnAddBottom =*/&SwRect::SubTop,
-    /*.fnSubLeft =*/&SwRect::SubLeft,
-    /*.fnAddRight =*/&SwRect::AddRight,
-    /*.fnAddWidth =*/&SwRect::AddWidth,
-    /*.fnAddHeight =*/&SwRect::AddHeight,
-
-    /*.fnSetPosX =*/&SwRect::SetPosX,
-    /*.fnSetPosY =*/&SwRect::SetPosY,
-
-    /*.fnGetTopMargin =*/&SwFrame::GetBottomMargin,
-    /*.fnGetBottomMargin =*/&SwFrame::GetTopMargin,
-    /*.fnGetLeftMargin =*/&SwFrame::GetLeftMargin,
-    /*.fnGetRightMargin =*/&SwFrame::GetRightMargin,
-    /*.fnSetXMargins =*/&SwFrame::SetLeftRightMargins,
-    /*.fnSetYMargins =*/&SwFrame::SetBottomTopMargins,
-    /*.fnGetPrtTop =*/&SwFrame::GetPrtBottom,
-    /*.fnGetPrtBottom =*/&SwFrame::GetPrtTop,
-    /*.fnGetPrtLeft =*/&SwFrame::GetPrtLeft,
-    /*.fnGetPrtRight =*/&SwFrame::GetPrtRight,
-    /*.fnTopDist =*/&SwRect::GetBottomDistance,
-    /*.fnBottomDist =*/&SwRect::GetTopDistance,
-    /*.fnLeftDist =*/&SwRect::GetLeftDistance,
-    /*.fnRightDist =*/&SwRect::GetRightDistance,
-    /*.fnSetLimit =*/&SwFrame::SetMinTop,
-    /*.fnOverStep =*/&SwRect::OverStepTop,
-
-    /*.fnSetPos =*/&SwRect::SetLowerLeftCorner,
-    /*.fnMakePos =*/&SwFrame::MakeUpperPos,
-    /*.fnXDiff =*/&FirstMinusSecond,
-    /*.fnYDiff =*/&SecondMinusFirst,
-    /*.fnXInc =*/&SwIncrement,
-    /*.fnYInc =*/&SwDecrement,
-
-    /*.fnSetLeftAndWidth =*/&SwRect::SetLeftAndWidth,
-    /*.fnSetTopAndHeight =*/&SwRect::SetBottomAndHeight
-};
-
-static SwRectFnCollection aVerticalRightToLeft = {
-    /*.fnGetTop =*/&SwRect::Left_,
-    /*.fnGetBottom =*/&SwRect::Right_,
-    /*.fnGetLeft =*/&SwRect::Top_,
-    /*.fnGetRight =*/&SwRect::Bottom_,
-    /*.fnGetWidth =*/&SwRect::Height_,
-    /*.fnGetHeight =*/&SwRect::Width_,
-    /*.fnGetPos =*/&SwRect::BottomRight,
-    /*.fnGetSize =*/&SwRect::SwappedSize,
-
-    /*.fnSetTop =*/&SwRect::Left_,
-    /*.fnSetBottom =*/&SwRect::Right_,
-    /*.fnSetLeft =*/&SwRect::Top_,
-    /*.fnSetRight =*/&SwRect::Bottom_,
-    /*.fnSetWidth =*/&SwRect::Height_,
-    /*.fnSetHeight =*/&SwRect::Width_,
-
-    /*.fnSubTop =*/&SwRect::SubLeft,
-    /*.fnAddBottom =*/&SwRect::AddRight,
-    /*.fnSubLeft =*/&SwRect::SubTop,
-    /*.fnAddRight =*/&SwRect::AddBottom,
-    /*.fnAddWidth =*/&SwRect::AddHeight,
-    /*.fnAddHeight =*/&SwRect::AddWidth,
-
-    /*.fnSetPosX =*/&SwRect::SetPosY,
-    /*.fnSetPosY =*/&SwRect::SetPosX,
-
-    /*.fnGetTopMargin =*/&SwFrame::GetLeftMargin,
-    /*.fnGetBottomMargin =*/&SwFrame::GetRightMargin,
-    /*.fnGetLeftMargin =*/&SwFrame::GetTopMargin,
-    /*.fnGetRightMargin =*/&SwFrame::GetBottomMargin,
-    /*.fnSetXMargins =*/&SwFrame::SetTopBottomMargins,
-    /*.fnSetYMargins =*/&SwFrame::SetLeftRightMargins,
-    /*.fnGetPrtTop =*/&SwFrame::GetPrtLeft,
-    /*.fnGetPrtBottom =*/&SwFrame::GetPrtRight,
-    /*.fnGetPrtLeft =*/&SwFrame::GetPrtBottom,
-    /*.fnGetPrtRight =*/&SwFrame::GetPrtTop,
-    /*.fnTopDist =*/&SwRect::GetLeftDistance,
-    /*.fnBottomDist =*/&SwRect::GetRightDistance,
-    /*.fnLeftDist =*/&SwRect::GetBottomDistance,
-    /*.fnRightDist =*/&SwRect::GetTopDistance,
-    /*.fnSetLimit =*/&SwFrame::SetMaxRight,
-    /*.fnOverStep =*/&SwRect::OverStepRight,
-
-    /*.fnSetPos =*/&SwRect::SetLowerLeftCorner,
-    /*.fnMakePos =*/&SwFrame::MakeRightPos,
-    /*.fnXDiff =*/&FirstMinusSecond,
-    /*.fnYDiff =*/&FirstMinusSecond,
-    /*.fnXInc =*/&SwDecrement,
-    /*.fnYInc =*/&SwIncrement,
-
-    /*.fnSetLeftAndWidth =*/&SwRect::SetBottomAndHeight,
-    /*.fnSetTopAndHeight =*/&SwRect::SetLeftAndWidth
-};
-
 static SwRectFnCollection aVerticalLeftToRight = {
     /*.fnGetTop =*/&SwRect::Left_,
     /*.fnGetBottom =*/&SwRect::Right_,
@@ -334,12 +224,8 @@ static SwRectFnCollection aVerticalLeftToRight = {
 
 SwRectFn fnRectHori = &aHorizontal;
 SwRectFn fnRectVert = &aVertical;
-
 SwRectFn fnRectVertL2R = &aVerticalLeftToRight;
 
-SwRectFn fnRectB2T = &aBottomToTop;
-SwRectFn fnRectVL2R = &aVerticalRightToLeft;
-
 // #i65250#
 sal_uInt32 SwFrame::mnLastFrameId=0;
 
diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx
index b35a5e1e1e40..68dfd632b5ec 100644
--- a/sw/source/core/layout/pagechg.cxx
+++ b/sw/source/core/layout/pagechg.cxx
@@ -99,7 +99,7 @@ void SwBodyFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorder
         SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
         aFrm.Height( nHeight );
 
-        if( IsVertical() && !IsVertLR() && !IsReverse() && nWidth != aFrm.Width() )
+        if( IsVertical() && !IsVertLR() && nWidth != aFrm.Width() )
         {
             aFrm.Pos().setX(aFrm.Pos().getX() + aFrm.Width() - nWidth);
         }
@@ -353,7 +353,6 @@ void SwPageFrame::CheckDirection( bool bVert )
             }
         }
 
-        mbReverse = false;
         mbInvalidVert = false;
     }
     else
diff --git a/sw/source/core/layout/sectfrm.cxx b/sw/source/core/layout/sectfrm.cxx
index 2b6def165059..0e9e657933a8 100644
--- a/sw/source/core/layout/sectfrm.cxx
+++ b/sw/source/core/layout/sectfrm.cxx
@@ -1041,7 +1041,7 @@ void SwSectionFrame::CheckClipping( bool bGrow, bool bMaximize )
         if( nDiff > 0 )
         {
             long nAdd = GetUpper()->Grow( nDiff );
-            if( aRectFnSet.IsVert() && !aRectFnSet.IsRev() )
+            if( aRectFnSet.IsVert() )
                 nDeadLine -= nAdd;
             else
                 nDeadLine += nAdd;
diff --git a/sw/source/core/layout/ssfrm.cxx b/sw/source/core/layout/ssfrm.cxx
index ef7067aae000..0e4695dd2c56 100644
--- a/sw/source/core/layout/ssfrm.cxx
+++ b/sw/source/core/layout/ssfrm.cxx
@@ -232,13 +232,12 @@ void SwFrame::SetRightLeftMargins( long nRight, long nLeft)
 void SwFrame::CheckDirChange()
 {
     bool bOldVert = mbVertical;
-    bool bOldRev = IsReverse();
     bool bOldR2L = mbRightToLeft;
     SetInvalidVert( true );
     mbInvalidR2L = true;
     bool bChg = bOldR2L != IsRightToLeft();
     bool bOldVertL2R = IsVertLR();
-    if( ( IsVertical() != bOldVert ) || bChg || IsReverse() != bOldRev || bOldVertL2R != IsVertLR() )
+    if( ( IsVertical() != bOldVert ) || bChg || bOldVertL2R != IsVertLR() )
     {
         InvalidateAll();
         if( IsLayoutFrame() )
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index 2e39abf3c40e..677d2af75735 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -4502,7 +4502,7 @@ SwTwips SwRowFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool bInfo )
             SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
             aRectFnSet.SetHeight( aFrm, nHeight - nReal );
 
-            if( IsVertical() && !IsVertLR() && !aRectFnSet.IsRev() )
+            if( IsVertical() && !IsVertLR() )
             {
                 aFrm.Pos().X() += nReal;
             }
@@ -4521,7 +4521,7 @@ SwTwips SwRowFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool bInfo )
                 SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
                 aRectFnSet.SetHeight( aFrm, nHeight + nReal );
 
-                if( IsVertical() && !IsVertLR() && !aRectFnSet.IsRev() )
+                if( IsVertical() && !IsVertLR() )
                 {
                     aFrm.Pos().X() -= nReal;
                 }
diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx
index 01952039d9ee..f26626d7d746 100644
--- a/sw/source/core/layout/wsfrm.cxx
+++ b/sw/source/core/layout/wsfrm.cxx
@@ -300,7 +300,6 @@ SwFrame::SwFrame( SwModify *pMod, SwFrame* pSib )
     mpDrawObjs(nullptr),
     mnFrameType(SwFrameType::None),
     mbInDtor(false),
-    mbReverse(false),
     mbInvalidR2L(true),
     mbDerivedR2L(false),
     mbRightToLeft(false),
@@ -1787,7 +1786,7 @@ SwTwips SwFrame::AdjustNeighbourhood( SwTwips nDiff, bool bTst )
                         SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*pFrame->GetNext());
                         aRectFnSet.SetHeight(aFrm, nAddMax-nAdd);
 
-                        if( aRectFnSet.IsVert() && !aRectFnSet.IsVertL2R() && !aRectFnSet.IsRev() )
+                        if( aRectFnSet.IsVert() && !aRectFnSet.IsVertL2R() )
                         {
                             aFrm.Pos().X() += nAdd;
                         }
@@ -1812,7 +1811,7 @@ SwTwips SwFrame::AdjustNeighbourhood( SwTwips nDiff, bool bTst )
             SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*pFrame);
             aRectFnSet.SetHeight( aFrm, nTmp - nReal );
 
-            if( aRectFnSet.IsVert() && !aRectFnSet.IsVertL2R() && !aRectFnSet.IsRev() )
+            if( aRectFnSet.IsVert() && !aRectFnSet.IsVertL2R() )
             {
                 aFrm.Pos().X() += nReal;
             }
@@ -2047,7 +2046,7 @@ SwTwips SwContentFrame::GrowFrame( SwTwips nDist, bool bTst, bool bInfo )
                 SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
                 aRectFnSet.SetHeight( aFrm, nFrameHeight + nDist );
 
-                if( IsVertical() && !IsVertLR() && !IsReverse() )
+                if( IsVertical() && !IsVertLR() )
                 {
                     aFrm.Pos().X() -= nDist;
                 }
@@ -2087,7 +2086,7 @@ SwTwips SwContentFrame::GrowFrame( SwTwips nDist, bool bTst, bool bInfo )
 
             aRectFnSet.SetHeight( aFrm, nOld + nDist );
 
-            if( IsVertical()&& !IsVertLR() && !IsReverse() )
+            if( IsVertical()&& !IsVertLR() )
             {
                 aFrm.Pos().X() -= nDist;
             }
@@ -2574,7 +2573,7 @@ SwTwips SwLayoutFrame::GrowFrame( SwTwips nDist, bool bTst, bool bInfo )
     SwRect aOldFrame( getFrameArea() );
     bool bMoveAccFrame = false;
 
-    bool bChgPos = IsVertical() && !IsReverse();
+    bool bChgPos = IsVertical();
     if ( !bTst )
     {
         SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
@@ -2745,7 +2744,7 @@ SwTwips SwLayoutFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool bInfo )
         nDist = nFrameHeight;
 
     SwTwips nMin = 0;
-    bool bChgPos = IsVertical() && !IsReverse();
+    bool bChgPos = IsVertical();
     if ( Lower() )
     {
         if( !Lower()->IsNeighbourFrame() )
diff --git a/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx b/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx
index 6392f88d8912..41ee37128e3d 100644
--- a/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx
+++ b/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx
@@ -105,8 +105,6 @@ void SwToLayoutAnchoredObjectPosition::CalcPosition()
         // anchor position, depending on layout-direction
         if( aRectFnSet.IsVert() )
         {
-            OSL_ENSURE( !aRectFnSet.IsRev(), "<SwToLayoutAnchoredObjectPosition::CalcPosition()> - reverse layout set." );
-
             if ( aRectFnSet.IsVertL2R() )
                    aRelPos.X() = nRelPosY;
             else


More information about the Libreoffice-commits mailing list