[Libreoffice-commits] core.git: vcl/inc vcl/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Sun Feb 2 07:23:48 UTC 2020
vcl/inc/slider.hxx | 7 ++-----
vcl/source/control/slider.cxx | 30 +++++++++++-------------------
2 files changed, 13 insertions(+), 24 deletions(-)
New commits:
commit 5323779173f6e988051b08b5554b7ce5d202d7a2
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Jan 31 21:10:54 2020 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Sun Feb 2 08:23:13 2020 +0100
remove some newly unused code
Change-Id: I67d0053f4852f22886b260791f8d90cc136352cb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87788
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/vcl/inc/slider.hxx b/vcl/inc/slider.hxx
index 6abccfceb527..ea40a214675a 100644
--- a/vcl/inc/slider.hxx
+++ b/vcl/inc/slider.hxx
@@ -51,7 +51,6 @@ private:
bool mbScrollTypeSet;
Link<Slider*,void> maSlideHdl;
- Link<Slider*,void> maEndSlideHdl;
using Control::ImplInitSettings;
using Window::ImplInit;
@@ -64,8 +63,8 @@ private:
void ImplDraw(vcl::RenderContext& rRenderContext);
bool ImplIsPageUp( const Point& rPos );
bool ImplIsPageDown( const Point& rPos );
- long ImplSlide( long nNewPos, bool bCallEndSlide );
- long ImplDoAction( bool bCallEndSlide );
+ long ImplSlide( long nNewPos );
+ long ImplDoAction( );
void ImplDoMouseAction( const Point& rPos, bool bCallAction );
void ImplDoSlide( long nNewPos );
void ImplDoSlideAction( ScrollType eScrollType );
@@ -83,7 +82,6 @@ public:
virtual void DataChanged( const DataChangedEvent& rDCEvt ) override;
void Slide();
- void EndSlide();
void SetRangeMin(long nNewRange);
long GetRangeMin() const { return mnMinRange; }
@@ -101,7 +99,6 @@ public:
Size CalcWindowSizePixel();
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/vcl/source/control/slider.cxx b/vcl/source/control/slider.cxx
index d8d920f0718f..4b14b2e00626 100644
--- a/vcl/source/control/slider.cxx
+++ b/vcl/source/control/slider.cxx
@@ -502,7 +502,7 @@ bool Slider::ImplIsPageDown( const Point& rPos )
return aRect.IsInside( rPos );
}
-long Slider::ImplSlide( long nNewPos, bool bCallEndSlide )
+long Slider::ImplSlide( long nNewPos )
{
long nOldPos = mnThumbPos;
SetThumbPos( nNewPos );
@@ -510,36 +510,34 @@ long Slider::ImplSlide( long nNewPos, bool bCallEndSlide )
if ( nDelta )
{
Slide();
- if ( bCallEndSlide )
- EndSlide();
}
return nDelta;
}
-long Slider::ImplDoAction( bool bCallEndSlide )
+long Slider::ImplDoAction()
{
long nDelta = 0;
switch ( meScrollType )
{
case ScrollType::LineUp:
- nDelta = ImplSlide( mnThumbPos-mnLineSize, bCallEndSlide );
+ nDelta = ImplSlide( mnThumbPos-mnLineSize );
break;
case ScrollType::LineDown:
- nDelta = ImplSlide( mnThumbPos+mnLineSize, bCallEndSlide );
+ nDelta = ImplSlide( mnThumbPos+mnLineSize );
break;
case ScrollType::PageUp:
- nDelta = ImplSlide( mnThumbPos-mnPageSize, bCallEndSlide );
+ nDelta = ImplSlide( mnThumbPos-mnPageSize );
break;
case ScrollType::PageDown:
- nDelta = ImplSlide( mnThumbPos+mnPageSize, bCallEndSlide );
+ nDelta = ImplSlide( mnThumbPos+mnPageSize );
break;
case ScrollType::Set:
- nDelta = ImplSlide( ImplCalcThumbPos( GetPointerPosPixel().X() ), bCallEndSlide );
+ nDelta = ImplSlide( ImplCalcThumbPos( GetPointerPosPixel().X() ) );
break;
default:
break;
@@ -594,7 +592,7 @@ void Slider::ImplDoMouseAction( const Point& rMousePos, bool bCallAction )
if ( bAction )
{
- if ( ImplDoAction( false ) )
+ if ( ImplDoAction() )
{
Update();
Invalidate();
@@ -612,7 +610,7 @@ void Slider::ImplDoSlide( long nNewPos )
return;
meScrollType = ScrollType::Drag;
- ImplSlide( nNewPos, true );
+ ImplSlide( nNewPos );
meScrollType = ScrollType::DontKnow;
}
@@ -624,7 +622,7 @@ void Slider::ImplDoSlideAction( ScrollType eScrollType )
return;
meScrollType = eScrollType;
- ImplDoAction( true );
+ ImplDoAction();
meScrollType = ScrollType::DontKnow;
}
@@ -694,7 +692,7 @@ void Slider::MouseButtonUp( const MouseEvent& )
{
Invalidate(InvalidateFlags::NoChildren | InvalidateFlags::NoErase);
}
- ImplDoAction( true );
+ ImplDoAction();
meScrollType = ScrollType::DontKnow;
}
}
@@ -726,7 +724,6 @@ void Slider::Tracking( const TrackingEvent& rTEvt )
Update();
}
- EndSlide();
meScrollType = ScrollType::DontKnow;
}
else
@@ -889,11 +886,6 @@ void Slider::Slide()
maSlideHdl.Call( this );
}
-void Slider::EndSlide()
-{
- maEndSlideHdl.Call( this );
-}
-
void Slider::SetRangeMin(long nNewRange)
{
SetRange(Range(nNewRange, GetRangeMax()));
More information about the Libreoffice-commits
mailing list