diff options
Diffstat (limited to 'sw/qa/extras/uiwriter/uiwriter.cxx')
-rw-r--r-- | sw/qa/extras/uiwriter/uiwriter.cxx | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx index 3574334acc34..8b1e7c5185ac 100644 --- a/sw/qa/extras/uiwriter/uiwriter.cxx +++ b/sw/qa/extras/uiwriter/uiwriter.cxx @@ -267,6 +267,7 @@ public: void testTableInNestedSection(); void testTableInSectionInTable(); void testSectionInTableInTable(); + void testSectionInTableInTable2(); void testTdf112160(); void testLinesMoveBackwardsInSectionInTable(); #endif @@ -422,6 +423,7 @@ public: CPPUNIT_TEST(testTableInNestedSection); CPPUNIT_TEST(testTableInSectionInTable); CPPUNIT_TEST(testSectionInTableInTable); + CPPUNIT_TEST(testSectionInTableInTable2); CPPUNIT_TEST(testTdf112160); CPPUNIT_TEST(testLinesMoveBackwardsInSectionInTable); #endif @@ -5180,6 +5182,21 @@ void SwUiWriterTest::testSectionInTableInTable() createDoc("tdf112109.fodt"); } +void SwUiWriterTest::testSectionInTableInTable2() +{ + createDoc("split-section-in-nested-table.fodt"); + xmlDocPtr pXmlDoc = parseLayoutDump(); + sal_uInt32 nSection1 = getXPath(pXmlDoc, "//page[1]//body/tab/row/cell/tab/row/cell/section", "id").toUInt32(); + sal_uInt32 nSection1Follow = getXPath(pXmlDoc, "//page[1]//body/tab/row/cell/tab/row/cell/section", "follow").toUInt32(); + // This failed, the section wasn't split inside a nested table. + sal_uInt32 nSection2 = getXPath(pXmlDoc, "//page[2]//body/tab/row/cell/tab/row/cell/section", "id").toUInt32(); + sal_uInt32 nSection2Precede = getXPath(pXmlDoc, "//page[2]//body/tab/row/cell/tab/row/cell/section", "precede").toUInt32(); + + // Make sure that the first's follow and the second's precede is correct. + CPPUNIT_ASSERT_EQUAL(nSection2, nSection1Follow); + CPPUNIT_ASSERT_EQUAL(nSection1, nSection2Precede); +} + void SwUiWriterTest::testTdf112160() { // Assert that the A2 cell is on page 1. |