diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2023-01-10 08:16:47 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2023-01-10 08:11:17 +0000 |
commit | 71a479afb7e9762de930361e6089e23ab8d4af74 (patch) | |
tree | c81d1cecfbd9d5d7a099df6ba0c0ddb3926ef7f1 /sw/sdi/_textsh.sdi | |
parent | 26d74a57d54327b9fd562065d04d867852ce8e8a (diff) |
sw: add a new .uno:UpdateSections command
There was LOK API to insert a new section with provided HTML content and
to query it, but there was no LOK API to update such created section
with new names/contents.
This is needed in case Zotero wants to store citations with refmarks, in
which case it wants to store the bibliography with sections.
Introduce a .uno:UpdateSections UNO command that can do this: the
sections will be renamed if necessary & the content will be updated. The
content update is reasonably straightforward, because the section always
contains at least one empty paragraph, so there is no danger in simply
deleting the old content before inserting the new one.
This is similar to babba472391d26aed68d7ac31c7a918c08e65256 (sw,
UpdateFields: add new TypeName, NamePrefix and Fields parameters,
2023-01-04), but that was for refmarks / citations, this is for sections
/ bibliography.
Change-Id: Idde6d5ed1b0f25f40df502bb6b7e7ca590ef9151
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145249
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'sw/sdi/_textsh.sdi')
-rw-r--r-- | sw/sdi/_textsh.sdi | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sw/sdi/_textsh.sdi b/sw/sdi/_textsh.sdi index 6e77c6d15c21..f712ea376776 100644 --- a/sw/sdi/_textsh.sdi +++ b/sw/sdi/_textsh.sdi @@ -152,6 +152,12 @@ interface BaseText StateMethod = GetState ; DisableFlags="SfxDisableFlags::SwOnProtectedCursor"; ] + FN_UPDATE_SECTIONS + [ + ExecMethod = Execute ; + StateMethod = GetState ; + DisableFlags="SfxDisableFlags::SwOnProtectedCursor"; + ] FN_SET_REMINDER [ ExecMethod = Execute ; |