sw/source/uibase/shells/drwbassh.cxx | 6 ++++++ 1 file changed, 6 insertions(+)
New commits: commit ffcd9cbaf27e89827d5a5705a17727f9c9c34777 Author: Samuel Mehrbrodt <[email protected]> AuthorDate: Thu Jul 24 08:09:03 2025 +0200 Commit: Samuel Mehrbrodt <[email protected]> CommitDate: Thu Jul 24 09:30:02 2025 +0200 tdf#167544 Properly handle 'Insert hyperlink' for sw shapes Change-Id: I6e25fc25df370b96a0a4183de07f3f6fbbdde835 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188255 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <[email protected]> diff --git a/sw/source/uibase/shells/drwbassh.cxx b/sw/source/uibase/shells/drwbassh.cxx index 3abb36d94093..11f2a7cfd8ac 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;
