summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <Michael.Stahl@cib.de>2020-11-18 10:42:45 +0100
committerMichael Stahl <michael.stahl@cib.de>2020-11-18 17:00:46 +0100
commit53c69d392b1e55267a44994a889688cc80fbbd98 (patch)
tree491e90acbfda9e58b5a5c024dc5507e8346e52b0
parent179812eff88b85f34cb85eaa9b9ad027cb6a979c (diff)
sw_redlinehide: use correct node in SwPaM::InvalidatePaM()
(oopsie from 93b1adf7442839dcfbf16660b1fbe1139f14a4d0) Change-Id: Id48ee8686aa9a6268838fe572ccc321482314442 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106046 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
-rw-r--r--sw/source/core/crsr/pam.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sw/source/core/crsr/pam.cxx b/sw/source/core/crsr/pam.cxx
index b44a2cb2a73f..55775a358826 100644
--- a/sw/source/core/crsr/pam.cxx
+++ b/sw/source/core/crsr/pam.cxx
@@ -1121,7 +1121,7 @@ OUString SwPaM::GetText() const
void SwPaM::InvalidatePaM()
{
- for (SwNodeIndex index = Start()->nNode; index != End()->nNode; ++index)
+ for (SwNodeIndex index = Start()->nNode; index <= End()->nNode; ++index)
{
if (SwTextNode *const pTextNode = index.GetNode().GetTextNode())
{
@@ -1133,9 +1133,9 @@ void SwPaM::InvalidatePaM()
nStart,
index == End()->nNode
? End()->nContent.GetIndex() - nStart
- : End()->nNode.GetNode().GetTextNode()->Len() - nStart,
+ : pTextNode->Len() - nStart,
0);
- pTextNode->TriggerNodeUpdate(sw::LegacyModifyHint(nullptr, &aHint));
+ pTextNode->TriggerNodeUpdate(sw::LegacyModifyHint(&aHint, &aHint));
}
// other node types not invalidated
}