[Libreoffice-commits] core.git: Branch 'private/mst/sw_redlinehide_4a' - sw/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri Nov 30 15:32:02 UTC 2018


 sw/source/core/txtnode/ndtxt.cxx |   14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

New commits:
commit a6a5197658390b5e702a43ba15f023957445aa56
Author:     Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Fri Nov 30 16:28:04 2018 +0100
Commit:     Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Fri Nov 30 16:28:04 2018 +0100

    sw_redlinehide_4a: MoveDeletedPrevFrames() should only move
    
    ... frames from a layout with hidden redlines.
    
    Change-Id: I8f5d5bbbc5bfd49a8a52579a1c34157b9c5c4515

diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index 8d721140cb37..a979650504e1 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -846,16 +846,22 @@ void MoveDeletedPrevFrames(SwTextNode & rDeletedPrev, SwTextNode & rNode)
     SwIterator<SwTextFrame, SwTextNode, sw::IteratorMode::UnwrapMulti> aIter(rDeletedPrev);
     for (SwTextFrame* pFrame = aIter.First(); pFrame; pFrame = aIter.Next())
     {
-        frames.push_back(pFrame);
+        if (pFrame->getRootFrame()->IsHideRedlines())
+        {
+            frames.push_back(pFrame);
+        }
     }
     {
         auto frames2(frames);
         SwIterator<SwTextFrame, SwTextNode, sw::IteratorMode::UnwrapMulti> aIt(rNode);
         for (SwTextFrame* pFrame = aIt.First(); pFrame; pFrame = aIt.Next())
         {
-            auto const it(std::find(frames2.begin(), frames2.end(), pFrame));
-            assert(it != frames2.end());
-            frames2.erase(it);
+            if (pFrame->getRootFrame()->IsHideRedlines())
+            {
+                auto const it(std::find(frames2.begin(), frames2.end(), pFrame));
+                assert(it != frames2.end());
+                frames2.erase(it);
+            }
         }
         assert(frames2.empty());
     }


More information about the Libreoffice-commits mailing list