[Libreoffice-commits] core.git: 2 commits - avmedia/inc avmedia/source include/svx include/vcl svx/source vcl/source
Noel Grandin
noelgrandin at gmail.com
Thu Sep 3 23:31:25 PDT 2015
avmedia/inc/mediacontrol.hxx | 6 +++---
avmedia/source/framework/mediacontrol.cxx | 12 +++---------
include/svx/sidebar/AreaPropertyPanelBase.hxx | 2 +-
include/vcl/slider.hxx | 8 ++++----
include/vcl/spin.hxx | 2 --
svx/source/sidebar/area/AreaPropertyPanelBase.cxx | 4 +---
svx/source/sidebar/shadow/ShadowPropertyPanel.cxx | 3 +--
svx/source/sidebar/shadow/ShadowPropertyPanel.hxx | 2 +-
vcl/source/control/spinbtn.cxx | 4 ++--
9 files changed, 16 insertions(+), 27 deletions(-)
New commits:
commit 5338d2abe4078626d2cfa38cde99dfa1d4eb2f6b
Author: Noel Grandin <noelgrandin at gmail.com>
Date: Wed Sep 2 17:53:43 2015 +0200
convert Link<> to typed
Change-Id: I4d6c37e82a5b96c09b989df248f94f0afe228b46
Reviewed-on: https://gerrit.libreoffice.org/18305
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
diff --git a/avmedia/inc/mediacontrol.hxx b/avmedia/inc/mediacontrol.hxx
index 9e91b1b..521cd98 100644
--- a/avmedia/inc/mediacontrol.hxx
+++ b/avmedia/inc/mediacontrol.hxx
@@ -79,9 +79,9 @@ private:
void implUpdateTimeField( double fCurTime );
Image implGetImage( sal_Int32 nImageId ) const;
- DECL_LINK( implTimeHdl, Slider* );
- DECL_LINK( implTimeEndHdl, Slider* );
- DECL_LINK( implVolumeHdl, Slider* );
+ DECL_LINK_TYPED( implTimeHdl, Slider*, void );
+ DECL_LINK_TYPED( implTimeEndHdl, Slider*, void );
+ DECL_LINK_TYPED( implVolumeHdl, Slider*, void );
DECL_LINK_TYPED( implSelectHdl, ToolBox*, void );
DECL_LINK( implZoomSelectHdl, ListBox* );
DECL_LINK_TYPED(implTimeoutHdl, Idle *, void);
diff --git a/avmedia/source/framework/mediacontrol.cxx b/avmedia/source/framework/mediacontrol.cxx
index 137a795..e5b58a8c 100644
--- a/avmedia/source/framework/mediacontrol.cxx
+++ b/avmedia/source/framework/mediacontrol.cxx
@@ -439,18 +439,16 @@ Image MediaControl::implGetImage( sal_Int32 nImageId ) const
-IMPL_LINK( MediaControl, implTimeHdl, Slider*, p )
+IMPL_LINK_TYPED( MediaControl, implTimeHdl, Slider*, p, void )
{
mbLocked = true;
maIdle.Stop();
implUpdateTimeField( p->GetThumbPos() * maItem.getDuration() / AVMEDIA_TIME_RANGE );
-
- return 0;
}
-IMPL_LINK( MediaControl, implTimeEndHdl, Slider*, p )
+IMPL_LINK_TYPED( MediaControl, implTimeEndHdl, Slider*, p, void )
{
MediaItem aExecItem;
@@ -459,21 +457,17 @@ IMPL_LINK( MediaControl, implTimeEndHdl, Slider*, p )
update();
maIdle.Start();
mbLocked = false;
-
- return 0;
}
-IMPL_LINK( MediaControl, implVolumeHdl, Slider*, p )
+IMPL_LINK_TYPED( MediaControl, implVolumeHdl, Slider*, p, void )
{
MediaItem aExecItem;
aExecItem.setVolumeDB( static_cast< sal_Int16 >( p->GetThumbPos() ) );
execute( aExecItem );
update();
-
- return 0;
}
diff --git a/include/svx/sidebar/AreaPropertyPanelBase.hxx b/include/svx/sidebar/AreaPropertyPanelBase.hxx
index c12842f..47fd4b4 100644
--- a/include/svx/sidebar/AreaPropertyPanelBase.hxx
+++ b/include/svx/sidebar/AreaPropertyPanelBase.hxx
@@ -164,7 +164,7 @@ protected:
DECL_LINK(SelectFillAttrHdl, ListBox* );
DECL_LINK(ChangeTrgrTypeHdl_Impl, void*);
DECL_LINK(ModifyTransparentHdl_Impl, void*);
- DECL_LINK(ModifyTransSliderHdl, void*);
+ DECL_LINK_TYPED(ModifyTransSliderHdl, Slider*, void);
// for transparency gradient
VclPtr<PopupControl> CreateTransparencyGradientControl (PopupContainer* pParent);
diff --git a/include/vcl/slider.hxx b/include/vcl/slider.hxx
index 10c7e9b..064d475 100644
--- a/include/vcl/slider.hxx
+++ b/include/vcl/slider.hxx
@@ -55,8 +55,8 @@ private:
VclPtr<NumericField> mpLinkedField;
- Link<> maSlideHdl;
- Link<> maEndSlideHdl;
+ Link<Slider*,void> maSlideHdl;
+ Link<Slider*,void> maEndSlideHdl;
DECL_LINK(LinkedFieldModifyHdl, NumericField*);
@@ -112,8 +112,8 @@ public:
void SetLinkedField(VclPtr<NumericField> pField);
- void SetSlideHdl( const Link<>& rLink ) { maSlideHdl = rLink; }
- void SetEndSlideHdl( const Link<>& rLink ) { maEndSlideHdl = rLink; }
+ void SetSlideHdl( const Link<Slider*,void>& rLink ) { maSlideHdl = rLink; }
+ void SetEndSlideHdl( const Link<Slider*,void>& rLink ) { maEndSlideHdl = rLink; }
};
#endif // INCLUDED_VCL_SLIDER_HXX
diff --git a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
index 46a057d..d5ef4c0 100644
--- a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
+++ b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
@@ -1148,14 +1148,12 @@ void AreaPropertyPanelBase::Update()
}
}
-IMPL_LINK_NOARG(AreaPropertyPanelBase, ModifyTransSliderHdl)
+IMPL_LINK_NOARG_TYPED(AreaPropertyPanelBase, ModifyTransSliderHdl, Slider*, void)
{
const sal_uInt16 nVal = mpSldTransparent->GetThumbPos();
SetTransparency(nVal);
const XFillTransparenceItem aLinearItem(nVal);
setFillTransparence(aLinearItem);
-
- return 0L;
}
IMPL_LINK_TYPED( AreaPropertyPanelBase, ClickTrGrHdl_Impl, ToolBox*, pToolBox, void )
diff --git a/svx/source/sidebar/shadow/ShadowPropertyPanel.cxx b/svx/source/sidebar/shadow/ShadowPropertyPanel.cxx
index 31e5b33..8670170 100644
--- a/svx/source/sidebar/shadow/ShadowPropertyPanel.cxx
+++ b/svx/source/sidebar/shadow/ShadowPropertyPanel.cxx
@@ -166,13 +166,12 @@ IMPL_LINK_NOARG(ShadowPropertyPanel, ModifyShadowTransMetricHdl)
return 0;
}
-IMPL_LINK_NOARG(ShadowPropertyPanel, ModifyShadowTransSliderHdl)
+IMPL_LINK_NOARG_TYPED(ShadowPropertyPanel, ModifyShadowTransSliderHdl, Slider*, void)
{
sal_uInt16 nVal = mpShadowTransSlider->GetThumbPos();
SetTransparencyValue(nVal);
SdrPercentItem aItem( makeSdrShadowTransparenceItem(nVal) );
GetBindings()->GetDispatcher()->Execute(SID_ATTR_SHADOW_TRANSPARENCE, SfxCallMode::RECORD, &aItem, 0L);
- return 0;
}
IMPL_LINK_NOARG(ShadowPropertyPanel, ModifyShadowDistanceHdl)
diff --git a/svx/source/sidebar/shadow/ShadowPropertyPanel.hxx b/svx/source/sidebar/shadow/ShadowPropertyPanel.hxx
index 2ae22e1..da12099 100644
--- a/svx/source/sidebar/shadow/ShadowPropertyPanel.hxx
+++ b/svx/source/sidebar/shadow/ShadowPropertyPanel.hxx
@@ -85,7 +85,7 @@ private:
DECL_LINK(ModifyShadowColorHdl, void*);
DECL_LINK(ModifyShadowTransMetricHdl, void*);
DECL_LINK(ModifyShadowDistanceHdl, void*);
- DECL_LINK(ModifyShadowTransSliderHdl, void*);
+ DECL_LINK_TYPED(ModifyShadowTransSliderHdl, Slider*, void);
};
}
}
commit bb1dcd35f350e2375f6a8a9d27b02fb5784a476f
Author: Noel Grandin <noelgrandin at gmail.com>
Date: Wed Sep 2 16:10:47 2015 +0200
remove unused Link<> fields
Change-Id: I81401ae6d1b1e95375bf4a5792b3b83189be5683
Reviewed-on: https://gerrit.libreoffice.org/18304
Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
Tested-by: Noel Grandin <noelgrandin at gmail.com>
diff --git a/include/vcl/spin.hxx b/include/vcl/spin.hxx
index 69e6d03..944a23b 100644
--- a/include/vcl/spin.hxx
+++ b/include/vcl/spin.hxx
@@ -43,8 +43,6 @@ private:
bool mbInitialDown : 1;
bool mbHorz : 1;
bool mbUpperIsFocused : 1;
- Link<> maUpHdlLink;
- Link<> maDownHdlLink;
long mnMinRange;
long mnMaxRange;
long mnValue;
diff --git a/vcl/source/control/spinbtn.cxx b/vcl/source/control/spinbtn.cxx
index 4651f9b..a675f01 100644
--- a/vcl/source/control/spinbtn.cxx
+++ b/vcl/source/control/spinbtn.cxx
@@ -81,7 +81,7 @@ void SpinButton::Up()
ImplMoveFocus(true);
}
- ImplCallEventListenersAndHandler(VCLEVENT_SPINBUTTON_UP, [this] () { maUpHdlLink.Call(this); } );
+ ImplCallEventListenersAndHandler(VCLEVENT_SPINBUTTON_UP, nullptr );
}
void SpinButton::Down()
@@ -94,7 +94,7 @@ void SpinButton::Down()
ImplMoveFocus(false);
}
- ImplCallEventListenersAndHandler(VCLEVENT_SPINBUTTON_DOWN, [this] () { maDownHdlLink.Call(this); } );
+ ImplCallEventListenersAndHandler(VCLEVENT_SPINBUTTON_DOWN, nullptr );
}
void SpinButton::Resize()
More information about the Libreoffice-commits
mailing list