diff options
authorMiklos Vajna <>2017-07-12 17:53:40 +0200
committerMiklos Vajna <>2017-08-24 11:29:08 +0200
commit72921a4401706fd674d8a15d8b39a4996b64f9fe (patch)
parent8caffe13ad738d759c07b3aa0ea20ce2c170cbbe (diff)
tdf#108524 sw: allow frames in growable follow sects in SwFrame::IsMoveable()
In general the move of frames inside growable sections is not allowed, so that the behavior is deterministic: either the section grows or content is moved to a follow section frame. But in case of split sections it is necessary to allow the move of text frames inside growable section frames, otherwise it is impossible to move text frames from the last follow of a section frame to the previous one. This is necessary, but not enough to address the sub-problem described in comment 12 of the bug. At least now SwFlowFrame::MoveBwd() is invoked to consider moving the frame backwards, though. Change-Id: I0b79e9db72a4e335701491dd6f7745058901e176 Reviewed-on: Reviewed-by: Miklos Vajna <> Tested-by: Jenkins <> (cherry picked from commit 5b9edf5d5779b9ce578084250a6c87808ddc5fa8)
1 files changed, 5 insertions, 1 deletions
diff --git a/sw/source/core/layout/findfrm.cxx b/sw/source/core/layout/findfrm.cxx
index 3ad50a012d13..116ccd430d63 100644
--- a/sw/source/core/layout/findfrm.cxx
+++ b/sw/source/core/layout/findfrm.cxx
@@ -1264,8 +1264,12 @@ static bool lcl_IsInSectionDirectly( const SwFrame *pUp )
if( pUp->IsColumnFrame() )
bSeenColumn = true;
else if( pUp->IsSctFrame() )
+ {
+ auto pSection = static_cast<const SwSectionFrame*>(pUp);
// Allow move of frame in case our only column is not growable.
- return bSeenColumn || !static_cast<const SwSectionFrame*>(pUp)->Growable();
+ // Also allow if there is a previous section frame (to move back).
+ return bSeenColumn || !pSection->Growable() || pSection->GetPrecede();
+ }
else if( pUp->IsTabFrame() )
return false;
pUp = pUp->GetUpper();