diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2020-06-15 11:35:12 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2020-06-15 15:21:39 +0200 |
commit | 362c883985dbdd17e138d20c97c650ea3246f882 (patch) | |
tree | 6ec82a353ae773e44bde3979281fbb46c1faeae7 /sw/qa | |
parent | 9b5805d1ef2b9e9c4e8f389c069807bf4489ea95 (diff) |
tdf#132321: sw: Add unittest
Change-Id: I4ab443d08aee8d672d5bab7340aad0d358e0f717
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96320
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sw/qa')
-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"); |