[Libreoffice-commits] core.git: include/vcl vcl/source
Caolán McNamara
caolanm at redhat.com
Wed Sep 13 10:51:39 UTC 2017
include/vcl/slider.hxx | 2 --
include/vcl/spinfld.hxx | 4 ----
vcl/source/control/slider.cxx | 24 ------------------------
vcl/source/control/spinfld.cxx | 4 ++--
4 files changed, 2 insertions(+), 32 deletions(-)
New commits:
commit 53548b8d74a34aa30b36b44f6e41f5949da9681d
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Sep 13 09:23:29 2017 +0100
drop first/last link callback
of course this stuff is exposed through uno through
com::sun::star::awt::XSpinListener so VclEventId::SpinfieldFirst
and VclEventId::SpinfieldLast have to be retained
Change-Id: Icbf31cc8c62f2bc3bc0ccf966c0fd4f5c43dcf6b
Reviewed-on: https://gerrit.libreoffice.org/42231
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/include/vcl/slider.hxx b/include/vcl/slider.hxx
index 879340fc387f..426727c15ae7 100644
--- a/include/vcl/slider.hxx
+++ b/include/vcl/slider.hxx
@@ -57,8 +57,6 @@ private:
Link<Slider*,void> maEndSlideHdl;
DECL_LINK(LinkedFieldModifyHdl, Edit&, void);
- DECL_LINK(LinkedFieldLoseFocusHdl, Control&, void);
- DECL_LINK(LinkedFieldSpinnerHdl, SpinField&, void);
using Control::ImplInitSettings;
using Window::ImplInit;
diff --git a/include/vcl/spinfld.hxx b/include/vcl/spinfld.hxx
index 6e3a2c35811b..02df5ded9066 100644
--- a/include/vcl/spinfld.hxx
+++ b/include/vcl/spinfld.hxx
@@ -53,8 +53,6 @@ public:
void SetUpHdl( const Link<SpinField&,void>& rLink ) { maUpHdlLink = rLink; }
void SetDownHdl( const Link<SpinField&,void>& rLink ) { maDownHdlLink = rLink; }
const Link<SpinField&,void>& GetDownHdl() const { return maDownHdlLink; }
- void SetFirstHdl( const Link<SpinField&,void>& rLink ) { maFirstHdlLink = rLink; }
- void SetLastHdl( const Link<SpinField&,void>& rLink ) { maLastHdlLink = rLink; }
virtual Size CalcMinimumSize() const override;
virtual Size CalcMinimumSizeForText(const OUString &rString) const override;
@@ -87,8 +85,6 @@ private:
AutoTimer maRepeatTimer;
Link<SpinField&,void> maUpHdlLink;
Link<SpinField&,void> maDownHdlLink;
- Link<SpinField&,void> maFirstHdlLink;
- Link<SpinField&,void> maLastHdlLink;
bool mbRepeat:1,
mbSpin:1,
mbInitialUp:1,
diff --git a/vcl/source/control/slider.cxx b/vcl/source/control/slider.cxx
index 102e10aae82a..61075e8b89e4 100644
--- a/vcl/source/control/slider.cxx
+++ b/vcl/source/control/slider.cxx
@@ -815,36 +815,12 @@ void Slider::Resize()
void Slider::SetLinkedField(VclPtr<NumericField> const & pField)
{
if (mpLinkedField)
- {
mpLinkedField->SetModifyHdl(Link<Edit&,void>());
- mpLinkedField->SetUpHdl(Link<SpinField&,void>());
- mpLinkedField->SetDownHdl(Link<SpinField&,void>());
- mpLinkedField->SetFirstHdl(Link<SpinField&,void>());
- mpLinkedField->SetLastHdl(Link<SpinField&,void>());
- mpLinkedField->SetLoseFocusHdl(Link<Control&,void>());
- }
mpLinkedField = pField;
if (mpLinkedField)
- {
mpLinkedField->SetModifyHdl(LINK(this, Slider, LinkedFieldModifyHdl));
- mpLinkedField->SetUpHdl(LINK(this, Slider, LinkedFieldSpinnerHdl));
- mpLinkedField->SetDownHdl(LINK(this, Slider, LinkedFieldSpinnerHdl));
- mpLinkedField->SetFirstHdl(LINK(this, Slider, LinkedFieldSpinnerHdl));
- mpLinkedField->SetLastHdl(LINK(this, Slider, LinkedFieldSpinnerHdl));
- mpLinkedField->SetLoseFocusHdl(LINK(this, Slider, LinkedFieldLoseFocusHdl));
- }
}
-IMPL_LINK_NOARG(Slider, LinkedFieldSpinnerHdl, SpinField&, void)
-{
- if (mpLinkedField)
- SetThumbPos(mpLinkedField->GetValue());
-}
-IMPL_LINK_NOARG(Slider, LinkedFieldLoseFocusHdl, Control&, void)
-{
- if (mpLinkedField)
- SetThumbPos(mpLinkedField->GetValue());
-}
IMPL_LINK_NOARG(Slider, LinkedFieldModifyHdl, Edit&, void)
{
if (mpLinkedField)
diff --git a/vcl/source/control/spinfld.cxx b/vcl/source/control/spinfld.cxx
index 0459160a9b03..37f88ea6b252 100644
--- a/vcl/source/control/spinfld.cxx
+++ b/vcl/source/control/spinfld.cxx
@@ -366,12 +366,12 @@ void SpinField::Down()
void SpinField::First()
{
- ImplCallEventListenersAndHandler( VclEventId::SpinfieldFirst, [this] () { maFirstHdlLink.Call(*this); } );
+ ImplCallEventListenersAndHandler(VclEventId::SpinfieldFirst, nullptr);
}
void SpinField::Last()
{
- ImplCallEventListenersAndHandler( VclEventId::SpinfieldLast, [this] () { maLastHdlLink.Call(*this); } );
+ ImplCallEventListenersAndHandler(VclEventId::SpinfieldLast, nullptr);
}
void SpinField::MouseButtonDown( const MouseEvent& rMEvt )
More information about the Libreoffice-commits
mailing list