diff options
author | Jim Raykowski <raykowj@gmail.com> | 2018-02-08 18:27:56 -0900 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2018-03-14 00:33:45 +0100 |
commit | 6d2f6f2f01a4fbf244ba16c355d2f43a2ddf671e (patch) | |
tree | 72414e6a66dfe6b561e4dda7d1fab6d97c45f859 /sw/source/uibase/cctrl | |
parent | 32f42d093d4408666151d03f04823e2bb39e46cd (diff) |
tdf#115565 Change tab key behavior to navigate out of gotopage control
...in Writer Sidebar Navigator deck helper toolbox
Change-Id: Ieeabcb30f421aa0ce2a5f841e45fff5f57358215
Reviewed-on: https://gerrit.libreoffice.org/50295
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'sw/source/uibase/cctrl')
-rw-r--r-- | sw/source/uibase/cctrl/actctrl.cxx | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/sw/source/uibase/cctrl/actctrl.cxx b/sw/source/uibase/cctrl/actctrl.cxx index 7e97dab5ce97..0c7afd70a8f6 100644 --- a/sw/source/uibase/cctrl/actctrl.cxx +++ b/sw/source/uibase/cctrl/actctrl.cxx @@ -20,6 +20,7 @@ #include <comphelper/string.hxx> #include <vcl/builderfactory.hxx> #include <actctrl.hxx> +#include <vcl/toolbox.hxx> bool NumEditAction::EventNotify( NotifyEvent& rNEvt ) { @@ -29,14 +30,24 @@ bool NumEditAction::EventNotify( NotifyEvent& rNEvt ) { const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); const vcl::KeyCode aKeyCode = pKEvt->GetKeyCode(); + const sal_uInt16 aCode = aKeyCode.GetCode(); const sal_uInt16 nModifier = aKeyCode.GetModifier(); - if( aKeyCode.GetCode() == KEY_RETURN && + if( aCode == KEY_RETURN && !nModifier) { aActionLink.Call( *this ); bHandled = true; } - + else + { + vcl::Window* pParent = GetParent(); + if ( pParent != nullptr && aCode == KEY_TAB && + pParent->GetType() == WindowType::TOOLBOX ) + { + static_cast<ToolBox*>(pParent)->ChangeHighlightUpDn( aKeyCode.IsShift() ); + bHandled = true; + } + } } if(!bHandled) NumericField::EventNotify(rNEvt); |