[Libreoffice-commits] core.git: sw/qa
Xisco Fauli (via logerrit)
logerrit at kemper.freedesktop.org
Fri Jun 12 15:08:22 UTC 2020
sw/qa/extras/uiwriter/data3/tdf132744.odt |binary
sw/qa/extras/uiwriter/uiwriter3.cxx | 24 ++++++++++++++++++++++++
2 files changed, 24 insertions(+)
New commits:
commit a7b12e23bf9ac8e394405a1de5835e18e40c27c2
Author: Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Fri Jun 12 13:52:56 2020 +0200
Commit: Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Fri Jun 12 17:07:46 2020 +0200
tdf#132744: sw: Add unittest
Change-Id: Ic6c3b5558e33064bc1a7d8ed2b3ea285afab6a87
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96200
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>
diff --git a/sw/qa/extras/uiwriter/data3/tdf132744.odt b/sw/qa/extras/uiwriter/data3/tdf132744.odt
new file mode 100644
index 000000000000..5681787d7f61
Binary files /dev/null and b/sw/qa/extras/uiwriter/data3/tdf132744.odt differ
diff --git a/sw/qa/extras/uiwriter/uiwriter3.cxx b/sw/qa/extras/uiwriter/uiwriter3.cxx
index 003cfda6c0d8..b47a7834ce7a 100644
--- a/sw/qa/extras/uiwriter/uiwriter3.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter3.cxx
@@ -558,6 +558,30 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf132420)
CPPUNIT_ASSERT_EQUAL(12, getShapes());
}
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf132744)
+{
+ load(DATA_DIRECTORY, "tdf132744.odt");
+
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ CPPUNIT_ASSERT(pTextDoc);
+
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ Scheduler::ProcessEventsToIdle();
+
+ dispatchCommand(mxComponent, ".uno:Cut", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(0, getShapes());
+
+ dispatchCommand(mxComponent, ".uno:Paste", {});
+ Scheduler::ProcessEventsToIdle();
+
+ //Without the fix in place, the image wouldn't be pasted
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+}
+
CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf80663)
{
mxComponent = loadFromDesktop("private:factory/swriter", "com.sun.star.text.TextDocument");
More information about the Libreoffice-commits
mailing list