diff options
Diffstat (limited to 'sw/qa')
-rw-r--r-- | sw/qa/extras/uiwriter/data/tdf104032.odt | bin | 0 -> 8967 bytes | |||
-rw-r--r-- | sw/qa/extras/uiwriter/uiwriter.cxx | 19 |
2 files changed, 19 insertions, 0 deletions
diff --git a/sw/qa/extras/uiwriter/data/tdf104032.odt b/sw/qa/extras/uiwriter/data/tdf104032.odt Binary files differnew file mode 100644 index 000000000000..535e8cec7cf1 --- /dev/null +++ b/sw/qa/extras/uiwriter/data/tdf104032.odt diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx index 46fd478f5fe8..c3ca4ee7717d 100644 --- a/sw/qa/extras/uiwriter/uiwriter.cxx +++ b/sw/qa/extras/uiwriter/uiwriter.cxx @@ -215,6 +215,7 @@ public: void testCursorWindows(); void testLandscape(); void testTdf95699(); + void testTdf104032(); CPPUNIT_TEST_SUITE(SwUiWriterTest); CPPUNIT_TEST(testReplaceForward); @@ -326,6 +327,7 @@ public: CPPUNIT_TEST(testCursorWindows); CPPUNIT_TEST(testLandscape); CPPUNIT_TEST(testTdf95699); + CPPUNIT_TEST(testTdf104032); CPPUNIT_TEST_SUITE_END(); private: @@ -4067,6 +4069,23 @@ void SwUiWriterTest::testTdf95699() CPPUNIT_ASSERT_EQUAL(OUString("vnd.oasis.opendocument.field.FORMCHECKBOX"), pFieldMark->GetFieldname()); } +void SwUiWriterTest::testTdf104032() +{ + // Open the document with FORMCHECKBOX field, select it and copy to clipboard + // Go to end of document and paste it, then undo + // Previously that asserted in debug build. + SwDoc* pDoc = createDoc("tdf104032.odt"); + sw::UndoManager& rUndoManager = pDoc->GetUndoManager(); + SwDoc aClipboard; + SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); + pWrtShell->SttDoc(); + pWrtShell->Right(CRSR_SKIP_CHARS, /*bSelect=*/true, 1, /*bBasicCall=*/false); + pWrtShell->Copy(&aClipboard); + pWrtShell->EndDoc(); + pWrtShell->Paste(&aClipboard); + rUndoManager.Undo(); +} + CPPUNIT_TEST_SUITE_REGISTRATION(SwUiWriterTest); CPPUNIT_PLUGIN_IMPLEMENT(); |