diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2018-11-30 16:28:04 +0100 |
---|---|---|
committer | Michael Stahl <Michael.Stahl@cib.de> | 2018-12-07 10:32:33 +0100 |
commit | 8df9a443e693adbc4d48d1dfefa6335ed075aa5d (patch) | |
tree | 71dec68e07826241176d7ed0f2aa1ed710d88b5f | |
parent | sw_redlinehide_4a: fix infinite loop in SwAttrIter::Seek() (diff) | |
download | core-feature/sw_redlinehide_4a_for_libreoffice-6-2.tar.gz core-feature/sw_redlinehide_4a_for_libreoffice-6-2.zip |
sw_redlinehide_4a: MoveDeletedPrevFrames() should only move
feature/sw_redlinehide_4a_for_libreoffice-6-2
... frames from a layout with hidden redlines.
Change-Id: I8f5d5bbbc5bfd49a8a52579a1c34157b9c5c4515
(cherry picked from commit c1d7cc390c6e095d6e58b856758ba86f7666195f)
-rw-r--r-- | sw/source/core/txtnode/ndtxt.cxx | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index 3ddc6c4e54cb..f9a838bad1c5 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()); } |