summaryrefslogtreecommitdiff
path: root/sw/source/ui
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-04-04 20:11:50 +0100
committerMichael Stahl <michael.stahl@allotropia.de>2022-04-05 21:06:38 +0200
commit5d41c2461642364b7159398024acccbee12f6e3e (patch)
tree14cfad66691558228270bf161e388683b9054442 /sw/source/ui
parent8f80986d6209bb79c44ca03c1f7b69c55cd9a854 (diff)
forcepoint#104 sw: do not delete fieldmark chars in MoveNodeRange()
The problem is that SwXTextTableCursor::mergeRange() wants to move some nodes, and the deleteMarks() deletes a fieldmark creating a SaveBookmark but it contains the positions relative to the CH_TXT_ATR_FIELD* still in the text, while deleting the fieldmark of course removes these. The SaveBookmark would need to adjust the indexes and store the separator position too and the vector would need to be restored in reverse order. But every time the SaveBookmarks are created, they are restored as well, so it looks simpler to just suppress deleting the CH_TXT_ATR_FIELD* in this case, and inserting them too (latter is already done when copying text). Change-Id: I690c6432a38eab6dec10adff74e638f0e52cca55 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132531 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'sw/source/ui')
-rw-r--r--sw/source/ui/misc/bookmark.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/ui/misc/bookmark.cxx b/sw/source/ui/misc/bookmark.cxx
index d912a266f143..3ddd08d14b6d 100644
--- a/sw/source/ui/misc/bookmark.cxx
+++ b/sw/source/ui/misc/bookmark.cxx
@@ -104,7 +104,7 @@ IMPL_LINK_NOARG(SwInsertBookmarkDlg, DeleteHdl, weld::Button&, void)
= weld::fromId<sw::mark::IMark*>(m_xBookmarksBox->get_id(rEntry));
OUString sRemoved = pBookmark->GetName();
IDocumentMarkAccess* const pMarkAccess = rSh.getIDocumentMarkAccess();
- pMarkAccess->deleteMark(pMarkAccess->findMark(sRemoved));
+ pMarkAccess->deleteMark(pMarkAccess->findMark(sRemoved), false);
SfxRequest aReq(rSh.GetView().GetViewFrame(), FN_DELETE_BOOKMARK);
aReq.AppendItem(SfxStringItem(FN_DELETE_BOOKMARK, sRemoved));
aReq.Done();