[Libreoffice-commits] core.git: sw/source
Michael Stahl (via logerrit)
logerrit at kemper.freedesktop.org
Mon Nov 18 16:38:12 UTC 2019
sw/source/core/undo/undel.cxx | 6 +++---
sw/source/core/undo/untblk.cxx | 4 +++-
2 files changed, 6 insertions(+), 4 deletions(-)
New commits:
commit 83edee3009240a3c26271b8de2450eed3e5acf97
Author: Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Mon Nov 18 13:16:54 2019 +0100
Commit: Michael Stahl <michael.stahl at cib.de>
CommitDate: Mon Nov 18 17:36:04 2019 +0100
tdf#128739 sw: don't delete bookmarks prematurely in SwUndoDelete
::RedoImpl() and SwUndoInserts::UndoImpl().
The bookmarks will be deleted again by DelContentIndex(), which also
adds them to m_pHistory, but RemoveIdxFromRange() deletes them without
adding them to m_pHistory so they won't be restored.
There is some funny commit c50f2e0a69204b8760c2e06313a18b6194f2d109
which is a mystery: if the rPam has to be saved across the
RemoveIdxFromRange() call, then either the rPam that's passed to
RemoveIdxFromRange() is wrong, or the rPam that is restored after the
call is wrong... just revert it and set the same values to rPam.
Change-Id: I9e93ef75bcd2931594aeae07e761c48752d31d9b
Reviewed-on: https://gerrit.libreoffice.org/83084
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl at cib.de>
diff --git a/sw/source/core/undo/undel.cxx b/sw/source/core/undo/undel.cxx
index ebdf25a63978..ab32dff0901c 100644
--- a/sw/source/core/undo/undel.cxx
+++ b/sw/source/core/undo/undel.cxx
@@ -1153,9 +1153,9 @@ void SwUndoDelete::RedoImpl(::sw::UndoRedoContext & rContext)
if( !m_bDelFullPara )
{
- SwUndRng aTmpRng( rPam );
- RemoveIdxFromRange( rPam, false );
- aTmpRng.SetPaM( rPam );
+ // tdf#128739 correct cursors but do not delete bookmarks yet
+ ::PaMCorrAbs(rPam, *rPam.End());
+ SetPaM(rPam);
if( !m_bJoinNext ) // then restore selection from bottom to top
rPam.Exchange();
diff --git a/sw/source/core/undo/untblk.cxx b/sw/source/core/undo/untblk.cxx
index 75d509d43004..0ca015873f88 100644
--- a/sw/source/core/undo/untblk.cxx
+++ b/sw/source/core/undo/untblk.cxx
@@ -27,6 +27,7 @@
#include <docary.hxx>
#include <swundo.hxx>
#include <pam.hxx>
+#include <mvsave.hxx>
#include <ndtxt.hxx>
#include <UndoCore.hxx>
#include <rolbck.hxx>
@@ -238,7 +239,8 @@ void SwUndoInserts::UndoImpl(::sw::UndoRedoContext & rContext)
m_pLastNodeColl = pTextNd->GetTextColl();
}
- RemoveIdxFromRange(rPam, false);
+ // tdf#128739 correct cursors but do not delete bookmarks yet
+ ::PaMCorrAbs(rPam, *rPam.End());
SetPaM(rPam);
}
More information about the Libreoffice-commits
mailing list