[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - sw/source

Henry Castro (via logerrit) logerrit at kemper.freedesktop.org
Thu May 16 13:26:56 UTC 2019


 sw/source/core/doc/DocumentRedlineManager.cxx |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 2f184d792f5af4a97e4f0c07b0bad19a4c3e9589
Author:     Henry Castro <hcastro at collabora.com>
AuthorDate: Wed Mar 27 14:41:54 2019 -0400
Commit:     Xisco FaulĂ­ <xiscofauli at libreoffice.org>
CommitDate: Thu May 16 15:26:21 2019 +0200

    tdf#120338: The paragraph formatting changes are not undone, part 1
    
    Rejecting paragraph formatting is not implemented yet.
    "Reject All" command is affected because the changes were not removed
    
    Change-Id: Ic4af1def97025643ecbc5cf0752cd06d9b94c74a
    Reviewed-on: https://gerrit.libreoffice.org/69865
    Tested-by: Jenkins
    Reviewed-by: Henry Castro <hcastro at collabora.com>
    (cherry picked from commit c033d8e5a662eec3c1104b70f33cf0795c8c211c)
    Reviewed-on: https://gerrit.libreoffice.org/72404
    Reviewed-by: Xisco FaulĂ­ <xiscofauli at libreoffice.org>

diff --git a/sw/source/core/doc/DocumentRedlineManager.cxx b/sw/source/core/doc/DocumentRedlineManager.cxx
index 66eda4d6a23c..a83e158e27e5 100644
--- a/sw/source/core/doc/DocumentRedlineManager.cxx
+++ b/sw/source/core/doc/DocumentRedlineManager.cxx
@@ -2633,6 +2633,7 @@ bool DocumentRedlineManager::RejectRedline( const SwPaM& rPam, bool bCallDelete
 
 void DocumentRedlineManager::AcceptAllRedline(bool bAccept)
 {
+    bool bSuccess = true;
     OUString sUndoStr;
     IDocumentUndoRedo& rUndoMgr = m_rDoc.GetIDocumentUndoRedo();
 
@@ -2649,12 +2650,12 @@ void DocumentRedlineManager::AcceptAllRedline(bool bAccept)
         rUndoMgr.StartUndo(bAccept ? SwUndoId::ACCEPT_REDLINE : SwUndoId::REJECT_REDLINE, &aRewriter);
     }
 
-    while (!mpRedlineTable->empty())
+    while (!mpRedlineTable->empty() && bSuccess)
     {
         if (bAccept)
-            AcceptRedline(mpRedlineTable->size() - 1, true);
+            bSuccess = AcceptRedline(mpRedlineTable->size() - 1, true);
         else
-            RejectRedline(mpRedlineTable->size() - 1, true);
+            bSuccess = RejectRedline(mpRedlineTable->size() - 1, true);
     }
 
     if (!sUndoStr.isEmpty())


More information about the Libreoffice-commits mailing list