summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2018-08-13 21:03:08 +0200
committerChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2018-08-16 11:57:42 +0200
commit9b01a1a47453300dfda59e3bbacf80e960169654 (patch)
tree5a6d9cfdd058f5251bb76f1554fe4843904a9d25 /sw/source
parenta0aea0b22a5ceb31b69407be6b74506194d44134 (diff)
tdf#118058 sw, sections in tables: no split for multiple columns
The original use-case was "group a few paragraphs together" for the split sections inside tables, i.e. it's safe to not split when the section has multiple columns. And the multiple columns case would mean that we don't find where to put the follow section inside a table, resulting in a layout loop. (cherry picked from commit d2d996db4806e84ae0bf6aef1c285b498f2d2867) Conflicts: sw/qa/extras/layout/layout.cxx Change-Id: Ifab220e582439d2e757b5645f3167b55a051a379 Reviewed-on: https://gerrit.libreoffice.org/58983 Tested-by: Jenkins Tested-by: Xisco FaulĂ­ <xiscofauli@libreoffice.org> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/layout/sectfrm.cxx16
1 files changed, 15 insertions, 1 deletions
diff --git a/sw/source/core/layout/sectfrm.cxx b/sw/source/core/layout/sectfrm.cxx
index b12952b0114a..7f8009a5cc44 100644
--- a/sw/source/core/layout/sectfrm.cxx
+++ b/sw/source/core/layout/sectfrm.cxx
@@ -620,7 +620,21 @@ namespace
return true;
// The frame is in a table, see if the table is in a section.
- return !pFrame->FindTabFrame()->IsInSct();
+ bool bRet = !pFrame->FindTabFrame()->IsInSct();
+
+ if (bRet)
+ {
+ // Don't try to split if the frame itself is a section frame with
+ // multiple columns.
+ if (pFrame->IsSctFrame())
+ {
+ const SwFrame* pLower = pFrame->GetLower();
+ if (pLower && pLower->IsColumnFrame())
+ bRet = false;
+ }
+ }
+
+ return bRet;
}
}