summaryrefslogtreecommitdiff
path: root/sw/inc/cmdid.h
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2022-12-14 16:06:37 +0100
committerMiklos Vajna <vmiklos@collabora.com>2022-12-14 19:17:56 +0000
commit724180ec495a696c79332653cb6fb52ecfbccc29 (patch)
treeb78c416b7a54e9454bf344f0b2b8a7d8b0cab995 /sw/inc/cmdid.h
parent705594fc805012b5bf6167d7f9fee63bb1b90a1b (diff)
sw: add a new .uno:UpdateBookmarks UNO command
Current the .uno:InsertBookmark command allows inserting a bookmark with a provided content into the document, but an existing bookmark can't be updated similarly. This is a problem in case Zotero citations are to be modeled with bookmarks. Another trouble is that bookmarks don't have dummy characters, so we need to be careful to replace the content in a way that maintains these bookmarks, a naive delete + insert will collapse them. Fix the problem by introducing a new .uno:UpdateBookmarks command, somewhat similar to what commit 7765b442e13048f857fd7ee49ced1731caee297e (sw: add a new .uno:TextFormFields UNO command, 2022-11-28) did. As usual, the provided new text is meant to be HTML, which allows multi-paragraph, formatted content. Change-Id: Id5bb3fd2fd9e147d98709b5a7e0c322e73c6d283 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144167 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'sw/inc/cmdid.h')
-rw-r--r--sw/inc/cmdid.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h
index cb21ddb5b441..004a40d8d89f 100644
--- a/sw/inc/cmdid.h
+++ b/sw/inc/cmdid.h
@@ -203,6 +203,7 @@ class SwUINumRuleItem;
// Region: Insert
#define FN_INSERT_BOOKMARK (FN_INSERT + 2 ) /* Bookmark */
+// FN_INSERT + 3 is FN_INSERT_BREAK
#define FN_INSERT_BREAK_DLG (FN_INSERT + 4 ) /* Break */
#define FN_INSERT_COLUMN_BREAK (FN_INSERT + 5 ) /* Column break */
@@ -319,6 +320,7 @@ class SwUINumRuleItem;
#define FN_TABLE_PASTE_COL_BEFORE (FN_INSERT2 + 32) /* paste table as new table columns */
#define FN_EDIT_BOOKMARK (FN_INSERT2 + 33 ) /* Bookmark */
+#define FN_UPDATE_BOOKMARKS (FN_INSERT2 + 34)
// Region: Format
#define FN_AUTOFORMAT_APPLY (FN_FORMAT + 1 ) /* apply autoformat options */