From c44ea3d7d55bc309a078fb01a09994e6098c3ff4 Mon Sep 17 00:00:00 2001 From: Martin van Zijl Date: Mon, 18 May 2020 05:32:32 +1200 Subject: tdf#39302 add "alt + =" shortcut for autosum Change-Id: I11e2f77e8d8ec81d9ea6d5bc4e8ef31ec7dedc67 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94386 Tested-by: Jenkins Reviewed-by: Eike Rathke (cherry picked from commit f4b47f7d335227d037c2c2e9f662724d4b8c73d4) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94964 --- sc/source/ui/view/tabvwsh4.cxx | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'sc/source/ui/view') diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx index b00cebcdfa28..e57caf3c2c33 100644 --- a/sc/source/ui/view/tabvwsh4.cxx +++ b/sc/source/ui/view/tabvwsh4.cxx @@ -1344,6 +1344,27 @@ bool ScTabViewShell::TabKeyInput(const KeyEvent& rKEvt) case KEY_PAGEDOWN: nSlotId = bShift ? SID_CURSORPAGERIGHT_SEL : SID_CURSORPAGERIGHT_; break; + case KEY_EQUAL: + { + // #tdf39302: Use "Alt + =" for autosum + if ( !bAnyEdit ) // Ignore shortcut if currently editing a cell + { + ScInputHandler* pHdl = pScMod->GetInputHdl(this); + if ( pHdl ) + { + ScInputWindow* pWin = pHdl->GetInputWindow(); + if ( pWin ) + { + bool bRangeFinder = false; + bool bSubTotal = false; + pWin->AutoSum( bRangeFinder, bSubTotal, ocSum ); + } + } + + bUsed = true; + break; + } + } } if ( nSlotId ) { -- cgit