From b891226dcee036fd8aad8320c7007b75b10b23c5 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 26 Feb 2019 19:12:38 +0100 Subject: [PATCH] tdf#122892 sw: fix disappearing rows after table split After fixing the infinite loop, the content of the merged table cell with rowspan 3 is invisible, because its SwCellFrame and the SwRowFrame containing it both have a height of 0. This is due to funny code in SwTabFrame::Split(), which checks the bRet flag before setting it to its final value, thus skipping the lcl_AdjustRowSpanCells() call. Change-Id: I96f9e9efdd5cae3a61da07995b8c31042fc59125 Reviewed-on: https://gerrit.libreoffice.org/68403 Tested-by: Jenkins Reviewed-by: Michael Stahl --- sw/source/core/layout/tabfrm.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx index b662513534e3..c5f0d11d8024 100644 --- a/sw/source/core/layout/tabfrm.cxx +++ b/sw/source/core/layout/tabfrm.cxx @@ -1290,16 +1290,16 @@ bool SwTabFrame::Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowK // recalculate the split line bRet = lcl_RecalcSplitLine( *pLastRow, *pFollowRow, nRemainingSpaceForLastRow, nShrink ); + // RecalcSplitLine did not work. In this case we conceal the split error: + if (!bRet && !bSplitRowAllowed) + { + bRet = true; + } + // NEW TABLES // check if each cell in the row span line has a good height if ( bRet && pFollowRow->IsRowSpanLine() ) lcl_AdjustRowSpanCells( pFollowRow ); - - // We The RowSplitLine stuff did not work. In this case we conceal the split error: - if ( !bRet && !bSplitRowAllowed ) - { - bRet = true; - } } return bRet; -- 2.11.4.GIT