summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Stahl <Michael.Stahl@cib.de>2018-09-07 14:27:46 +0200
committerCaolán McNamara <caolanm@redhat.com>2018-09-20 17:39:09 +0200
commit55210211d899e3929fb8d7760483206937a3b0e4 (patch)
tree9f68fefdb316401f0f22f0605b42663bb15c79db
parentsw: avoid asserts from SwSortedObjs::Insert() (diff)
downloadcore-55210211d899e3929fb8d7760483206937a3b0e4.tar.gz
core-55210211d899e3929fb8d7760483206937a3b0e4.zip
sw: fix usage of wrong string in SwUndoOverwrite::RedoImpl()
At this point the "aDelStr" is in the document, don't use invalid index. Change-Id: I0aae8839e9669e3a474266a345b54a1e7e6db38f (cherry picked from commit a44d7917655dfec3f6a101752c68de8c46aeb822) Reviewed-on: https://gerrit.libreoffice.org/60748 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--sw/source/core/undo/unovwr.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/core/undo/unovwr.cxx b/sw/source/core/undo/unovwr.cxx
index beafde6a4773..dbc82afc684f 100644
--- a/sw/source/core/undo/unovwr.cxx
+++ b/sw/source/core/undo/unovwr.cxx
@@ -267,7 +267,7 @@ void SwUndoOverwrite::RedoImpl(::sw::UndoRedoContext & rContext)
{
rIdx.Assign( pTextNd, nSttContent );
pCurrentPam->SetMark();
- pCurrentPam->GetMark()->nContent += aInsStr.getLength();
+ pCurrentPam->GetMark()->nContent += aDelStr.getLength();
pDoc->getIDocumentRedlineAccess().DeleteRedline( *pCurrentPam, false, USHRT_MAX );
pCurrentPam->DeleteMark();
}