[Libreoffice-commits] core.git: sw/qa sw/source

László Németh (via logerrit) logerrit at kemper.freedesktop.org
Sat May 11 11:10:28 UTC 2019


 sw/qa/extras/ooxmlexport/ooxmlexport11.cxx    |    5 +----
 sw/source/core/doc/DocumentRedlineManager.cxx |    5 ++++-
 2 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 2de1fd7d8b8bd42c66190140cc4506df0c3367f1
Author:     László Németh <nemeth at numbertext.org>
AuthorDate: Fri May 10 16:36:10 2019 +0200
Commit:     László Németh <nemeth at numbertext.org>
CommitDate: Sat May 11 13:09:32 2019 +0200

    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 at numbertext.org>

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


More information about the Libreoffice-commits mailing list