sw, .uno:InsertBookmark: add a new BookmarkText parameter and accept HTML there
commitfa82e151d80d15eeb6dfae434f1dbb3b68907188
authorMiklos Vajna <vmiklos@collabora.com>
Tue, 6 Dec 2022 13:41:45 +0000 (6 14:41 +0100)
committerMiklos Vajna <vmiklos@collabora.com>
Tue, 6 Dec 2022 18:08:58 +0000 (6 18:08 +0000)
treea3f04db73e10c8a85247009d9d33735862110823
parent2fd5440c9766fa2833a3fc4dcb8a0d57a089121b
sw, .uno:InsertBookmark: add a new BookmarkText parameter and accept HTML there

There was already an UNO command to insert a new bookmark with the
provided name, in a non-interactive way.

What was missing is to allow specifying the bookmark text, which is to
some extent not part of the bookmark, but e.g. the bookmark dialog
allows editing that still.

Add a new BookmarkText parameter to .uno:InsertBookmark, in case it's
specified then we interpret this as HTML and we create the bookmark on
the imported content, not simply at the current cursor position.

This is similar to commit 1c2ef850db29beb369dcc89a58fc73416ecd9c5c (sw,
.uno:TextFormField command: accept HTML in the FieldResult parameter,
2022-11-16), but that was for the field mode, while this is for the
bookmark mode of Zotero.

Change-Id: I4928d173e197796d40fdb53f81e84b6bfd77cdc5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143736
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
sw/qa/uibase/shells/shells.cxx
sw/sdi/swriter.sdi
sw/source/uibase/shells/textsh1.cxx