diff options
-rw-r--r-- | sw/qa/extras/uiwriter/data3/tdf132321.odt | bin | 0 -> 9045 bytes | |||
-rw-r--r-- | sw/qa/extras/uiwriter/uiwriter3.cxx | 22 |
2 files changed, 22 insertions, 0 deletions
diff --git a/sw/qa/extras/uiwriter/data3/tdf132321.odt b/sw/qa/extras/uiwriter/data3/tdf132321.odt Binary files differnew file mode 100644 index 000000000000..1b725c072d43 --- /dev/null +++ b/sw/qa/extras/uiwriter/data3/tdf132321.odt diff --git a/sw/qa/extras/uiwriter/uiwriter3.cxx b/sw/qa/extras/uiwriter/uiwriter3.cxx index 33d4f72ca5c0..9a0923b35abc 100644 --- a/sw/qa/extras/uiwriter/uiwriter3.cxx +++ b/sw/qa/extras/uiwriter/uiwriter3.cxx @@ -55,6 +55,28 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf129382) CPPUNIT_ASSERT_EQUAL(8, getShapes()); } +CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf132321) +{ + load(DATA_DIRECTORY, "tdf132321.odt"); + + SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get()); + CPPUNIT_ASSERT(pTextDoc); + + CPPUNIT_ASSERT_EQUAL(1, getShapes()); + + dispatchCommand(mxComponent, ".uno:GoToEndOfPage", {}); + Scheduler::ProcessEventsToIdle(); + dispatchCommand(mxComponent, ".uno:SwBackspace", {}); + Scheduler::ProcessEventsToIdle(); + + // Without the fix in place, the button form would have also been deleted + CPPUNIT_ASSERT_EQUAL(1, getShapes()); + + dispatchCommand(mxComponent, ".uno:Undo", {}); + Scheduler::ProcessEventsToIdle(); + CPPUNIT_ASSERT_EQUAL(1, getShapes()); +} + CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf126626) { load(DATA_DIRECTORY, "tdf126626.docx"); |