sw/source/uibase/shells/drwbassh.cxx | 6 ++++++ 1 file changed, 6 insertions(+)
New commits: commit a3987f6621531900a7089efbe885756c55ad3381 Author: Samuel Mehrbrodt <samuel.mehrbr...@collabora.com> AuthorDate: Thu Jul 24 08:09:03 2025 +0200 Commit: Szymon Kłos <szymon.k...@collabora.com> CommitDate: Thu Jul 24 09:54:11 2025 +0200 tdf#167544 Properly handle 'Insert hyperlink' for sw shapes Change-Id: I6e25fc25df370b96a0a4183de07f3f6fbbdde835 (cherry picked from commit 764e9189afbf2070beedf54ef9f1d20ac21278f9) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188256 Reviewed-by: Szymon Kłos <szymon.k...@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> diff --git a/sw/source/uibase/shells/drwbassh.cxx b/sw/source/uibase/shells/drwbassh.cxx index d0ee5e477bdb..e6db5b16c626 100644 --- a/sw/source/uibase/shells/drwbassh.cxx +++ b/sw/source/uibase/shells/drwbassh.cxx @@ -691,6 +691,7 @@ void SwDrawBaseShell::Execute(SfxRequest& rReq) } case SID_EDIT_HYPERLINK: + case SID_INSERT_HYPERLINK: case SID_HYPERLINK_DIALOG: { GetView().GetViewFrame().SetChildWindow(SID_HYPERLINK_DIALOG, true); @@ -930,6 +931,7 @@ void SwDrawBaseShell::GetState(SfxItemSet& rSet) break; case SID_OPEN_HYPERLINK: + case SID_INSERT_HYPERLINK: case SID_EDIT_HYPERLINK: case SID_HYPERLINK_DIALOG: case SID_REMOVE_HYPERLINK: @@ -972,6 +974,10 @@ void SwDrawBaseShell::GetState(SfxItemSet& rSet) if (pObj->getHyperlink().isEmpty()) rSet.DisableItem(nWhich); } + if (nWhich == SID_INSERT_HYPERLINK && !pObj->getHyperlink().isEmpty()) + { + rSet.DisableItem(nWhich); + } } break;