summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2017-06-15 12:18:31 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2018-08-13 14:07:58 +0200
commit41c23fa2f66289b210ac5218cdafadbf3855fff7 (patch)
tree5e6882149dcd2386d3a6e74fb55b48531a40f3ea
parente8ba34c557b242c061049c8fb10754da2a9e7586 (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)
-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 319e896f1e3d..0775d381843f 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -915,7 +915,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 )