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 <xiscofauli@libreoffice.org>
This commit is contained in:
Xisco Fauli
2025-02-26 14:13:33 +01:00
parent 2d8f6291a6
commit 7dddb827c9
+17
View File
@@ -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();