diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2018-05-07 17:44:44 +0200 |
---|---|---|
committer | Michael Stahl <Michael.Stahl@cib.de> | 2018-06-08 19:42:08 +0200 |
commit | 5e6ba08f2f1ecd11ba81b28830f349bc26f045b3 (patch) | |
tree | 7c2b0ea440e2e1097ee8286bab11c4b1b370ec9b | |
parent | f9b5ee4abf4217b464b5194c71e3badb7b289d8b (diff) |
hack in Show - not sure if...private/mst/sw_redlinehide
Change-Id: I6ca49cfe9c61b3562e87ca994b284e056c2bab54
-rw-r--r-- | sw/source/core/doc/docredln.cxx | 15 |
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(); |