[Libreoffice-commits] core.git: sc/source sw/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Mon Jun 15 16:07:12 UTC 2020
sc/source/ui/view/gridwin.cxx | 4 ++++
sw/source/core/crsr/DropDownFormFieldButton.cxx | 13 +++++++++++++
2 files changed, 17 insertions(+)
New commits:
commit 1067bf8a78a03b67f769761753b5a7226f611f9f
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Jun 15 14:55:28 2020 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Jun 15 18:06:35 2020 +0200
consume tab key press in single-widget dropdown
Change-Id: Ie23fa35d29c20910514f3aaad095521f1588702b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96367
Tested-by: Caolán McNamara <caolanm at redhat.com>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 1f49e48a68c4..1d3d189e92e3 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -278,6 +278,10 @@ IMPL_LINK(ScFilterListBox, KeyInputHdl, const KeyEvent&, rKeyEvent, bool)
bDone = true;
}
+ // nowhere to tab to
+ if (aCode.GetCode() == KEY_TAB)
+ bDone = true;
+
return bDone;
}
diff --git a/sw/source/core/crsr/DropDownFormFieldButton.cxx b/sw/source/core/crsr/DropDownFormFieldButton.cxx
index 10664a027bba..9d7453dae5ff 100644
--- a/sw/source/core/crsr/DropDownFormFieldButton.cxx
+++ b/sw/source/core/crsr/DropDownFormFieldButton.cxx
@@ -10,6 +10,7 @@
#include <DropDownFormFieldButton.hxx>
#include <edtwin.hxx>
#include <bookmrk.hxx>
+#include <vcl/event.hxx>
#include <vcl/floatwin.hxx>
#include <vcl/InterimItemWindow.hxx>
#include <vcl/settings.hxx>
@@ -53,6 +54,7 @@ private:
sw::mark::IFieldmark* m_pFieldmark;
DECL_LINK(MyListBoxHandler, weld::TreeView&, bool);
+ DECL_STATIC_LINK(SwFieldDialog, KeyInputHdl, const KeyEvent&, bool);
public:
SwFieldDialog(SwEditWin* parent, sw::mark::IFieldmark* fieldBM, long nMinListWidth);
@@ -109,6 +111,7 @@ SwFieldDialog::SwFieldDialog(SwEditWin* parent, sw::mark::IFieldmark* fieldBM, l
lbSize.setWidth(std::max(lbSize.Width(), nMinListWidth));
m_xListBox->SetSizePixel(lbSize);
rTreeView.connect_row_activated(LINK(this, SwFieldDialog, MyListBoxHandler));
+ rTreeView.connect_key_press(LINK(this, SwFieldDialog, KeyInputHdl));
m_xListBox->Show();
rTreeView.grab_focus();
@@ -147,6 +150,16 @@ IMPL_LINK(SwFieldDialog, MyListBoxHandler, weld::TreeView&, rBox, bool)
return true;
}
+IMPL_STATIC_LINK(SwFieldDialog, KeyInputHdl, const KeyEvent&, rKeyEvent, bool)
+{
+ bool bDone = false;
+ vcl::KeyCode aCode = rKeyEvent.GetKeyCode();
+ // nowhere to tab to
+ if (aCode.GetCode() == KEY_TAB)
+ bDone = true;
+ return bDone;
+}
+
DropDownFormFieldButton::DropDownFormFieldButton(SwEditWin* pEditWin,
sw::mark::DropDownFieldmark& rFieldmark)
: FormFieldButton(pEditWin, rFieldmark)
More information about the Libreoffice-commits
mailing list