summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <Michael.Stahl@cib.de>2019-07-22 19:27:11 +0200
committerCaolán McNamara <caolanm@redhat.com>2019-07-25 16:04:22 +0200
commit447d52dffaa2fcc8a78ac87fbd8cf543c52888e5 (patch)
treee7f5f8c7fcb3c6ab604cf98b4c1d80d2f3c7d4f4
parentcbc54319369fc4bf1566bc4f46e53e38ef4e74ae (diff)
tdf#126340 sw_redlinehide: only move merged frames in JoinPrev
The problem was that the first and second node were not actually merged by a redline, so moving the frames doesn't make sense. (regression from 41d8ca9686c7c184f586e99674b443c34bfd4f33) Change-Id: Ib401e4b0b2b207666f65c038ab5c346807bfea92 Reviewed-on: https://gerrit.libreoffice.org/76125 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> (cherry picked from commit 91b344b0346347ac40d2d6fa03a03e92d2e9f252) Reviewed-on: https://gerrit.libreoffice.org/76150 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--sw/source/core/doc/docedt.cxx3
-rw-r--r--sw/source/core/txtnode/ndtxt.cxx3
2 files changed, 4 insertions, 2 deletions
diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx
index 9fceec0533a6..2e4d132a838e 100644
--- a/sw/source/core/doc/docedt.cxx
+++ b/sw/source/core/doc/docedt.cxx
@@ -413,7 +413,8 @@ bool sw_JoinText( SwPaM& rPam, bool bJoinPrev )
}
// delete the Node, at last!
SwNode::Merge const eOldMergeFlag(pOldTextNd->GetRedlineMergeFlag());
- if (eOldMergeFlag == SwNode::Merge::First)
+ if (eOldMergeFlag == SwNode::Merge::First
+ && !pTextNd->IsCreateFrameWhenHidingRedlines())
{
sw::MoveDeletedPrevFrames(*pOldTextNd, *pTextNd);
}
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index c8719a4316d6..1f804ebbe55e 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -1128,7 +1128,8 @@ void SwTextNode::JoinPrev()
pDoc->CorrAbs( aIdx, SwPosition( *this ), nLen, true );
}
SwNode::Merge const eOldMergeFlag(pTextNode->GetRedlineMergeFlag());
- if (eOldMergeFlag == SwNode::Merge::First)
+ if (eOldMergeFlag == SwNode::Merge::First
+ && !IsCreateFrameWhenHidingRedlines())
{
sw::MoveDeletedPrevFrames(*pTextNode, *this);
}