summaryrefslogtreecommitdiff
path: root/sw/qa
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2017-07-03 13:53:28 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2017-07-03 16:33:22 +0200
commitb5e0a143308e976b4165ff6181f4dccc3db0bd31 (patch)
tree70166c62b37ae5324d652a84bdb72d06e34a973b /sw/qa
parente037381f85413fe6329c54e49ccfcac88dd71048 (diff)
tdf#108524 sw: attempt to split section frames inside table cells, take two
Tables-in-sections were already split across multiple pages, but not secions-in-tables. To be safe still don't allow sections-in-tables-in-sections, so you can combine these in both orders now, but not recursively. To achieve this, relax two "not in table" conditions to just require "not in a table that is already in a section", and define that in case a section-in-table is to be split, the follow section frame should be inserted under the follow of its cell. With this, finally the section frame in the bugdoc is split into two, and the second section frame is moved to the second page as expected. This restores commit f991b842addddeada6dc45c4054deeca5aa7f17b, but this second take makes sure that we do not crash while laying out ooo61225-1.sxw. GetNextSctLeaf() used to assume that SwTableFrame::Split() created the follow cell frames; and when that wasn't the case, it crashed. Still don't attempt to create the cell frame in GetNextSctLeaf(), but handle when the cell follow frame is missing, and return early, as it used to be the case before this commit. Change-Id: I9dcc76b4c61b39b9d23b140b84420e89cf274cf3 Reviewed-on: https://gerrit.libreoffice.org/39471 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'sw/qa')
-rw-r--r--sw/qa/extras/uiwriter/uiwriter.cxx6
1 files changed, 0 insertions, 6 deletions
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index becae3b83617..c9b4efda6fad 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -254,9 +254,7 @@ public:
void testMsWordCompTrailingBlanks();
void testCreateDocxAnnotation();
void testTdf107976();
-#if 0
void testTdf108524();
-#endif
void testTableInSection();
CPPUNIT_TEST_SUITE(SwUiWriterTest);
@@ -399,9 +397,7 @@ public:
CPPUNIT_TEST(testMsWordCompTrailingBlanks);
CPPUNIT_TEST(testCreateDocxAnnotation);
CPPUNIT_TEST(testTdf107976);
-#if 0
CPPUNIT_TEST(testTdf108524);
-#endif
CPPUNIT_TEST(testTableInSection);
CPPUNIT_TEST_SUITE_END();
@@ -4953,7 +4949,6 @@ void SwUiWriterTest::testTdf58604()
#endif
}
-#if 0
void SwUiWriterTest::testTdf108524()
{
createDoc("tdf108524.odt");
@@ -4966,7 +4961,6 @@ void SwUiWriterTest::testTdf108524()
// and it was cut off.
assertXPath(pXmlDoc, "/root/page[2]/body/tab/row/cell/section", 1);
}
-#endif
void SwUiWriterTest::testTableInSection()
{