summaryrefslogtreecommitdiff
path: root/sw/sdi
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2023-01-20 09:50:11 +0100
committerMiklos Vajna <vmiklos@collabora.com>2023-01-20 12:41:19 +0000
commita5a1ea2f7d784c5c6c33f332ba61aceb7af3eca4 (patch)
tree6aec97d73480ce3f9f47c32ceb8d62a08bfec6f5 /sw/sdi
parent675a3e3d545c5811c35bbd189ff0a241a83443d0 (diff)
sw: add a new .uno:DeleteSections UNO command
This is similiar to commit 1d6593dd799ff4eb931ffbb5338e4856fb87f77f (sw: add a new .uno:DeleteFields UNO command, 2023-01-16), but that deleted refmarks (used for e.g. Zotero citations), while this deletes sections (used for e.g. Zotero bibliography). Implement the section "unlinking" (delete the section, but not its data) by deleting the section format: that will remove the matching section node as well, but not the content nodes. Change-Id: Ib00a8f592ddbb77c5e8e08ff94bb0eebfcf7cea8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145870 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 e7b5735a71ca..d8ec5afef933 100644
--- a/sw/sdi/_textsh.sdi
+++ b/sw/sdi/_textsh.sdi
@@ -1848,6 +1848,12 @@ interface BaseText
DisableFlags="SfxDisableFlags::SwOnProtectedCursor";
]
+ FN_DELETE_SECTIONS
+ [
+ ExecMethod = Execute ;
+ DisableFlags="SfxDisableFlags::SwOnProtectedCursor";
+ ]
+
FN_DELETE_FIELDS
[
ExecMethod = Execute ;
diff --git a/sw/sdi/swriter.sdi b/sw/sdi/swriter.sdi
index 8b0f7b2364a7..873cab508584 100644
--- a/sw/sdi/swriter.sdi
+++ b/sw/sdi/swriter.sdi
@@ -2616,6 +2616,20 @@ SfxVoidItem DeleteBookmarks FN_DELETE_BOOKMARKS
GroupId = SfxGroupId::Controls;
]
+SfxVoidItem DeleteSections FN_DELETE_SECTIONS
+(SfxStringItem SectionNamePrefix FN_PARAM_1)
+[
+ AutoUpdate = FALSE,
+ FastCall = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+
+ GroupId = SfxGroupId::Controls;
+]
+
SfxVoidItem DeleteFields FN_DELETE_FIELDS
(SfxStringItem TypeName FN_PARAM_1, SfxStringItem NamePrefix FN_PARAM_2)
[