summaryrefslogtreecommitdiff
path: root/sw/qa/extras/uiwriter/uiwriter.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/qa/extras/uiwriter/uiwriter.cxx')
-rw-r--r--sw/qa/extras/uiwriter/uiwriter.cxx18
1 files changed, 18 insertions, 0 deletions
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index 7ba2fef47f27..8a856d822e20 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -204,6 +204,7 @@ public:
void testParagraphOfTextRange();
void testTdf108524();
void testTableInSection();
+ void testLinesInSectionInTable();
CPPUNIT_TEST_SUITE(SwUiWriterTest);
CPPUNIT_TEST(testReplaceForward);
@@ -311,6 +312,7 @@ public:
CPPUNIT_TEST(testTdf108524);
CPPUNIT_TEST(testTdf108524);
CPPUNIT_TEST(testTableInSection);
+ CPPUNIT_TEST(testLinesInSectionInTable);
CPPUNIT_TEST_SUITE_END();
private:
@@ -3771,6 +3773,22 @@ void SwUiWriterTest::testTdf108524()
assertXPath(pXmlDoc, "/root/page[2]/body/tab/row/cell/section", 1);
}
+void SwUiWriterTest::testLinesInSectionInTable()
+{
+ // This is similar to testTdf108524(), but the page boundary now is not in
+ // the middle of a multi-line paragraph: the section only contains oneliner
+ // paragraphs instead.
+ createDoc("lines-in-section-in-table.odt");
+ xmlDocPtr pXmlDoc = parseLayoutDump();
+ // In total we expect two cells containing a section.
+ assertXPath(pXmlDoc, "/root/page/body/tab/row/cell/section", 2);
+
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab/row/cell/section", 1);
+ // This was 0, section wasn't split, instead it was only on the first page
+ // and it was cut off.
+ assertXPath(pXmlDoc, "/root/page[2]/body/tab/row/cell/section", 1);
+}
+
void SwUiWriterTest::testTableInSection()
{
// The document has a section, containing a table that spans over 2 pages.