summaryrefslogtreecommitdiff
path: root/sw/source/core
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2017-06-15 12:18:31 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2017-08-24 11:21:15 +0200
commit17824b7c49d87062a0ffeaebcb194b604936f126 (patch)
tree063e229e5ee31dd6d1dd42c34465aab86b0955a2 /sw/source/core
parent871c9e19ef5c2286e1de9321c736541d3f93ceac (diff)
tdf#108524 sw: try to split rows that contain 1-col sections
We used to not even attempt to split a row that contains sections. Relax this condition and try to split the row in case the table itself is not in a section (to avoid recursion) and the section has no columns. This is needed, but not enough to split the section in the bugdoc. Change-Id: I6ad0d6eb18611f108ae29e4feea7101ffe552c48 Reviewed-on: https://gerrit.libreoffice.org/38824 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit 336ec28195da1917c22494a24dbaf10b846d3141)
Diffstat (limited to 'sw/source/core')
-rw-r--r--sw/source/core/layout/tabfrm.cxx17
1 files changed, 16 insertions, 1 deletions
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index 2230a4920e14..45282d886929 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -906,7 +906,22 @@ static bool lcl_FindSectionsInRow( const SwRowFrame& rRow )
else
{
// #i26945# - search only for sections
- bRet = pTmpFrame->IsSctFrame();
+ if (pTmpFrame->IsSctFrame())
+ {
+ bRet = true;
+
+ if (!rRow.IsInSct())
+ {
+ // This row is not in a section.
+ if (const SwFrame* pSectionLower = pTmpFrame->GetLower())
+ {
+ if (!pSectionLower->IsColumnFrame())
+ // Section has a single column only, try to
+ // split that.
+ bRet = false;
+ }
+ }
+ }
}
if ( bRet )