sw/qa/extras/uiwriter/uiwriter9.cxx | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
New commits: commit 7dddb827c921fc2b5cdca899c66417cda1822db6 Author: Xisco Fauli <[email protected]> AuthorDate: Wed Feb 26 12:24:46 2025 +0100 Commit: Xisco Fauli <[email protected]> CommitDate: Wed Feb 26 14:13:33 2025 +0100 tdf#164949: sw_uiwriter9: Add unittest Change-Id: Ic3132d100307a8aec5789d18b3e3403faf666898 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182219 Tested-by: Jenkins Reviewed-by: Xisco Fauli <[email protected]> diff --git a/sw/qa/extras/uiwriter/uiwriter9.cxx b/sw/qa/extras/uiwriter/uiwriter9.cxx index 521f2a188f11..daf0402ba1cf 100644 --- a/sw/qa/extras/uiwriter/uiwriter9.cxx +++ b/sw/qa/extras/uiwriter/uiwriter9.cxx @@ -751,6 +751,23 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest9, testTdf160898) pWrtShell->SelAll(); } +CPPUNIT_TEST_FIXTURE(SwUiWriterTest9, testTdf164949) +{ + createSwDoc(); + SwWrtShell* pWrtShell = getSwDocShell()->GetWrtShell(); + + SwInsertTableOptions aTableOptions(SwInsertTableFlags::DefaultBorder, 0); + pWrtShell->InsertTable(aTableOptions, /*nRows=*/2, /*nCols=*/2); + pWrtShell->MoveTable(GotoPrevTable, fnTableStart); + + dispatchCommand(mxComponent, u".uno:SelectTable"_ustr, {}); + + uno::Sequence aArgs{ comphelper::makePropertyValue(u"PersistentCopy"_ustr, uno::Any(false)) }; + + // Without the fix in place, this test would have crashed here + dispatchCommand(mxComponent, u".uno:FormatPaintbrush"_ustr, aArgs); +} + CPPUNIT_TEST_FIXTURE(SwUiWriterTest9, testParagraphStyleCloneFormatting) { createSwDoc();
