From ae68e12e0fcb9372e59b7071a37650df06175d5a Mon Sep 17 00:00:00 2001 From: Samuel Mehrbrodt Date: Fri, 12 Jul 2019 11:01:56 +0200 Subject: Deduplicate EditHyperlink command Change-Id: I23f0c276c5c1229aeb4ea468c6b858e36c120bd9 Reviewed-on: https://gerrit.libreoffice.org/75480 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt --- sw/source/uibase/shells/drwtxtex.cxx | 4 ++-- sw/source/uibase/shells/textsh1.cxx | 4 ++-- sw/source/uibase/utlui/content.cxx | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) (limited to 'sw/source') diff --git a/sw/source/uibase/shells/drwtxtex.cxx b/sw/source/uibase/shells/drwtxtex.cxx index 898cc8743fe5..0125738fb745 100644 --- a/sw/source/uibase/shells/drwtxtex.cxx +++ b/sw/source/uibase/shells/drwtxtex.cxx @@ -486,7 +486,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq ) } break; - case FN_EDIT_HYPERLINK: + case SID_EDIT_HYPERLINK: { // Ensure the field is selected first pOLV->GetFieldAtCursor(); @@ -901,7 +901,7 @@ void SwDrawTextShell::GetState(SfxItemSet& rSet) } break; case FN_REMOVE_HYPERLINK: - case FN_EDIT_HYPERLINK: + case SID_EDIT_HYPERLINK: { if (!URLFieldHelper::IsCursorAtURLField(pOLV)) rSet.DisableItem(nWhich); diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx index d39c4d89c113..c014949ab25e 100644 --- a/sw/source/uibase/shells/textsh1.cxx +++ b/sw/source/uibase/shells/textsh1.cxx @@ -882,7 +882,7 @@ void SwTextShell::Execute(SfxRequest &rReq) rWrtSh.UnProtectTables(); } break; - case FN_EDIT_HYPERLINK: + case SID_EDIT_HYPERLINK: GetView().GetViewFrame()->SetChildWindow(SID_HYPERLINK_DIALOG, true); break; case FN_REMOVE_HYPERLINK: @@ -1746,7 +1746,7 @@ void SwTextShell::GetState( SfxItemSet &rSet ) } break; - case FN_EDIT_HYPERLINK: + case SID_EDIT_HYPERLINK: case FN_COPY_HYPERLINK_LOCATION: { SfxItemSet aSet(GetPool(), diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index e728024d1c7a..ae42953cf7f3 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -72,6 +72,7 @@ #include #include #include +#include #include #include #include @@ -3522,7 +3523,7 @@ void SwContentTree::EditEntry(SvTreeListEntry const * pEntry, EditEntryMode nMod break; case ContentTypeId::URLFIELD: - nSlot = FN_EDIT_HYPERLINK; + nSlot = SID_EDIT_HYPERLINK; break; case ContentTypeId::REFERENCE: nSlot = FN_EDIT_FIELD; -- cgit