summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMichael Stahl <Michael.Stahl@cib.de>2020-08-25 17:30:16 +0200
committerAndras Timar <andras.timar@collabora.com>2020-08-31 07:18:13 +0200
commit5120a7169c05ea16ad06afd60081e18a40d8c68e (patch)
treec4546a820d50515e6944870c6e9133840508dd17 /sw
parent7a126ea449a7faa2b0d2f71cb4b7e0fe74d05a61 (diff)
tdf#135018 sw_redlinehide: fix accept delete redline at start of body
There is no predecessor text node. (regression from 34b32f56e7f76639ee3a31cfc230a3340acf635a) Change-Id: I5f6a1a7a1a35a2a6e600166dc1afcf6c4bf9d389 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101337 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de> (cherry picked from commit a64511dc929a91926ade0c132b310214fdb1bdea) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101354 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/txtnode/ndtxt.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index b5784d43ce37..6abf5c969755 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -880,7 +880,10 @@ void CheckResetRedlineMergeFlag(SwTextNode & rNode, Recreate const eRecreateMerg
if (eRecreateMerged != sw::Recreate::No)
{
SwTextNode * pMergeNode(&rNode);
- if (eRecreateMerged == sw::Recreate::Predecessor)
+ if (eRecreateMerged == sw::Recreate::Predecessor
+ // tdf#135018 check that there is a predecessor node, i.e. rNode
+ // isn't the first node after the body start node
+ && rNode.GetNodes()[rNode.GetIndex() - 1]->StartOfSectionIndex() != 0)
{
for (sal_uLong i = rNode.GetIndex() - 1; ; --i)
{