From ee13cd374f9c4957ddc2fd502e278689a6587ab5 Mon Sep 17 00:00:00 2001 From: Samuel Mehrbrodt Date: Fri, 12 Jul 2019 11:31:38 +0200 Subject: Deduplicate RemoveHyperlink command Change-Id: I0b190dd15cd214478629aaf2c5e7e49f22ff9cea Reviewed-on: https://gerrit.libreoffice.org/75482 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt --- sw/inc/cmdid.h | 2 +- sw/sdi/_textsh.sdi | 2 +- sw/sdi/drwtxtsh.sdi | 2 +- sw/sdi/swriter.sdi | 18 ------------------ sw/source/uibase/shells/drwtxtex.cxx | 4 ++-- sw/source/uibase/shells/textsh1.cxx | 4 ++-- 6 files changed, 7 insertions(+), 25 deletions(-) (limited to 'sw') diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h index d32dd420f25b..ecbb368ca66c 100644 --- a/sw/inc/cmdid.h +++ b/sw/inc/cmdid.h @@ -135,7 +135,7 @@ #define FN_NUM_CONTINUE (FN_EDIT2 + 36) /* continue previous numbering */ #define FN_REDLINE_ACCEPT_DIRECT (FN_EDIT2 + 37) /* accept redline at current position*/ #define FN_REDLINE_REJECT_DIRECT (FN_EDIT2 + 38) /* reject redline at current position*/ -#define FN_REMOVE_HYPERLINK (FN_EDIT2 + 39) /* remove hyperlink attribute */ +// free #define FN_COPY_HYPERLINK_LOCATION (FN_EDIT2 + 40) /* copy hyperlink URL to clipboard */ #define FN_REDLINE_NEXT_CHANGE (FN_EDIT2 + 41) /* Go to the next change */ #define FN_REDLINE_PREV_CHANGE (FN_EDIT2 + 42) /* Go to the previous change */ diff --git a/sw/sdi/_textsh.sdi b/sw/sdi/_textsh.sdi index badcf400da79..04e686813c58 100644 --- a/sw/sdi/_textsh.sdi +++ b/sw/sdi/_textsh.sdi @@ -347,7 +347,7 @@ interface BaseText StateMethod = GetState; DisableFlags="SfxDisableFlags::SwOnProtectedCursor"; ] - FN_REMOVE_HYPERLINK + SID_REMOVE_HYPERLINK [ ExecMethod = Execute ; StateMethod = GetState; diff --git a/sw/sdi/drwtxtsh.sdi b/sw/sdi/drwtxtsh.sdi index 721366fdb65b..560c60b9d7d1 100644 --- a/sw/sdi/drwtxtsh.sdi +++ b/sw/sdi/drwtxtsh.sdi @@ -552,7 +552,7 @@ interface TextDrawText StateMethod = GetState; DisableFlags="SfxDisableFlags::SwOnProtectedCursor"; ] - FN_REMOVE_HYPERLINK + SID_REMOVE_HYPERLINK [ ExecMethod = Execute ; StateMethod = GetState; diff --git a/sw/sdi/swriter.sdi b/sw/sdi/swriter.sdi index f39cf515fa6a..8604e2b8c318 100644 --- a/sw/sdi/swriter.sdi +++ b/sw/sdi/swriter.sdi @@ -7328,24 +7328,6 @@ SfxVoidItem PreviousTrackedChange FN_REDLINE_PREV_CHANGE GroupId = SfxGroupId::Edit; ] -SfxVoidItem RemoveHyperlink FN_REMOVE_HYPERLINK -[ - AutoUpdate = FALSE, - FastCall = FALSE, - ReadOnlyDoc = FALSE, - Toggle = FALSE, - Container = FALSE, - RecordAbsolute = FALSE, - RecordPerSet; - Asynchron; - - - AccelConfig = TRUE, - MenuConfig = TRUE, - ToolBoxConfig = TRUE, - GroupId = SfxGroupId::Edit; -] - SfxVoidItem CopyHyperlinkLocation FN_COPY_HYPERLINK_LOCATION [ AutoUpdate = FALSE, diff --git a/sw/source/uibase/shells/drwtxtex.cxx b/sw/source/uibase/shells/drwtxtex.cxx index 0125738fb745..e5c63fbb0f77 100644 --- a/sw/source/uibase/shells/drwtxtex.cxx +++ b/sw/source/uibase/shells/drwtxtex.cxx @@ -494,7 +494,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq ) } break; - case FN_REMOVE_HYPERLINK: + case SID_REMOVE_HYPERLINK: { URLFieldHelper::RemoveURLField(pSdrView->GetTextEditOutliner(), pOLV); @@ -900,7 +900,7 @@ void SwDrawTextShell::GetState(SfxItemSet& rSet) rSet.DisableItem(nWhich); } break; - case FN_REMOVE_HYPERLINK: + case SID_REMOVE_HYPERLINK: case SID_EDIT_HYPERLINK: { if (!URLFieldHelper::IsCursorAtURLField(pOLV)) diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx index c014949ab25e..1d0668390253 100644 --- a/sw/source/uibase/shells/textsh1.cxx +++ b/sw/source/uibase/shells/textsh1.cxx @@ -885,7 +885,7 @@ void SwTextShell::Execute(SfxRequest &rReq) case SID_EDIT_HYPERLINK: GetView().GetViewFrame()->SetChildWindow(SID_HYPERLINK_DIALOG, true); break; - case FN_REMOVE_HYPERLINK: + case SID_REMOVE_HYPERLINK: { bool bSel = rWrtSh.HasSelection(); if(!bSel) @@ -1759,7 +1759,7 @@ void SwTextShell::GetState( SfxItemSet &rSet ) } } break; - case FN_REMOVE_HYPERLINK: + case SID_REMOVE_HYPERLINK: { SfxItemSet aSet(GetPool(), svl::Items