summaryrefslogtreecommitdiff
path: root/sw/source/core/layout/findfrm.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2018-04-16 22:14:12 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2018-04-17 09:06:12 +0200
commite4b335fac90a2128a5df3641050d6382883de1e8 (patch)
tree6dca27648d3a36fc50631ffa5efebd6d907c65a7 /sw/source/core/layout/findfrm.cxx
parentcc3690c9694e79d913c370ef1983c83f38dae23a (diff)
tdf#116848 sw, sections in tables: no split in headers or footers
The motivation for split section-in-tables was multiple pages, so disabling it for headers/footers is not a problem, and fixes the layout loop. Change-Id: I3e13690f6e6b50c35417f8a4f7886fd0befe7962 Reviewed-on: https://gerrit.libreoffice.org/53006 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'sw/source/core/layout/findfrm.cxx')
-rw-r--r--sw/source/core/layout/findfrm.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/sw/source/core/layout/findfrm.cxx b/sw/source/core/layout/findfrm.cxx
index 60b37f363555..baca3edfa189 100644
--- a/sw/source/core/layout/findfrm.cxx
+++ b/sw/source/core/layout/findfrm.cxx
@@ -1265,9 +1265,12 @@ static bool lcl_IsInSectionDirectly( const SwFrame *pUp )
else if( pUp->IsSctFrame() )
{
auto pSection = static_cast<const SwSectionFrame*>(pUp);
+ const SwFrame* pHeaderFooter = pSection->FindFooterOrHeader();
+ // When the section frame is not in header/footer:
// Allow move of frame in case our only column is not growable.
// Also allow if there is a previous section frame (to move back).
- return bSeenColumn || !pSection->Growable() || pSection->GetPrecede();
+ bool bAllowOutsideHeaderFooter = !pSection->Growable() || pSection->GetPrecede();
+ return bSeenColumn || (!pHeaderFooter && bAllowOutsideHeaderFooter);
}
else if( pUp->IsTabFrame() )
return false;