sw, UpdateBookmarks: support renaming bookmarks

Desktop / LibreOffice - Miklos Vajna [collabora.com] - 10 January 2023 07:06 UTC

The problem was that the LOK API client wanted to change the name of the bookmark, but nothing happened, because we had a sanity check that made sure the provided vs existing bookmark names match.

The intention was that the bookmark name is just an ID (you can store additional properties in per-doc custom properties, those can change), so we can require that bookmarks never get renamed when using this command.

Fix the problem by dropping this requirement and rather use renameMark() to adjust the in-doc bookmark name if needed.

This also handles undo/redo for us.

Change-Id: I7a426c865ddf24f13741c0369fb3991da2e881b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145235

d2318503d559 sw, UpdateBookmarks: support renaming bookmarks
sw/qa/uibase/shells/shells.cxx | 9 +++++++--
sw/source/uibase/shells/textsh1.cxx | 2 +-
2 files changed, 8 insertions(+), 3 deletions(-)

Upstream: cgit.freedesktop.org


  • Share