From 5a79c78338b0f6a568947d5623a0c93a5e9b2aa3 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 7 Aug 2020 21:44:38 +0200 Subject: loplugin:virtualdead Change-Id: Ib2a4ebad50e9c6f0d71a9ac3a1bc8ac11e775496 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100378 Tested-by: Jenkins Reviewed-by: Noel Grandin --- vcl/inc/svimpbox.hxx | 5 +---- vcl/source/treelist/iconviewimpl.cxx | 6 ------ vcl/source/treelist/svimpbox.cxx | 35 ----------------------------------- vcl/source/treelist/treelistbox.cxx | 5 ----- 4 files changed, 1 insertion(+), 50 deletions(-) (limited to 'vcl') diff --git a/vcl/inc/svimpbox.hxx b/vcl/inc/svimpbox.hxx index fb88701de835..cb52069ca41b 100644 --- a/vcl/inc/svimpbox.hxx +++ b/vcl/inc/svimpbox.hxx @@ -59,7 +59,6 @@ public: // Flags for nFlag enum class LBoxFlags { NONE = 0x0000, - InScrolling = 0x0001, DeselectAll = 0x0002, StartEditTimer = 0x0004, // MAC only IgnoreSelect = 0x0008, @@ -73,7 +72,7 @@ enum class LBoxFlags { }; namespace o3tl { - template<> struct typed_flags : is_typed_flags {}; + template<> struct typed_flags : is_typed_flags {}; } #define NODE_BMP_TABDIST_NOTVALID -2000000 @@ -215,8 +214,6 @@ protected: tools::Rectangle GetVisibleArea() const; void SetCursor( SvTreeListEntry* pEntry, bool bForceNoSelect = false ); - void BeginScroll(); - void EndScroll(); void PositionScrollBars( Size& rOSize, sal_uInt16 nMask ); void FindMostRight(); void FillView(); diff --git a/vcl/source/treelist/iconviewimpl.cxx b/vcl/source/treelist/iconviewimpl.cxx index b0818e94eea1..024ee93fca65 100644 --- a/vcl/source/treelist/iconviewimpl.cxx +++ b/vcl/source/treelist/iconviewimpl.cxx @@ -165,15 +165,12 @@ void IconViewImpl::KeyDown( bool bPageDown ) return; m_nFlags &= ~LBoxFlags::Filling; - BeginScroll(); m_aVerSBar->SetThumbPos( nThumbPos+nDelta ); if( bPageDown ) PageDown( static_cast(nDelta) ); else CursorDown(); - - EndScroll(); } void IconViewImpl::KeyUp( bool bPageUp ) @@ -196,15 +193,12 @@ void IconViewImpl::KeyUp( bool bPageUp ) return; m_nFlags &= ~LBoxFlags::Filling; - BeginScroll(); m_aVerSBar->SetThumbPos( nThumbPos - nDelta ); if( bPageUp ) PageUp( static_cast(nDelta) ); else CursorUp(); - - EndScroll(); } long IconViewImpl::GetEntryLine(const SvTreeListEntry* pEntry) const diff --git a/vcl/source/treelist/svimpbox.cxx b/vcl/source/treelist/svimpbox.cxx index 6e782614a105..22a03342e153 100644 --- a/vcl/source/treelist/svimpbox.cxx +++ b/vcl/source/treelist/svimpbox.cxx @@ -278,7 +278,6 @@ IMPL_LINK_NOARG(SvImpLBox, EndScrollHdl, ScrollBar*, void) m_aVerSBar->SetVisibleSize( m_nNextVerVisSize ); m_nFlags &= ~LBoxFlags::EndScrollSetVisSize; } - EndScroll(); } // handler for vertical scrollbar @@ -299,7 +298,6 @@ IMPL_LINK( SvImpLBox, ScrollUpDownHdl, ScrollBar *, pScrollBar, void ) m_pView->EndEditing( true ); // Cancel m_pView->PaintImmediately(); } - BeginScroll(); if( nDelta > 0 ) { @@ -455,15 +453,12 @@ void SvImpLBox::KeyUp( bool bPageUp ) return; m_nFlags &= ~LBoxFlags::Filling; - BeginScroll(); m_aVerSBar->SetThumbPos( nThumbPos - nDelta ); if( bPageUp ) PageUp( static_cast(nDelta) ); else CursorUp(); - - EndScroll(); } @@ -490,15 +485,12 @@ void SvImpLBox::KeyDown( bool bPageDown ) return; m_nFlags &= ~LBoxFlags::Filling; - BeginScroll(); m_aVerSBar->SetThumbPos( nThumbPos+nDelta ); if( bPageDown ) PageDown( static_cast(nDelta) ); else CursorDown(); - - EndScroll(); } @@ -700,7 +692,6 @@ void SvImpLBox::KeyLeftRight( long nDelta ) { if( !(m_nFlags & LBoxFlags::InResize) ) m_pView->PaintImmediately(); - BeginScroll(); m_nFlags &= ~LBoxFlags::Filling; ShowCursor( false ); @@ -2045,7 +2036,6 @@ void SvImpLBox::MouseButtonUp( const MouseEvent& rMEvt) { if ( !ButtonUpCheckCtrl( rMEvt ) && ( m_aSelEng.GetSelectionMode() != SelectionMode::NONE ) ) m_aSelEng.SelMouseButtonUp( rMEvt ); - EndScroll(); if( m_nFlags & LBoxFlags::StartEditTimer ) { m_nFlags &= ~LBoxFlags::StartEditTimer; @@ -2228,7 +2218,6 @@ bool SvImpLBox::KeyInput( const KeyEvent& rKEvt) if( nThumb ) { KeyLeftRight( nThumb ); - EndScroll(); } } else @@ -2249,7 +2238,6 @@ bool SvImpLBox::KeyInput( const KeyEvent& rKEvt) if( nThumb ) { KeyLeftRight( -nThumb ); - EndScroll(); } else if( m_bSubLstOpLR ) { @@ -2590,9 +2578,6 @@ void ImpLBSelEng::DestroyAnchor() void ImpLBSelEng::SetCursorAtPoint(const Point& rPoint, bool bDontSelectAtCursor) { SvTreeListEntry* pNewCursor = pImp->MakePointVisible( rPoint ); - if( pNewCursor != pImp->m_pCursor ) - pImp->BeginScroll(); - if( pNewCursor ) { // at SimpleTravel, the SetCursor is selected and the select handler is @@ -2833,9 +2818,7 @@ void SvImpLBox::SetDragDropMode( DragDropMode eDDMode ) void SvImpLBox::BeginDrag() { m_nFlags &= ~LBoxFlags::Filling; - BeginScroll(); m_pView->StartDrag( 0, m_aSelEng.GetMousePosPixel() ); - EndScroll(); } void SvImpLBox::PaintDDCursor(SvTreeListEntry* pEntry, bool bShow) @@ -2986,24 +2969,6 @@ void SvImpLBox::Command( const CommandEvent& rCEvt ) } } -void SvImpLBox::BeginScroll() -{ - if( !(m_nFlags & LBoxFlags::InScrolling)) - { - m_nFlags |= LBoxFlags::InScrolling; - } -} - -void SvImpLBox::EndScroll() -{ - if( m_nFlags & LBoxFlags::InScrolling) - { - m_pView->NotifyEndScroll(); - m_nFlags &= ~LBoxFlags::InScrolling; - } -} - - tools::Rectangle SvImpLBox::GetVisibleArea() const { Point aPos( m_pView->GetMapMode().GetOrigin() ); diff --git a/vcl/source/treelist/treelistbox.cxx b/vcl/source/treelist/treelistbox.cxx index cd0729c23350..8a4cfe56454b 100644 --- a/vcl/source/treelist/treelistbox.cxx +++ b/vcl/source/treelist/treelistbox.cxx @@ -1985,7 +1985,6 @@ void SvTreeListBox::ScrollOutputArea( short nDeltaEntries ) pImpl->PageUp( static_cast(nDeltaEntries) ); } pImpl->SyncVerThumb(); - NotifyEndScroll(); } void SvTreeListBox::ScrollToAbsPos( long nPos ) @@ -3184,10 +3183,6 @@ Size SvTreeListBox::GetOutputSizePixel() const return aSize; } -void SvTreeListBox::NotifyEndScroll() -{ -} - void SvTreeListBox::NotifyScrolled() { aScrolledHdl.Call( this ); -- cgit