From b7b5c23e6979205a662d857bc1c83270fb4a43ec Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 20 Dec 2016 15:57:43 +0200 Subject: tdf#104814 Writer: accepting change tracking changes get stuck Change-Id: Ie8e0919b53c0b21f480b62eec7c394554757a061 Reviewed-on: https://gerrit.libreoffice.org/32273 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sw/qa/extras/uiwriter/data/tdf104814.docx | Bin 0 -> 12830 bytes sw/qa/extras/uiwriter/uiwriter.cxx | 14 ++++++++++++++ sw/source/core/doc/DocumentRedlineManager.cxx | 4 ++++ 3 files changed, 18 insertions(+) create mode 100644 sw/qa/extras/uiwriter/data/tdf104814.docx (limited to 'sw') diff --git a/sw/qa/extras/uiwriter/data/tdf104814.docx b/sw/qa/extras/uiwriter/data/tdf104814.docx new file mode 100644 index 000000000000..1f1c524a8914 Binary files /dev/null and b/sw/qa/extras/uiwriter/data/tdf104814.docx differ diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx index 3cd5e952ffb2..9db3dc1c85b3 100644 --- a/sw/qa/extras/uiwriter/uiwriter.cxx +++ b/sw/qa/extras/uiwriter/uiwriter.cxx @@ -219,6 +219,7 @@ public: void testTdf104032(); void testTdf104440(); void testTdf104425(); + void testTdf104814(); CPPUNIT_TEST_SUITE(SwUiWriterTest); CPPUNIT_TEST(testReplaceForward); @@ -334,6 +335,7 @@ public: CPPUNIT_TEST(testTdf104032); CPPUNIT_TEST(testTdf104440); CPPUNIT_TEST(testTdf104425); + CPPUNIT_TEST(testTdf104814); CPPUNIT_TEST_SUITE_END(); private: @@ -4145,6 +4147,18 @@ void SwUiWriterTest::testTdf104425() CPPUNIT_ASSERT_DOUBLES_EQUAL(700.0, fSumHeight_mm, 0.05); } +// accepting change tracking gets stuck on change +void SwUiWriterTest::testTdf104814() +{ + SwDoc* const pDoc1(createDoc("tdf104814.docx")); + + SwEditShell* const pEditShell(pDoc1->GetEditShell()); + + // accept all redlines + while(pEditShell->GetRedlineCount()) + pEditShell->AcceptRedline(0); +} + CPPUNIT_TEST_SUITE_REGISTRATION(SwUiWriterTest); CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/sw/source/core/doc/DocumentRedlineManager.cxx b/sw/source/core/doc/DocumentRedlineManager.cxx index 38a4c77e08bd..6db6b797dc35 100644 --- a/sw/source/core/doc/DocumentRedlineManager.cxx +++ b/sw/source/core/doc/DocumentRedlineManager.cxx @@ -274,6 +274,10 @@ namespace rArr.DeleteAndDestroy( rPos-- ); break; + case nsRedlineType_t::REDLINE_PARAGRAPH_FORMAT: + rArr.DeleteAndDestroy( rPos-- ); + break; + default: bRet = false; } -- cgit