summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-04-01 12:09:43 +0100
committerCaolán McNamara <caolanm@redhat.com>2019-04-01 15:58:08 +0200
commit07da6d9ed7ed15c661850eef275157648497181d (patch)
treee107b5aed09dad0d9ffebf8bdb66fdec3d3760aa
parentc6985f1c2a3fd739f4c024bda52aefd061b1a583 (diff)
Resolves: tdf#124440 nospin has no subedit
Change-Id: I4e801ec234e86be935a79c9e29f0e5091904f12e Reviewed-on: https://gerrit.libreoffice.org/70052 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--vcl/source/app/salvtables.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index e19f988adb29..435a8f6f0556 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -3342,7 +3342,10 @@ 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));
+ if (Edit* pEdit = m_xButton->GetSubEdit())
+ pEdit->SetActivateHdl(LINK(this, SalInstanceSpinButton, ActivateHdl));
+ else
+ m_xButton->SetActivateHdl(LINK(this, SalInstanceSpinButton, ActivateHdl));
}
virtual int get_value() const override
@@ -3404,6 +3407,8 @@ public:
{
if (Edit* pEdit = m_xButton->GetSubEdit())
pEdit->SetActivateHdl(Link<Edit&, bool>());
+ else
+ m_xButton->SetActivateHdl(Link<Edit&, bool>());
m_xButton->SetInputHdl(Link<sal_Int64*, TriState>());
m_xButton->SetOutputHdl(Link<Edit&, bool>());
m_xButton->SetLoseFocusHdl(Link<Control&, void>());