summaryrefslogtreecommitdiffstats
path: root/sw/qa/extras/uiwriter/uiwriter.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2017-10-03 17:44:01 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2017-10-06 16:16:54 +0200
commitf60b65a808d77f4eac813fd8dd3e4688b6372e20 (patch)
tree1f48172a979b63395a1571e4c665a01e05bf7084 /sw/qa/extras/uiwriter/uiwriter.cxx
parenttdf#112741 sw split sections inside table cells: fix table re-layout (diff)
downloadcore-f60b65a808d77f4eac813fd8dd3e4688b6372e20.tar.gz
core-f60b65a808d77f4eac813fd8dd3e4688b6372e20.zip
tdf#112860 sw: avoid shortcut for tables in SwFrame::GetNextSctLeaf()
As the comment says the shortcut only works if no columns or pages are between the section frames, while for tables there are definitely table, row and column frames. This resulted later in SwFrame::IsFootnoteAllowed() a nullptr dereference, as the frame was still marked as in-table, but wasn't in a table anymore. Reviewed-on: https://gerrit.libreoffice.org/43091 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit c985ad5f7b479706935459630c5a59ccae6fa8b7) Conflicts: sw/qa/extras/uiwriter/uiwriter.cxx Change-Id: I4191c77d20c6ccc096156fae15ca7c22cc5b68b6
Diffstat (limited to 'sw/qa/extras/uiwriter/uiwriter.cxx')
-rw-r--r--sw/qa/extras/uiwriter/uiwriter.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index 308cf229ff42..3d4b91ac82ad 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -210,6 +210,7 @@ public:
void testSectionInTableInTable2();
void testTdf112160();
void testTdf112741();
+ void testTdf112860();
void testLinesInSectionInTable();
void testLinesMoveBackwardsInSectionInTable();
@@ -327,6 +328,7 @@ public:
CPPUNIT_TEST(testTdf112160);
CPPUNIT_TEST(testLinesMoveBackwardsInSectionInTable);
CPPUNIT_TEST(testTdf112741);
+ CPPUNIT_TEST(testTdf112860);
CPPUNIT_TEST_SUITE_END();
private:
@@ -3869,6 +3871,14 @@ void SwUiWriterTest::testTdf112741()
assertXPath(pXmlDoc, "//page[4]/body/tab/row/cell/tab/row/cell/section", 1);
}
+void SwUiWriterTest::testTdf112860()
+{
+ // The document has a split section inside a nested table, and also a table
+ // in the footer.
+ // This crashed the layout.
+ createDoc("tdf112860.fodt");
+}
+
void SwUiWriterTest::testTableInSectionInTable()
{
// The document has a table, containing a section, containing a nested