diff options
author | László Németh <nemeth@numbertext.org> | 2019-05-10 16:36:10 +0200 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2019-05-11 13:09:32 +0200 |
commit | 2de1fd7d8b8bd42c66190140cc4506df0c3367f1 (patch) | |
tree | b68899a5ba69863c9f28ff67e56d045b75a62e64 | |
parent | e5f23ede288b62ad259399a4d36e8d76ce59d1b8 (diff) |
tdf#125187 DOCX track changes: fix w:del within w:ins
by removing deletions within insertions, because
Writer core doesn't support overlapping redlines,
ie. tracked deletion as part of a tracked insertion.
Note: Commit 7a810d6a9fb79a24d00e5dbd8e1223e6f8b09677
handled this by breaking the tracked changes, fixing
"Accept All", but not the "Reject All".
Change-Id: Iad5932d97cd45bdd62c2df21abd4bcc0b4c3d9a1
Reviewed-on: https://gerrit.libreoffice.org/72128
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth@numbertext.org>
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport11.cxx | 5 | ||||
-rw-r--r-- | sw/source/core/doc/DocumentRedlineManager.cxx | 5 |
2 files changed, 5 insertions, 5 deletions
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx index 42677b6de0eb..70b6e79bc04d 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx @@ -936,10 +936,7 @@ DECLARE_OOXMLIMPORT_TEST(testTdf116084, "tdf116084.docx") // tracked line is not a single text portion: w:del is recognized within w:ins CPPUNIT_ASSERT_EQUAL( OUString( "" ), getRun( getParagraph( 1 ), 1 )->getString()); CPPUNIT_ASSERT(hasProperty(getRun(getParagraph(1), 1), "RedlineType")); - CPPUNIT_ASSERT_EQUAL( OUString( "There " ), getRun( getParagraph( 1 ), 2 )->getString()); - CPPUNIT_ASSERT_EQUAL( OUString( "" ), getRun( getParagraph( 1 ), 4 )->getString()); - CPPUNIT_ASSERT(hasProperty(getRun(getParagraph(1), 4), "RedlineType")); - CPPUNIT_ASSERT_EQUAL( OUString( "must" ), getRun( getParagraph( 1 ), 5 )->getString()); + CPPUNIT_ASSERT_EQUAL( OUString( "There should be a better start to this. " ), getRun( getParagraph( 1 ), 2 )->getString()); } DECLARE_OOXMLIMPORT_TEST(testTdf121176, "tdf121176.docx") diff --git a/sw/source/core/doc/DocumentRedlineManager.cxx b/sw/source/core/doc/DocumentRedlineManager.cxx index 47d52d6226c4..3056f8f27d12 100644 --- a/sw/source/core/doc/DocumentRedlineManager.cxx +++ b/sw/source/core/doc/DocumentRedlineManager.cxx @@ -1471,7 +1471,10 @@ DocumentRedlineManager::AppendRedline(SwRangeRedline* pNewRedl, bool const bCall bCompress = true; } if( !bCallDelete && !bDec && *pEnd == *pREnd ) - pRedl->SetEnd( *pStt, pREnd ); + { + m_rDoc.getIDocumentContentOperations().DeleteAndJoin( *pNewRedl ); + bCompress = true; + } else if ( bCallDelete || !bDec ) { // delete new redline, except in some cases of fallthrough from previous |