summaryrefslogtreecommitdiff
path: root/sw/qa/extras
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2017-08-16 17:19:05 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2017-08-23 11:50:23 +0200
commit0d644aeba1580865173840f6b41e6f2f0ac5ccf0 (patch)
tree8f73b66ee781e5383426d7b5522089d0ee79204a /sw/qa/extras
parentd67b100f44f7c320af713355dc6022451347447d (diff)
i#95698 sw: fix crash on splitting in-table section containing a nested table
Found by crashtesting, ooo95698-1.odt crashed sw layout on load. The intended use-case is splitting section frames inside a table frame, so can just blacklist the non-interesting table-in-section-in-table case that causes the problem here. Reviewed-on: https://gerrit.libreoffice.org/41224 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 802477ae75b39194442d9c01a1342d068c7b9300) Conflicts: sw/qa/extras/uiwriter/uiwriter.cxx Change-Id: Ic47cd8c46cc71f7eaa36b03ec2c4a5df8ca8051c
Diffstat (limited to 'sw/qa/extras')
-rw-r--r--sw/qa/extras/uiwriter/data/i95698.odtbin0 -> 10770 bytes
-rw-r--r--sw/qa/extras/uiwriter/uiwriter.cxx10
2 files changed, 10 insertions, 0 deletions
diff --git a/sw/qa/extras/uiwriter/data/i95698.odt b/sw/qa/extras/uiwriter/data/i95698.odt
new file mode 100644
index 000000000000..9fe3ec207648
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/i95698.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index fd9031de8516..7d5bb5982431 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -205,6 +205,7 @@ public:
void testTdf108524();
void testTableInSection();
void testTableInNestedSection();
+ void testTableInSectionInTable();
void testLinesInSectionInTable();
void testLinesMoveBackwardsInSectionInTable();
@@ -316,6 +317,7 @@ public:
CPPUNIT_TEST(testTableInSection);
CPPUNIT_TEST(testTableInNestedSection);
CPPUNIT_TEST(testLinesInSectionInTable);
+ CPPUNIT_TEST(testTableInSectionInTable);
CPPUNIT_TEST(testLinesMoveBackwardsInSectionInTable);
CPPUNIT_TEST_SUITE_END();
@@ -3846,6 +3848,14 @@ void SwUiWriterTest::testTableInNestedSection()
assertXPath(pXmlDoc, "//page[2]//section/tab", 1);
}
+void SwUiWriterTest::testTableInSectionInTable()
+{
+ // The document has a table, containing a section, containing a nested
+ // table.
+ // This crashed the layout.
+ createDoc("i95698.odt");
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(SwUiWriterTest);
CPPUNIT_PLUGIN_IMPLEMENT();