diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-04-23 10:42:58 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-04-23 14:27:51 +0200 |
commit | 55e2c6c648ed94664903c0c6f53922d03e76b7c1 (patch) | |
tree | 5e11a99618fe7a61043c12a0cbceaf74f853e26e /starmath | |
parent | c7f64973c0ac985c9506f660d93d0762d898f3bc (diff) |
Related: tdf#140659 designate which widget to get default focus
Change-Id: I8c8200756a7120db9a9c946889a30f6c549fd617
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114536
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'starmath')
-rw-r--r-- | starmath/inc/ElementsDockingWindow.hxx | 1 | ||||
-rw-r--r-- | starmath/source/ElementsDockingWindow.cxx | 7 |
2 files changed, 8 insertions, 0 deletions
diff --git a/starmath/inc/ElementsDockingWindow.hxx b/starmath/inc/ElementsDockingWindow.hxx index bf4a8f056dd4..249af40b1461 100644 --- a/starmath/inc/ElementsDockingWindow.hxx +++ b/starmath/inc/ElementsDockingWindow.hxx @@ -185,6 +185,7 @@ public: virtual void EndDocking( const tools::Rectangle& rReactangle, bool bFloatMode) override; virtual void ToggleFloatingMode() override; + virtual void GetFocus() override; void setSmSyntaxVersion(sal_uInt16 nSmSyntaxVersion); }; diff --git a/starmath/source/ElementsDockingWindow.cxx b/starmath/source/ElementsDockingWindow.cxx index 29d4aef5a646..cd03a7f7d338 100644 --- a/starmath/source/ElementsDockingWindow.cxx +++ b/starmath/source/ElementsDockingWindow.cxx @@ -1211,6 +1211,13 @@ SmElementsDockingWindow::SmElementsDockingWindow(SfxBindings* pInputBindings, Sf mxElementsControl->SetSelectHdl(LINK(this, SmElementsDockingWindow, SelectClickHandler)); } +void SmElementsDockingWindow::GetFocus() +{ + SfxDockingWindow::GetFocus(); + if (mxElementListBox) + mxElementListBox->grab_focus(); +} + SmElementsDockingWindow::~SmElementsDockingWindow () { disposeOnce(); |