summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-08-04 16:38:47 +0100
committerCaolán McNamara <caolanm@redhat.com>2022-08-05 09:52:36 +0200
commit8c4e8818fe9f5ac1f6cdf908299cc109d67f1e50 (patch)
tree484f12bc8c0af2b097920ec438fc174199d95995 /sc
parentae354652c8b0247a05ad0d8bb1551fdafd451e53 (diff)
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>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/view/tabview.cxx7
1 files changed, 2 insertions, 5 deletions
diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx
index 898181c49f6e..c737317764dc 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)