sw, lok: implement a getCommandValues(Bookmarks)

Desktop / LibreOffice - Miklos Vajna [collabora.com] - 7 December 2022 12:30 UTC

There was no LOK API to get a list of all bookmarks where the name matches a certain prefix.

This is useful in case the API client wants to know what previously inserted bookmarks were deleted by the user as part of deleting text content.

Add a new getCommandValues(".uno:Bookmarks") that returns the names of matching bookmarks. Do not return the bookmark text, assuming that would be updated by the API client anyway.

In practice this is needed by Zotero in case it wants to model its citations with bookmarks.

Change-Id: I42a544c3c64496519eec6826b58a310ec86dee74 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143764

e0bf2712aa9e sw, lok: implement a getCommandValues(Bookmarks)
desktop/source/lib/init.cxx | 3 ++-
sw/qa/uibase/uno/uno.cxx | 40 ++++++++++++++++++++++++++++++++++++++
sw/source/uibase/uno/loktxdoc.cxx | 41 +++++++++++++++++++++++++++++++++++++--
3 files changed, 81 insertions(+), 3 deletions(-)

Upstream: cgit.freedesktop.org

  • Share