summaryrefslogtreecommitdiff
path: root/sw/source/core/layout/ssfrm.cxx
diff options
context:
space:
mode:
authorMichael Stahl <Michael.Stahl@cib.de>2018-08-22 15:09:59 +0200
committerMichael Stahl <Michael.Stahl@cib.de>2018-09-19 10:18:28 +0200
commit41d8ca9686c7c184f586e99674b443c34bfd4f33 (patch)
tree348453a751ecb16557221a6825148726c861d010 /sw/source/core/layout/ssfrm.cxx
parent0de06872ab8fcd2c0e8cd852f80adc9f0183ddca (diff)
sw_redlinehide_2: JoinPrev() may need to move frames on deleted ...
... prev. Node to the second node, if the two were merged before the Join. Change-Id: I047b6008c5f0bb6e79c63421a4dba09ba8cf3320
Diffstat (limited to 'sw/source/core/layout/ssfrm.cxx')
-rw-r--r--sw/source/core/layout/ssfrm.cxx11
1 files changed, 9 insertions, 2 deletions
diff --git a/sw/source/core/layout/ssfrm.cxx b/sw/source/core/layout/ssfrm.cxx
index 3a37ae92bc7f..99d187faa571 100644
--- a/sw/source/core/layout/ssfrm.cxx
+++ b/sw/source/core/layout/ssfrm.cxx
@@ -27,6 +27,7 @@
#include <fmtfsize.hxx>
#include <editeng/boxitem.hxx>
#include <editeng/shaditem.hxx>
+#include <IDocumentRedlineAccess.hxx>
#include <fmtclds.hxx>
#include <viewimp.hxx>
#include <sortedobjs.hxx>
@@ -440,14 +441,20 @@ SwContentFrame::~SwContentFrame()
{
}
-void SwTextFrame::RegisterToNode(SwTextNode & rNode)
+void SwTextFrame::RegisterToNode(SwTextNode & rNode, bool const isForceNodeAsFirst)
{
+ if (isForceNodeAsFirst && m_pMergedPara)
+ { // nothing registered here, in particular no redlines
+ assert(m_pMergedPara->pFirstNode->GetIndex() + 1 == rNode.GetIndex());
+ assert(rNode.GetDoc()->getIDocumentRedlineAccess().GetRedlinePos(
+ *m_pMergedPara->pFirstNode, USHRT_MAX) == SwRedlineTable::npos);
+ }
assert(&rNode != GetDep());
assert(!m_pMergedPara
|| (m_pMergedPara->pFirstNode->GetIndex() < rNode.GetIndex())
|| (rNode.GetIndex() + 1 == m_pMergedPara->pFirstNode->GetIndex()));
SwTextNode & rFirstNode(
- (m_pMergedPara && m_pMergedPara->pFirstNode->GetIndex() < rNode.GetIndex())
+ (!isForceNodeAsFirst && m_pMergedPara && m_pMergedPara->pFirstNode->GetIndex() < rNode.GetIndex())
? *m_pMergedPara->pFirstNode
: rNode);
// sw_redlinehide: use New here, because the only caller also calls lcl_ChangeFootnoteRef