summaryrefslogtreecommitdiffstats
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.cxx13
1 files changed, 13 insertions, 0 deletions
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index f646347a4b30..d536d1e92f65 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -202,6 +202,7 @@ public:
void testParagraphOfTextRange();
void testTdf108524();
void testTableInSection();
+ void testTableInNestedSection();
void testLinesInSectionInTable();
CPPUNIT_TEST_SUITE(SwUiWriterTest);
@@ -308,6 +309,7 @@ public:
CPPUNIT_TEST(testTdf108524);
CPPUNIT_TEST(testTdf108524);
CPPUNIT_TEST(testTableInSection);
+ CPPUNIT_TEST(testTableInNestedSection);
CPPUNIT_TEST(testLinesInSectionInTable);
CPPUNIT_TEST_SUITE_END();
@@ -3776,6 +3778,17 @@ void SwUiWriterTest::testTableInSection()
assertXPath(pXmlDoc, "/root/page[2]/body/section/tab/row/cell", 2);
}
+void SwUiWriterTest::testTableInNestedSection()
+{
+ // The document has a nested section, containing a table that spans over 2 pages.
+ // This crashed the layout.
+ createDoc("rhbz739252-3.odt");
+ xmlDocPtr pXmlDoc = parseLayoutDump();
+ // Make sure the table is inside a section and spans over 2 pages.
+ assertXPath(pXmlDoc, "//page[1]//section/tab", 1);
+ assertXPath(pXmlDoc, "//page[2]//section/tab", 1);
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(SwUiWriterTest);
CPPUNIT_PLUGIN_IMPLEMENT();