diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2023-01-03 11:28:04 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2023-01-03 11:58:27 +0000 |
commit | 3585d0414ffe08890856e5c09f453b9f566323df (patch) | |
tree | 3aba627928adf9492121d76860a4b46de849967e /desktop | |
parent | 32c845cb4389aba9430ce471b04f2891f5ff630d (diff) |
sw, lok: implement a getCommandValues(Fields)
There was no LOK API to get a list of all fields of a given type where
the name matches a certain prefix.
This is useful in case the API cilent wants to know what previously
inserted refmarks were deleted by the user as part of deleting text
content.
Add a new getCommandValues(".uno:Fields") that returns the names of
matching refmarks. Do not return the refmark 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 refmarks.
Change-Id: Ie469253891896aa8ab00d434c9ab116adbe3864b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144985
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 f805f4a73322..6cb0c9493516 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -5717,7 +5717,8 @@ static char* doc_getCommandValues(LibreOfficeKitDocument* pThis, const char* pCo static const std::initializer_list<std::u16string_view> vForward = { u"TextFormFields", u"SetDocumentProperties", - u"Bookmarks" + u"Bookmarks", + u"Fields" }; if (!strcmp(pCommand, ".uno:LanguageStatus")) |