summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-09-02 14:57:18 +0200
committerNoel Grandin <noel@peralex.com>2016-09-05 08:21:46 +0200
commit04a8ba2084950f998d791edad29739c124c8c4b8 (patch)
treedf1b3f1a5d5a56ff89300292ade6f6976e16b436 /sc
parenta1cd62bcd589a7c1050e327f4cb0ad95f9ea19d1 (diff)
convert ScrollType to scoped enum
Change-Id: I6dd02d4f7df028dada6cfd5d767a6ec1b1c1efe1
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/view/tabview.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx
index aa81b31001f1..5ac34bd625a3 100644
--- a/sc/source/ui/view/tabview.cxx
+++ b/sc/source/ui/view/tabview.cxx
@@ -1037,7 +1037,7 @@ IMPL_LINK_TYPED( ScTabView, ScrollHdl, ScrollBar*, pScroll, void )
bool bLayoutRTL = aViewData.GetDocument()->IsLayoutRTL( aViewData.GetTabNo() );
ScrollType eType = pScroll->GetType();
- if ( eType == SCROLL_DRAG )
+ if ( eType == ScrollType::Drag )
{
if (!bDragging)
{
@@ -1106,27 +1106,27 @@ IMPL_LINK_TYPED( ScTabView, ScrollHdl, ScrollBar*, pScroll, void )
long nDelta = pScroll->GetDelta();
switch ( eType )
{
- case SCROLL_LINEUP:
+ case ScrollType::LineUp:
nDelta = -1;
break;
- case SCROLL_LINEDOWN:
+ case ScrollType::LineDown:
nDelta = 1;
break;
- case SCROLL_PAGEUP:
+ case ScrollType::PageUp:
if ( pScroll == aHScrollLeft.get() ) nDelta = -(long) aViewData.PrevCellsX( SC_SPLIT_LEFT );
if ( pScroll == aHScrollRight.get() ) nDelta = -(long) aViewData.PrevCellsX( SC_SPLIT_RIGHT );
if ( pScroll == aVScrollTop.get() ) nDelta = -(long) aViewData.PrevCellsY( SC_SPLIT_TOP );
if ( pScroll == aVScrollBottom.get() ) nDelta = -(long) aViewData.PrevCellsY( SC_SPLIT_BOTTOM );
if (nDelta==0) nDelta=-1;
break;
- case SCROLL_PAGEDOWN:
+ case ScrollType::PageDown:
if ( pScroll == aHScrollLeft.get() ) nDelta = aViewData.VisibleCellsX( SC_SPLIT_LEFT );
if ( pScroll == aHScrollRight.get() ) nDelta = aViewData.VisibleCellsX( SC_SPLIT_RIGHT );
if ( pScroll == aVScrollTop.get() ) nDelta = aViewData.VisibleCellsY( SC_SPLIT_TOP );
if ( pScroll == aVScrollBottom.get() ) nDelta = aViewData.VisibleCellsY( SC_SPLIT_BOTTOM );
if (nDelta==0) nDelta=1;
break;
- case SCROLL_DRAG:
+ case ScrollType::Drag:
{
// only scroll in the correct direction, do not jitter around hidden ranges
long nScrollMin = 0; // simulate RangeMin
@@ -1158,7 +1158,7 @@ IMPL_LINK_TYPED( ScTabView, ScrollHdl, ScrollBar*, pScroll, void )
if (nDelta)
{
- bool bUpdate = ( eType != SCROLL_DRAG ); // don't alter the ranges while dragging
+ bool bUpdate = ( eType != ScrollType::Drag ); // don't alter the ranges while dragging
if ( bHoriz )
ScrollX( nDelta, (pScroll == aHScrollLeft.get()) ? SC_SPLIT_LEFT : SC_SPLIT_RIGHT, bUpdate );
else