sw/qa/core/layout/data/tdf157096.docx |binary sw/qa/core/layout/layact.cxx | 13 +++++++++++++ 2 files changed, 13 insertions(+)
New commits: commit ae9c207675f1144fdea8f628f370375768f1eb00 Author: OmkarAcharekar <omkarachareka...@gmail.com> AuthorDate: Wed Oct 25 22:21:13 2023 +0530 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Fri Oct 27 12:56:20 2023 +0200 tdf#157096: sw_layout: Add test for CRASH removing everything in document Change-Id: I07fde27e71f112019532c57d90f46568af45fad9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158458 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/sw/qa/core/layout/data/tdf157096.docx b/sw/qa/core/layout/data/tdf157096.docx new file mode 100644 index 000000000000..bca591e8ad83 Binary files /dev/null and b/sw/qa/core/layout/data/tdf157096.docx differ diff --git a/sw/qa/core/layout/layact.cxx b/sw/qa/core/layout/layact.cxx index 64262977f7fe..d432ae52b7c5 100644 --- a/sw/qa/core/layout/layact.cxx +++ b/sw/qa/core/layout/layact.cxx @@ -73,6 +73,19 @@ CPPUNIT_TEST_FIXTURE(Test, testSplitFlyNextRowInvalidatePos) // i.e. row 2 has to be shifted down to 7390, but this didn't happen. CPPUNIT_ASSERT_GREATER(nOldRow2Top, nNewRow2Top); } + +CPPUNIT_TEST_FIXTURE(Test, testTdf157096) +{ + createSwDoc("tdf157096.docx"); + + CPPUNIT_ASSERT_EQUAL(2, getPages()); + dispatchCommand(mxComponent, ".uno:SelectAll", {}); + + // Without the fix in place, it would have crashed here + dispatchCommand(mxComponent, ".uno:Delete", {}); + + CPPUNIT_ASSERT_EQUAL(1, getPages()); +} } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */