summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>2021-03-03 07:47:43 +0100
committerThorsten Behrens <thorsten.behrens@allotropia.de>2021-03-16 09:54:34 +0100
commit5597f149a27dae43cbc9dfc469689bd6e4f03a17 (patch)
tree8138968dec225cb3eaf5bdcca7b0eb66be36137d /sc
parent184f118ae3eacf88c535c2ab5c0754870f6e2fa8 (diff)
tdf#139804 Focus form controls inside document with Alt-<Mnemonic>
Change-Id: I710a23a53ca0eb256a477a78ce1b7ae01129f717 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111865 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de> (cherry picked from commit 67ad205404211a2ae17c430a17ede6e9d04d0b7e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112555 Tested-by: Thorsten Behrens <thorsten.behrens@allotropia.de> Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/inc/gridwin.hxx2
-rw-r--r--sc/source/ui/view/gridwin.cxx2
-rw-r--r--sc/source/ui/view/gridwin3.cxx6
3 files changed, 7 insertions, 3 deletions
diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx
index 1775114c27c8..5e5760d30f62 100644
--- a/sc/source/ui/inc/gridwin.hxx
+++ b/sc/source/ui/inc/gridwin.hxx
@@ -247,7 +247,7 @@ class ScGridWindow : public vcl::Window, public DropTargetHelper, public DragSou
bool DrawMouseButtonDown(const MouseEvent& rMEvt);
bool DrawMouseButtonUp(const MouseEvent& rMEvt);
bool DrawMouseMove(const MouseEvent& rMEvt);
- bool DrawKeyInput(const KeyEvent& rKEvt);
+ bool DrawKeyInput(const KeyEvent& rKEvt, vcl::Window* pWin);
bool DrawCommand(const CommandEvent& rCEvt);
bool DrawHasMarkedObj();
void DrawEndAction();
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index b2bd86673130..182d7bf4d9b3 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -3199,7 +3199,7 @@ void ScGridWindow::KeyInput(const KeyEvent& rKEvt)
if (pViewData->GetDocShell()->GetProgress())
return;
- if (DrawKeyInput(rKEvt))
+ if (DrawKeyInput(rKEvt, this))
{
const vcl::KeyCode& rLclKeyCode = rKEvt.GetKeyCode();
if (rLclKeyCode.GetCode() == KEY_DOWN
diff --git a/sc/source/ui/view/gridwin3.cxx b/sc/source/ui/view/gridwin3.cxx
index 337bb7a72beb..a7ac09421a91 100644
--- a/sc/source/ui/view/gridwin3.cxx
+++ b/sc/source/ui/view/gridwin3.cxx
@@ -151,10 +151,14 @@ bool ScGridWindow::DrawCommand(const CommandEvent& rCEvt)
return false;
}
-bool ScGridWindow::DrawKeyInput(const KeyEvent& rKEvt)
+bool ScGridWindow::DrawKeyInput(const KeyEvent& rKEvt, vcl::Window* pWin)
{
ScDrawView* pDrView = pViewData->GetScDrawView();
FuPoor* pDraw = pViewData->GetView()->GetDrawFuncPtr();
+
+ if (pDrView && pDrView->KeyInput(rKEvt, pWin))
+ return true;
+
if (pDrView && pDraw && !pViewData->IsRefMode())
{
pDraw->SetWindow( this );