From eef202b0659a8ef5f2c1d0b38f292039f0ceaa8d Mon Sep 17 00:00:00 2001 From: Shivam Kumar Singh Date: Mon, 17 Aug 2020 10:46:27 +0530 Subject: tdf#135334 Add keyboard shortcut to launch SI Change-Id: Id4e911e36527395eb0ed5f29a089a66e0908e882 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100835 Tested-by: Jenkins Reviewed-by: Heiko Tietze --- sw/inc/cmdid.h | 2 ++ sw/sdi/_viewsh.sdi | 4 ++++ sw/sdi/swriter.sdi | 15 +++++++++++++++ sw/source/uibase/uiview/view2.cxx | 9 +++++++++ 4 files changed, 30 insertions(+) (limited to 'sw') diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h index fda0486edbe2..0728b983bc89 100644 --- a/sw/inc/cmdid.h +++ b/sw/inc/cmdid.h @@ -864,6 +864,8 @@ #define SID_ATTR_PAGE_FOOTER_LAYOUT (FN_SIDEBAR + 10) #define SID_ATTR_PAGE_MARGIN (FN_SIDEBAR + 11) +#define SID_INSPECTOR_DECK (FN_SIDEBAR + 13) + //Member IDs for Fill / SetVariable of items #define MID_STYLE 0xe0 #define MID_PWIDTH 0xe1 diff --git a/sw/sdi/_viewsh.sdi b/sw/sdi/_viewsh.sdi index 3959e54b3cc2..e4c419c05a31 100644 --- a/sw/sdi/_viewsh.sdi +++ b/sw/sdi/_viewsh.sdi @@ -65,6 +65,10 @@ interface BaseTextEditView [ ExecMethod = Execute; ] + SID_INSPECTOR_DECK + [ + ExecMethod = Execute; + ] FN_PAGEDOWN // status(final|play) [ ExecMethod = Execute ; diff --git a/sw/sdi/swriter.sdi b/sw/sdi/swriter.sdi index ae5c0765ccd4..c815e1285670 100644 --- a/sw/sdi/swriter.sdi +++ b/sw/sdi/swriter.sdi @@ -431,6 +431,21 @@ SfxVoidItem SwBackspace FN_BACKSPACE GroupId = SfxGroupId::Edit; ] +SfxVoidItem InspectorDeck SID_INSPECTOR_DECK +[ + AutoUpdate = TRUE, + FastCall = FALSE, + ReadOnlyDoc = FALSE, + Toggle = FALSE, + Container = FALSE, + RecordAbsolute = FALSE, + RecordPerSet; + AccelConfig = TRUE, + MenuConfig = FALSE, + ToolBoxConfig = FALSE, + GroupId = ; +] + SfxVoidItem BorderDialog FN_FORMAT_BORDER_DLG () [ diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx index 780bfba16c33..bf235be5d1ec 100644 --- a/sw/source/uibase/uiview/view2.cxx +++ b/sw/source/uibase/uiview/view2.cxx @@ -125,6 +125,7 @@ #include #include #include +#include #include #include @@ -534,6 +535,14 @@ void SwView::Execute(SfxRequest &rReq) bool bIgnore = false; switch( nSlot ) { + case SID_INSPECTOR_DECK: + { + OUString deckId; + if (nSlot == SID_INSPECTOR_DECK) + deckId = "InspectorDeck"; + ::sfx2::sidebar::Sidebar::ToggleDeck(deckId, GetViewFrame()); + } + break; case SID_CREATE_SW_DRAWVIEW: m_pWrtShell->getIDocumentDrawModelAccess().GetOrCreateDrawModel(); break; -- cgit