sw/qa/extras/uiwriter/uiwriter3.cxx | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
New commits: commit ebd7cc1848ba2010128d09c5db524af2c6f5aa66 Author: Xisco Fauli <[email protected]> AuthorDate: Fri Sep 16 10:59:07 2022 +0200 Commit: Xisco Fauli <[email protected]> CommitDate: Fri Sep 16 13:42:52 2022 +0200 tdf#150845: sw_uiwriter3: Add unittest Change-Id: I9d39964218cae2fade7ef04badb57b8086cc3a9f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140060 Tested-by: Jenkins Reviewed-by: Xisco Fauli <[email protected]> diff --git a/sw/qa/extras/uiwriter/uiwriter3.cxx b/sw/qa/extras/uiwriter/uiwriter3.cxx index ab028d9da5ce..213cd9a6c128 100644 --- a/sw/qa/extras/uiwriter/uiwriter3.cxx +++ b/sw/qa/extras/uiwriter/uiwriter3.cxx @@ -948,6 +948,20 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf139737) Scheduler::ProcessEventsToIdle(); } +CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf150845) +{ + createSwDoc(); + + // Insert text box with ctrl key + // Without the fix in place, this test would have crashed here + uno::Sequence<beans::PropertyValue> aArgs( + comphelper::InitPropertySequence({ { "KeyModifier", uno::Any(KEY_MOD1) } })); + dispatchCommand(mxComponent, ".uno:Edit", aArgs); + Scheduler::ProcessEventsToIdle(); + + CPPUNIT_ASSERT_EQUAL(1, getShapes()); +} + CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf147961) { SwDoc* pDoc = createSwDoc();
