diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2020-06-12 13:52:56 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2020-06-12 17:07:46 +0200 |
commit | a7b12e23bf9ac8e394405a1de5835e18e40c27c2 (patch) | |
tree | 5ef074cc4be998aedb80219d1d366d93de1cd7cf /sw/qa | |
parent | 6c3cd255cece1ed137ed3a143028fdd636e5c3e6 (diff) |
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@libreoffice.org>
Diffstat (limited to 'sw/qa')
-rw-r--r-- | sw/qa/extras/uiwriter/data3/tdf132744.odt | bin | 0 -> 465501 bytes | |||
-rw-r--r-- | sw/qa/extras/uiwriter/uiwriter3.cxx | 24 |
2 files changed, 24 insertions, 0 deletions
diff --git a/sw/qa/extras/uiwriter/data3/tdf132744.odt b/sw/qa/extras/uiwriter/data3/tdf132744.odt Binary files differnew file mode 100644 index 000000000000..5681787d7f61 --- /dev/null +++ b/sw/qa/extras/uiwriter/data3/tdf132744.odt 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"); |