sw, lok: implement a getCommandValues(Sections)

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

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

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

Add a new getCommandValues(".uno:Sections") that returns the names of matching sections. Do not return the section 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 bibliography items with sections.

Change-Id: If4f02d2a27f2328020934b319d30561aeaaf6612 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145207

2ddd41b420ce sw, lok: implement a getCommandValues(Sections)
sw/qa/uibase/uno/uno.cxx | 28 +++++++++++++++++++++++++++
sw/source/uibase/uno/loktxdoc.cxx | 40 +++++++++++++++++++++++++++++++++++++--
2 files changed, 66 insertions(+), 2 deletions(-)

Upstream: cgit.freedesktop.org

  • Share