sw/qa/core/docnode/data/tdf156267.docx |binary sw/qa/core/docnode/docnode.cxx | 15 +++++++++++++++ 2 files changed, 15 insertions(+)
New commits: commit 242bf93ae380d470e9fe34f8badf261ad203728b Author: OmkarAcharekar <omkarachareka...@gmail.com> AuthorDate: Thu Oct 12 01:50:26 2023 +0530 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Mon Oct 23 13:12:34 2023 +0200 tdf#156267: sw_docnode: Add test for remove DdeBookmarks in SwDoc::DelTable() Change-Id: I564fc701bf459e5591f65fad3c147d726b6881ac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157850 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/sw/qa/core/docnode/data/tdf156267.docx b/sw/qa/core/docnode/data/tdf156267.docx new file mode 100755 index 000000000000..f782ed0c95c2 Binary files /dev/null and b/sw/qa/core/docnode/data/tdf156267.docx differ diff --git a/sw/qa/core/docnode/docnode.cxx b/sw/qa/core/docnode/docnode.cxx index 0282414f2116..9521c67b8ef7 100644 --- a/sw/qa/core/docnode/docnode.cxx +++ b/sw/qa/core/docnode/docnode.cxx @@ -51,6 +51,21 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf150086) CPPUNIT_ASSERT_EQUAL(OUString("Content\n"), rTable[6]->GetText()); } +CPPUNIT_TEST_FIXTURE(Test, testTdf156267) +{ + createSwDoc("tdf156267.docx"); + CPPUNIT_ASSERT_EQUAL(1, getPages()); + + dispatchCommand(mxComponent, ".uno:SelectAll", {}); + dispatchCommand(mxComponent, ".uno:Copy", {}); + dispatchCommand(mxComponent, ".uno:Paste", {}); + + // Without the fix in place, it would have crashed here + dispatchCommand(mxComponent, ".uno:Undo", {}); + + CPPUNIT_ASSERT_EQUAL(1, getPages()); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */