[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - formula/source include/formula
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Fri Nov 22 17:02:52 UTC 2019
formula/source/ui/dlg/ControlHelper.hxx | 2 +-
formula/source/ui/dlg/funcutl.cxx | 13 +++++++++----
include/formula/funcutl.hxx | 6 ++++--
3 files changed, 14 insertions(+), 7 deletions(-)
New commits:
commit 1efb579ec5c8524aef27da921ed192f5ae87d27c
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Nov 19 11:38:40 2019 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Nov 22 18:02:12 2019 +0100
up/down in ArgEdit doesn't do anything
but it should cycle through the arguments
Reviewed-on: https://gerrit.libreoffice.org/83192
Tested-by: Jenkins
Reviewed-by: Eike Rathke <erack at redhat.com>
(cherry picked from commit 7a73a586571a8242d9a49051adc62ef7c1c43e86)
Change-Id: Ifa398039e77d536a0df021b1a18e06d6df673980
Reviewed-on: https://gerrit.libreoffice.org/83214
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/formula/source/ui/dlg/ControlHelper.hxx b/formula/source/ui/dlg/ControlHelper.hxx
index 5e3811f90fa6..a96ca8a04a81 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) override;
private:
ArgEdit* pEdPrev;
diff --git a/formula/source/ui/dlg/funcutl.cxx b/formula/source/ui/dlg/funcutl.cxx
index b1a37292728f..adaca20b8695 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
@@ -275,7 +275,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 ) );
}
@@ -333,7 +333,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)
diff --git a/include/formula/funcutl.hxx b/include/formula/funcutl.hxx
index 7809db0b91a8..a33c1f6406b5 100644
--- a/include/formula/funcutl.hxx
+++ b/include/formula/funcutl.hxx
@@ -49,15 +49,17 @@ private:
DECL_LINK( UpdateHdl, Timer*, void );
protected:
- DECL_LINK(KeyInput, const KeyEvent&, bool);
+ DECL_LINK(KeyInputHdl, const KeyEvent&, bool);
DECL_LINK(GetFocus, weld::Widget&, void);
DECL_LINK(LoseFocus, weld::Widget&, void);
DECL_LINK(Modify, weld::Entry&, void);
+ virtual bool KeyInput(const KeyEvent& rKEvt);
+
public:
RefEdit(std::unique_ptr<weld::Entry> xControl);
weld::Entry* GetWidget() const { return xEntry.get(); }
- ~RefEdit();
+ virtual ~RefEdit();
void SetRefString( const OUString& rStr );
More information about the Libreoffice-commits
mailing list