summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2017-07-13 15:54:23 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2017-08-24 11:29:14 +0200
commit1b7f65ed1d29608062c3b1136e715b4fd01530b4 (patch)
treea69ef918b787ca3b97e908d2372bc34a2f973b98 /sw
parent72921a4401706fd674d8a15d8b39a4996b64f9fe (diff)
tdf#108524 sw: allow frames in follow sect-in-tables in SwFlowFrame::MoveBwd()
The intention is to filter out text frames directly inside tables; since tables in general reflow by moving all of the content to the first page, then moving not fitting content to the next pages. Section frames are different, there we explicitly move content backwards, similarly to page body frames. Teach SwFlowFrame::MoveFwd() that a text frame inside a section-in-table is the section situation, not the table situation, since what matters here is the direct parent. To be on the safe side allow this for follow section frames only. This is necessary, but not enough to address the sub-problem described in comment 12 of the bug. At least SwFrame::GetPrevSctLeaf() is invoked to consider a precede section frame, though. Change-Id: Ic88602cffefbbc81ecc90e3880be2a098f60fb04 (cherry picked from commit 4908d6d6742e2f0700ea4ccd9d636d91ea281046)
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/layout/flowfrm.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/sw/source/core/layout/flowfrm.cxx b/sw/source/core/layout/flowfrm.cxx
index 3f708e2c3320..ddf1c6d02def 100644
--- a/sw/source/core/layout/flowfrm.cxx
+++ b/sw/source/core/layout/flowfrm.cxx
@@ -2008,7 +2008,10 @@ bool SwFlowFrame::MoveBwd( bool &rbReformat )
{
return false;
}
- if ( pUpperFrame->IsColumnFrame() && pUpperFrame->IsInSct() )
+ // If the text frame is a follow-section-in-table, that can move
+ // backward as well.
+ bool bIsFollowSection = pUpperFrame->IsSctFrame() && static_cast<const SwSectionFrame*>(pUpperFrame)->GetPrecede();
+ if ( ( pUpperFrame->IsColumnFrame() && pUpperFrame->IsInSct() ) || bIsFollowSection )
{
break;
}