Kaydet (Commit) 2de1fd7d authored tarafından László Németh's avatar László Németh

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 7a810d6a
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: 's avatarLászló Németh <nemeth@numbertext.org>
üst e5f23ede
......@@ -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")
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment