[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-1+backports' - sw/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Wed Mar 13 15:57:14 UTC 2019
sw/source/core/layout/tabfrm.cxx | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
New commits:
commit 2fd9ae9bc476d4bb48ace351a12b7e839fad8c78
Author: Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Mon Mar 11 15:43:31 2019 +0100
Commit: Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Wed Mar 13 16:56:49 2019 +0100
tdf#119253 sw: fix layout loop with row-span table
This table has style:row-height="2.014cm" on its 2nd row (1142 twips).
In the 1st call of FormatLayoutTab(), the 1st row of the table is split
and the 2nd row moves to the next page.
In the 2nd call of FormatLayoutTab(), the 1st row grows from 400 to 454
twips, presumably due to the style:min-row-height="0.801cm" on it.
In the 3rd call of FormatLayoutTab(), the GetFollow()->ShouldBwdMoved()
returns true and the 2nd row moves back again, because
SwTabFrame::CalcHeightOfFirstContentLine() determines the height of the
2nd row as the maximum height of cells with rowspan=1 (400 twips), which
fits on the 1st page, ignoring the style:row-height="2.014cm" on the row
(1142 twips), which does not fit on the 1st page.
This loops until "LoopControl_1 in SwLayAction::InternalAction" is
triggered, and then eventually stops in 5.4 but loops even more since
commit 18765b9fa739337d2d891513f6e2fb7c3ce23b50, for unknown reasons.
Change-Id: I1a5c50d21c241e593419e63644ee758cdd9ed319
Reviewed-on: https://gerrit.libreoffice.org/69061
Tested-by: Jenkins
Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>
(cherry picked from commit 00a86e8be983f7a92723dfe6cf5986974d77644e)
Reviewed-on: https://gerrit.libreoffice.org/69085
Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
(cherry picked from commit ab9d3c535800e972d893ebc6415d0f616a89316b)
Reviewed-on: https://gerrit.libreoffice.org/69189
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index b8d66ec2ef92..e1aea42d8bf9 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -5592,11 +5592,15 @@ SwTwips SwTabFrame::CalcHeightOfFirstContentLine() const
// just return the height of the first line. Basically we need to get the height of the
// line as it would be on the last page. Since this is quite complicated to calculate,
// we only calculate the height of the first line.
+ SwFormatFrameSize const& rFrameSize(pFirstRow->GetAttrSet()->GetFrameSize());
if ( pFirstRow->GetPrev() &&
- static_cast<const SwRowFrame*>(pFirstRow->GetPrev())->IsRowSpanLine() )
+ static_cast<const SwRowFrame*>(pFirstRow->GetPrev())->IsRowSpanLine()
+ && rFrameSize.GetHeightSizeType() != ATT_FIX_SIZE)
{
// Calculate maximum height of all cells with rowspan = 1:
- SwTwips nMaxHeight = 0;
+ SwTwips nMaxHeight = rFrameSize.GetHeightSizeType() == ATT_MIN_SIZE
+ ? rFrameSize.GetHeight()
+ : 0;
const SwCellFrame* pLower2 = static_cast<const SwCellFrame*>(pFirstRow->Lower());
while ( pLower2 )
{
More information about the Libreoffice-commits
mailing list