summaryrefslogtreecommitdiff
path: root/formula
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-11-19 11:38:40 +0000
committerEike Rathke <erack@redhat.com>2019-11-19 15:43:36 +0100
commit7a73a586571a8242d9a49051adc62ef7c1c43e86 (patch)
tree4f39abeb0faacd1735f80e67f7835df2ed36419a /formula
parentddd2a419c56d8c12b4d10376ecfdde9d87d276e3 (diff)
up/down in ArgEdit doesn't do anything
but it should cycle through the arguments Change-Id: Ifa398039e77d536a0df021b1a18e06d6df673980 Reviewed-on: https://gerrit.libreoffice.org/83192 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'formula')
-rw-r--r--formula/source/ui/dlg/ControlHelper.hxx2
-rw-r--r--formula/source/ui/dlg/funcutl.cxx13
2 files changed, 10 insertions, 5 deletions
diff --git a/formula/source/ui/dlg/ControlHelper.hxx b/formula/source/ui/dlg/ControlHelper.hxx
index 3fb82de8bac1..960935573acc 100644
--- a/formula/source/ui/dlg/ControlHelper.hxx
+++ b/formula/source/ui/dlg/ControlHelper.hxx
@@ -38,7 +38,7 @@ public:
ParaWin& rParaWin, sal_uInt16 nArgCount);
protected:
- DECL_LINK(KeyInputHdl, const KeyEvent&, bool);
+ virtual bool KeyInput(const KeyEvent& rKEvt);
private:
ArgEdit* pEdPrev;
diff --git a/formula/source/ui/dlg/funcutl.cxx b/formula/source/ui/dlg/funcutl.cxx
index 21ab45c0ee6b..491bab8c2769 100644
--- a/formula/source/ui/dlg/funcutl.cxx
+++ b/formula/source/ui/dlg/funcutl.cxx
@@ -55,7 +55,7 @@ void ArgEdit::Init(ArgEdit* pPrevEdit, ArgEdit* pNextEdit,
}
// Cursor control for Edit Fields in Argument Dialog
-IMPL_LINK(ArgEdit, KeyInputHdl, const KeyEvent&, rKEvt, bool)
+bool ArgEdit::KeyInput(const KeyEvent& rKEvt)
{
vcl::KeyCode aCode = rKEvt.GetKeyCode();
bool bUp = (aCode.GetCode() == KEY_UP);
@@ -127,7 +127,7 @@ IMPL_LINK(ArgEdit, KeyInputHdl, const KeyEvent&, rKEvt, bool)
}
return true;
}
- return false;
+ return RefEdit::KeyInput(rKEvt);
}
// class ArgInput
@@ -272,7 +272,7 @@ RefEdit::RefEdit(std::unique_ptr<weld::Entry> xControl)
{
xEntry->connect_focus_in(LINK(this, RefEdit, GetFocus));
xEntry->connect_focus_out(LINK(this, RefEdit, LoseFocus));
- xEntry->connect_key_press(LINK(this, RefEdit, KeyInput));
+ xEntry->connect_key_press(LINK(this, RefEdit, KeyInputHdl));
xEntry->connect_changed(LINK(this, RefEdit, Modify));
aIdle.SetInvokeHandler( LINK( this, RefEdit, UpdateHdl ) );
}
@@ -330,7 +330,12 @@ IMPL_LINK_NOARG(RefEdit, Modify, weld::Entry&, void)
pAnyRefDlg->HideReference();
}
-IMPL_LINK(RefEdit, KeyInput, const KeyEvent&, rKEvt, bool)
+IMPL_LINK(RefEdit, KeyInputHdl, const KeyEvent&, rKEvt, bool)
+{
+ return KeyInput(rKEvt);
+}
+
+bool RefEdit::KeyInput(const KeyEvent& rKEvt)
{
const vcl::KeyCode& rKeyCode = rKEvt.GetKeyCode();
if (pAnyRefDlg && !rKeyCode.GetModifier() && rKeyCode.GetCode() == KEY_F2)