summaryrefslogtreecommitdiff
path: root/sw/sdi
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2023-01-10 15:40:34 +0100
committerMiklos Vajna <vmiklos@collabora.com>2023-01-10 21:08:51 +0000
commitc68d06dfa1498f862923eaddf3e5d247650a53d5 (patch)
tree9f0f4dc0662d2a1409c39759aed07433d8ee3246 /sw/sdi
parentcec3c719303decd3b811a328fabd71d8c4e5ba3b (diff)
sw: add a new .uno:DeleteTextFormFields UNO command
Users sometimes want to "unlink" their citations, which means deleting the fieldmarks (if fieldmarks are used to represent citations, e.g. with Zotero), which means keeping the field result as-is, but removing the field metadata and the actual field start/seprator/end characters. Do this similar to .uno:TextFormFields, which can do an update of such fieldmarks, i.e. add the ability to filter for a certain type and field command prefix. This is meant to allow removal af all fieldmark that belongs to one one feature, e.g. Zotero. This is similar to 7765b442e13048f857fd7ee49ced1731caee297e (sw: add a new .uno:TextFormFields UNO command, 2022-11-28), but this is about deleting (the field commands, not the result), while that was about updating. The same for bookmarks & refmarks are not yet supported. Change-Id: I02548b030b1822f7b36d3bc5ff9553d728f065c2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145272 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'sw/sdi')
-rw-r--r--sw/sdi/_textsh.sdi6
-rw-r--r--sw/sdi/swriter.sdi14
2 files changed, 20 insertions, 0 deletions
diff --git a/sw/sdi/_textsh.sdi b/sw/sdi/_textsh.sdi
index f712ea376776..99f50c8e3b27 100644
--- a/sw/sdi/_textsh.sdi
+++ b/sw/sdi/_textsh.sdi
@@ -1820,6 +1820,12 @@ interface BaseText
StateMethod = StateField ;
]
+ FN_DELETE_TEXT_FORMFIELDS
+ [
+ ExecMethod = ExecField ;
+ StateMethod = StateField ;
+ ]
+
FN_PROTECT_FIELDS
[
ExecMethod = Execute ;
diff --git a/sw/sdi/swriter.sdi b/sw/sdi/swriter.sdi
index bc0c5456aef8..76939d94c03a 100644
--- a/sw/sdi/swriter.sdi
+++ b/sw/sdi/swriter.sdi
@@ -8330,6 +8330,20 @@ SfxVoidItem TextFormFields FN_UPDATE_TEXT_FORMFIELDS
GroupId = SfxGroupId::Controls;
]
+SfxVoidItem DeleteTextFormFields FN_DELETE_TEXT_FORMFIELDS
+(SfxStringItem FieldType FN_PARAM_1, SfxStringItem FieldCommandPrefix FN_PARAM_2)
+[
+ AutoUpdate = TRUE,
+ FastCall = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+
+ GroupId = SfxGroupId::Controls;
+]
+
SfxVoidItem UpdateTextFormField FN_UPDATE_TEXT_FORMFIELD
(SfxStringItem FieldType FN_PARAM_1, SfxStringItem FieldCommandPrefix FN_PARAM_2, SfxUnoAnyItem Field FN_PARAM_3)
[