[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Thu Jan 10 11:55:02 UTC 2019
vcl/source/app/salvtables.cxx | 11 +++++++++++
1 file changed, 11 insertions(+)
New commits:
commit 3f1e853b7b6d63f4e6fea70a5ef0aa94668ab16e
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Jan 9 13:05:16 2019 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Jan 10 12:54:38 2019 +0100
Resolves: tdf#122348 make return in spinbutton signal value change
before going on to close the dialog afterwards
Change-Id: I9764512a944e52b0d2bff2d11c8cf74c057e2623
Reviewed-on: https://gerrit.libreoffice.org/66025
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index eec2249d5a71..6ba7c5f36493 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -2503,6 +2503,7 @@ private:
DECL_LINK(LoseFocusHdl, Control&, void);
DECL_LINK(OutputHdl, Edit&, bool);
DECL_LINK(InputHdl, sal_Int64*, TriState);
+ DECL_LINK(ActivateHdl, Edit&, bool);
double toField(int nValue) const
{
@@ -2525,6 +2526,7 @@ public:
m_xButton->SetLoseFocusHdl(LINK(this, SalInstanceSpinButton, LoseFocusHdl));
m_xButton->SetOutputHdl(LINK(this, SalInstanceSpinButton, OutputHdl));
m_xButton->SetInputHdl(LINK(this, SalInstanceSpinButton, InputHdl));
+ m_xButton->GetSubEdit()->SetActivateHdl(LINK(this, SalInstanceSpinButton, ActivateHdl));
}
virtual int get_value() const override
@@ -2584,6 +2586,8 @@ public:
virtual ~SalInstanceSpinButton() override
{
+ if (Edit* pEdit = m_xButton->GetSubEdit())
+ pEdit->SetActivateHdl(Link<Edit&, bool>());
m_xButton->SetInputHdl(Link<sal_Int64*, TriState>());
m_xButton->SetOutputHdl(Link<Edit&, bool>());
m_xButton->SetLoseFocusHdl(Link<Control&, void>());
@@ -2592,6 +2596,13 @@ public:
}
};
+IMPL_LINK_NOARG(SalInstanceSpinButton, ActivateHdl, Edit&, bool)
+{
+ // tdf#122348 return pressed to end dialog
+ signal_value_changed();
+ return false;
+}
+
IMPL_LINK_NOARG(SalInstanceSpinButton, UpDownHdl, SpinField&, void)
{
signal_value_changed();
More information about the Libreoffice-commits
mailing list