summaryrefslogtreecommitdiff
path: root/sw/source/core/doc/docredln.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/doc/docredln.cxx')
-rw-r--r--sw/source/core/doc/docredln.cxx15
1 files changed, 15 insertions, 0 deletions
diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx
index 1e31e7150324..f46749e24830 100644
--- a/sw/source/core/doc/docredln.cxx
+++ b/sw/source/core/doc/docredln.cxx
@@ -60,6 +60,7 @@
#include <txtfld.hxx>
#include <flowfrm.hxx>
+#include <txtfrm.hxx>
using namespace com::sun::star;
@@ -1673,6 +1674,20 @@ void SwRangeRedline::MoveFromSection(size_t nMyPos)
*pItem = *Start();
for( auto& pItem : aBehindArr )
*pItem = *End();
+
+ // sw_redlinehide: assume that Show will only be called by filters;
+ // when it is called, ensure that no MergedPara instance survives
+ for (SwNodeIndex node = Start()->nNode; node.GetIndex() <= End()->nNode.GetIndex(); ++node)
+ {
+ if (SwTextNode const*const pNode = node.GetNode().GetTextNode())
+ {
+ SwIterator<SwTextFrame, SwTextNode, sw::IteratorMode::UnwrapMulti> aIter(*pNode);
+ for (SwTextFrame* pFrame = aIter.First(); pFrame; pFrame = aIter.Next())
+ {
+ pFrame->SetMergedPara(nullptr);
+ }
+ }
+ }
}
else
InvalidateRange();