Kaydet (Commit) 82d9af7f authored tarafından Mike Kaganski's avatar Mike Kaganski

tdf#108482: ignore repeated headlines' previous instances height

Change-Id: Idae0b99c4171556612fb41bb02f1c48bbfeec4b2
Reviewed-on: https://gerrit.libreoffice.org/51073Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMike Kaganski <mike.kaganski@collabora.com>
üst f9831de3
......@@ -887,5 +887,20 @@ DECLARE_ODFIMPORT_TEST(testTdf115079, "tdf115079.odt")
// This document caused segfault when layouting
}
DECLARE_ODFIMPORT_TEST(testTdf108482, "tdf108482.odt")
{
CPPUNIT_ASSERT_EQUAL_MESSAGE("The table on second page must have two rows",
OUString("2"), parseDump("count(/root/page[2]/body/tab/row)")
);
CPPUNIT_ASSERT_EQUAL_MESSAGE("The second page table's first row must be the repeated headline",
OUString("Header"), parseDump("/root/page[2]/body/tab/row[1]/cell/txt")
);
// The first (repeated headline) row with vertical text orientation must have non-zero height
// (in my tests, it was 1135)
CPPUNIT_ASSERT_GREATER(
sal_Int32(1000), parseDump("/root/page[2]/body/tab/row[1]/infos/bounds", "height").toInt32()
);
}
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -4101,6 +4101,9 @@ static sal_uInt16 lcl_GetBottomLineDist( const SwRowFrame& rRow )
// on each following page
static SwTwips lcl_calcHeightOfRowBeforeThisFrame(const SwRowFrame& rRow)
{
// We don't need to account for previous instances of repeated headlines
if (rRow.IsRepeatedHeadline())
return 0;
SwRectFnSet aRectFnSet(&rRow);
const SwTableLine* pLine = rRow.GetTabLine();
const SwTabFrame* pTab = rRow.FindTabFrame();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment