diff options
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/core/layout/tabfrm.cxx | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx index cdf0ef0b9d01..65f1e7373e13 100644 --- a/sw/source/core/layout/tabfrm.cxx +++ b/sw/source/core/layout/tabfrm.cxx @@ -2108,7 +2108,13 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext) SwTwips nDeadLine = aRectFnSet.GetPrtBottom(*pTmp); if ( bBrowseMode ) nDeadLine += pTmp->Grow( LONG_MAX, true ); - if( aRectFnSet.BottomDist( getSwFrame(), nDeadLine ) > 0 ) + bool bFits = aRectFnSet.BottomDist(getSwFrame(), nDeadLine) > 0; + if (!bFits && aRectFnSet.GetHeight(GetFollow()->getSwFrame()) == 0) + // The follow should move backwards, so allow the case + // when the upper has no space, but the follow is + // empty. + bFits = aRectFnSet.BottomDist(getSwFrame(), nDeadLine) >= 0; + if (bFits) { // First, we remove an existing follow flow line. if ( HasFollowFlowLine() ) @@ -3413,7 +3419,12 @@ bool SwTabFrame::ShouldBwdMoved( SwLayoutFrame *pNewUpper, bool, bool &rReformat rReformat = true; return true; } - if (!m_bLockBackMove && nSpace > 0) + bool bFits = nSpace > 0; + if (!bFits && aRectFnSet.GetHeight(getSwFrame()) == 0) + // This frame fits into pNewUpper in case it has no space, but this + // frame is empty. + bFits = nSpace >= 0; + if (!m_bLockBackMove && bFits) { // #i26945# - check, if follow flow line // contains frame, which are moved forward due to its object |