diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2017-11-14 12:32:41 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2017-11-14 16:41:10 +0100 |
commit | e128d83b5e7fd2ceb8d5ec9a346a3b7351be79cc (patch) | |
tree | 2fbbf428aa042323bbaf3a3d61c795ccab07a8ec /sw/qa/extras | |
parent | dee307cbc903caa6ec7141fb4d69949133963af3 (diff) |
tdf#113790: skip charfmt grabbag items existing in autofmt grabbag
Change-Id: Icc0065c1da9471cb36bfef0da45e2f67381a1a31
Reviewed-on: https://gerrit.libreoffice.org/44706
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sw/qa/extras')
-rw-r--r-- | sw/qa/extras/uiwriter/data/tdf113790.docx | bin | 0 -> 5155 bytes | |||
-rw-r--r-- | sw/qa/extras/uiwriter/uiwriter.cxx | 25 |
2 files changed, 25 insertions, 0 deletions
diff --git a/sw/qa/extras/uiwriter/data/tdf113790.docx b/sw/qa/extras/uiwriter/data/tdf113790.docx Binary files differnew file mode 100644 index 000000000000..b6334aae7617 --- /dev/null +++ b/sw/qa/extras/uiwriter/data/tdf113790.docx diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx index 34f0e21466d1..7b09d0a35cab 100644 --- a/sw/qa/extras/uiwriter/uiwriter.cxx +++ b/sw/qa/extras/uiwriter/uiwriter.cxx @@ -285,6 +285,7 @@ public: void testTdf99689TableOfContents(); void testTdf99689TableOfFigures(); void testTdf99689TableOfTables(); + void testTdf113790(); CPPUNIT_TEST_SUITE(SwUiWriterTest); CPPUNIT_TEST(testReplaceForward); @@ -452,6 +453,7 @@ public: CPPUNIT_TEST(testTdf99689TableOfContents); CPPUNIT_TEST(testTdf99689TableOfFigures); CPPUNIT_TEST(testTdf99689TableOfTables); + CPPUNIT_TEST(testTdf113790); CPPUNIT_TEST_SUITE_END(); private: @@ -5553,6 +5555,29 @@ void SwUiWriterTest::testParagraphOfTextRange() CPPUNIT_ASSERT_EQUAL(OUString("In section"), xParagraph->getString()); } +void SwUiWriterTest::testTdf113790() +{ + SwDoc* pDoc = createDoc("tdf113790.docx"); + SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); + // Create the clipboard document. + SwDoc aClipboard; + aClipboard.SetClipBoard(true); + + // Go to fourth line - to "ABCD" bulleted list item + pWrtShell->Down(/*bSelect=*/false, 4); + pWrtShell->SelPara(nullptr); + CPPUNIT_ASSERT_EQUAL(OUString("ABCD"), pWrtShell->GetSelText()); + pWrtShell->Copy(&aClipboard); + + // Go down to next-to-last (empty) line above "Title3" + pWrtShell->Down(/*bSelect=*/false, 4); + pWrtShell->Paste(&aClipboard); + + // Save it as DOCX & load it again + reload("Office Open XML Text", "tdf113790.docx"); + CPPUNIT_ASSERT(dynamic_cast<SwXTextDocument *>(mxComponent.get())); +} + CPPUNIT_TEST_SUITE_REGISTRATION(SwUiWriterTest); CPPUNIT_PLUGIN_IMPLEMENT(); |