nDelta overwritten on all branches except default
which claims to only exist to avoid a compiler warning. So drop
GetDelta() call and fold the default into the Drag case instead
Change-Id: I978bb38ccff34687bb70453abe416a9c73228655
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137808
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx
index 898181c..c737317 100644
--- a/sc/source/ui/view/tabview.cxx
+++ b/sc/source/ui/view/tabview.cxx
@@ -1086,7 +1086,7 @@ IMPL_LINK( ScTabView, ScrollHdl, ScrollBar*, pScroll, void )
}
}
tools::Long nDelta = pScroll->GetDelta();
tools::Long nDelta(0);
switch ( eType )
{
case ScrollType::LineUp:
@@ -1109,6 +1109,7 @@ IMPL_LINK( ScTabView, ScrollHdl, ScrollBar*, pScroll, void )
if ( pScroll == aVScrollBottom.get() ) nDelta = aViewData.VisibleCellsY( SC_SPLIT_BOTTOM );
if (nDelta==0) nDelta=1;
break;
default: // added to avoid warnings
case ScrollType::Drag:
{
// only scroll in the correct direction, do not jitter around hidden ranges
@@ -1133,10 +1134,6 @@ IMPL_LINK( ScTabView, ScrollHdl, ScrollBar*, pScroll, void )
nPrevDragPos = nScrollPos;
}
break;
default:
{
// added to avoid warnings
}
}
if (nDelta)