summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Stahl <Michael.Stahl@cib.de>2018-05-07 17:44:44 +0200
committerMichael Stahl <Michael.Stahl@cib.de>2018-06-08 19:42:08 +0200
commit5e6ba08f2f1ecd11ba81b28830f349bc26f045b3 (patch)
tree7c2b0ea440e2e1097ee8286bab11c4b1b370ec9b
parentsw_redlinehide: let the Show menu item toggle new mode (diff)
downloadcore-private/mst/sw_redlinehide.tar.gz
core-private/mst/sw_redlinehide.zip
hack in Show - not sure if... private/mst/sw_redlinehide
Change-Id: I6ca49cfe9c61b3562e87ca994b284e056c2bab54
-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();