diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2022-12-07 09:35:15 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2022-12-07 12:30:52 +0000 |
commit | e0bf2712aa9e240748534e3a7498d41c8eeeb9d7 (patch) | |
tree | 795541f4de9d3dc5e7aaa641ca35e2d4f57bf6e2 /desktop | |
parent | 36a554e1f1c4e924a2cbc2df5a4f164fa31e3d6b (diff) |
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 <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/lib/init.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
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<std::u16string_view> vForward = { u"TextFormFields", - u"SetDocumentProperties" + u"SetDocumentProperties", + u"Bookmarks" }; if (!strcmp(pCommand, ".uno:LanguageStatus")) |