summaryrefslogtreecommitdiff
path: root/sc/source/ui/view
diff options
context:
space:
mode:
authorMartin van Zijl <martin.vanzijl@gmail.com>2020-05-18 05:32:32 +1200
committerEike Rathke <erack@redhat.com>2020-05-28 19:03:10 +0200
commitc44ea3d7d55bc309a078fb01a09994e6098c3ff4 (patch)
tree8baf0379cb1c0001f796c6ef36d4182f7c45ace8 /sc/source/ui/view
parentd19ee8bcd6ae496c2268362fd61e34914f61ac13 (diff)
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 <erack@redhat.com> (cherry picked from commit f4b47f7d335227d037c2c2e9f662724d4b8c73d4) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94964
Diffstat (limited to 'sc/source/ui/view')
-rw-r--r--sc/source/ui/view/tabvwsh4.cxx21
1 files changed, 21 insertions, 0 deletions
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 )
{