summaryrefslogtreecommitdiff
path: root/sw/sdi
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2022-12-21 14:51:08 +0100
committerMiklos Vajna <vmiklos@collabora.com>2022-12-21 18:48:15 +0000
commit16075474819696f920979969474aa8300f4af530 (patch)
treec451d4a341e90a29da5b38406888832ec07838ce /sw/sdi
parent47f66915f8d8f2418811417ad4b1109f31dee492 (diff)
sw, field insert: handle the Content param for refmarks and accept HTML there
Creating a bookmark just to refer to it is a bit hacky, refmarks are the proper solution to that. But while .uno:InsertBookmark allows specifying custom HTML for the content of the created bookmark, there is no matching UNO command that would do the same for refmarks. Fix the problem by extending .uno:InsertField: - add a TypeName parameter, so TypeName=SetRef can be used in macros, which is more readable than Type=12 - handle the previously ignored Content parameter when creating a refmark and accept HTML there to allow rich formatting Note that unlike bookmarks, refmarks are text attributes in a text node, so in case multi-paragraph HTML would be provided, the created refmark will only cover the content till the end of the first paragraph. Also not that unlike fieldmarks and bookmarks, a refmark can only represent a reference, not a bibliography, we'll need sections for that. Change-Id: I4d95f0a6e5618f1b611f7431e9189a63ee75d349 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144646 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'sw/sdi')
-rw-r--r--sw/sdi/swriter.sdi2
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/sdi/swriter.sdi b/sw/sdi/swriter.sdi
index 55678973acd1..6da22965af0b 100644
--- a/sw/sdi/swriter.sdi
+++ b/sw/sdi/swriter.sdi
@@ -2887,7 +2887,7 @@ SfxVoidItem InsertEnvelope FN_ENVELOP
]
SfxVoidItem InsertField FN_INSERT_FIELD
-(SfxUInt16Item Type FN_PARAM_FIELD_TYPE,SfxUInt16Item SubType FN_PARAM_FIELD_SUBTYPE,SfxStringItem Name FN_INSERT_FIELD,SfxStringItem Content FN_PARAM_FIELD_CONTENT,SfxUInt32Item Format FN_PARAM_FIELD_FORMAT,SfxStringItem Separator FN_PARAM_3)
+(SfxUInt16Item Type FN_PARAM_FIELD_TYPE,SfxUInt16Item SubType FN_PARAM_FIELD_SUBTYPE,SfxStringItem Name FN_INSERT_FIELD,SfxStringItem Content FN_PARAM_FIELD_CONTENT,SfxUInt32Item Format FN_PARAM_FIELD_FORMAT,SfxStringItem Separator FN_PARAM_3, SfxStringItem TypeName FN_PARAM_4)
[
AutoUpdate = FALSE,
FastCall = FALSE,