From e0bf2712aa9e240748534e3a7498d41c8eeeb9d7 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Wed, 7 Dec 2022 09:35:15 +0100 Subject: sw, lok: implement a getCommandValues(Bookmarks) 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 Reviewed-by: Miklos Vajna Tested-by: Jenkins --- desktop/source/lib/init.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'desktop') diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 734f76f76362..c777bc7bb731 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -5704,7 +5704,8 @@ static char* doc_getCommandValues(LibreOfficeKitDocument* pThis, const char* pCo static constexpr OStringLiteral aFontSubset(".uno:FontSubset&name="); static const std::initializer_list vForward = { u"TextFormFields", - u"SetDocumentProperties" + u"SetDocumentProperties", + u"Bookmarks" }; if (!strcmp(pCommand, ".uno:LanguageStatus")) -- cgit