[Libreoffice-commits] core.git: sw/qa
Xisco Fauli (via logerrit)
logerrit at kemper.freedesktop.org
Mon Jun 15 13:22:11 UTC 2020
sw/qa/extras/uiwriter/data3/tdf132321.odt |binary
sw/qa/extras/uiwriter/uiwriter3.cxx | 22 ++++++++++++++++++++++
2 files changed, 22 insertions(+)
New commits:
commit 362c883985dbdd17e138d20c97c650ea3246f882
Author: Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Mon Jun 15 11:35:12 2020 +0200
Commit: Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Mon Jun 15 15:21:39 2020 +0200
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 at libreoffice.org>
diff --git a/sw/qa/extras/uiwriter/data3/tdf132321.odt b/sw/qa/extras/uiwriter/data3/tdf132321.odt
new file mode 100644
index 000000000000..1b725c072d43
Binary files /dev/null and b/sw/qa/extras/uiwriter/data3/tdf132321.odt differ
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");
More information about the Libreoffice-commits
mailing list