diff options
author | Kohei Yoshida <kyoshida@novell.com> | 2010-11-29 22:27:55 -0500 |
---|---|---|
committer | Kohei Yoshida <kyoshida@novell.com> | 2010-11-29 22:27:55 -0500 |
commit | 9938610417b58421ec07386406e0604815c77eaa (patch) | |
tree | 6dd3027bc78d3a2b94d44cd958b39296d2f2e018 /sc/source/ui/view/tabview3.cxx | |
parent | cbdf7c36bd1128757d4e30d52976717d4ca67b8d (diff) |
Extracted methods that may be used in another place.
Diffstat (limited to 'sc/source/ui/view/tabview3.cxx')
-rw-r--r-- | sc/source/ui/view/tabview3.cxx | 82 |
1 files changed, 2 insertions, 80 deletions
diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx index fdccb1a5d..8ca62798c 100644 --- a/sc/source/ui/view/tabview3.cxx +++ b/sc/source/ui/view/tabview3.cxx @@ -984,88 +984,10 @@ void ScTabView::MoveCursorRel( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode, aViewData.ResetOldCursor(); if (nMovX != 0 && VALIDCOLROW(nCurX,nCurY)) - { - BOOL bHFlip = FALSE; - do - { - SCCOL nLastCol = -1; - bSkipCell = pDoc->ColHidden(nCurX, nTab, nLastCol) || pDoc->IsHorOverlapped( nCurX, nCurY, nTab ); - if (bSkipProtected && !bSkipCell) - bSkipCell = pDoc->HasAttrib(nCurX, nCurY, nTab, nCurX, nCurY, nTab, HASATTR_PROTECTED); - if (bSkipUnprotected && !bSkipCell) - bSkipCell = !pDoc->HasAttrib(nCurX, nCurY, nTab, nCurX, nCurY, nTab, HASATTR_PROTECTED); - - if (bSkipCell) - { - if ( nCurX<=0 || nCurX>=MAXCOL ) - { - if (bHFlip) - { - nCurX = nOldX; - bSkipCell = FALSE; - } - else - { - nMovX = -nMovX; - if (nMovX > 0) ++nCurX; else --nCurX; // zuruecknehmen - bHFlip = TRUE; - } - } - else - if (nMovX > 0) ++nCurX; else --nCurX; - } - } - while (bSkipCell); - - if (pDoc->IsVerOverlapped( nCurX, nCurY, nTab )) - { - aViewData.SetOldCursor( nCurX,nCurY ); - while (pDoc->IsVerOverlapped( nCurX, nCurY, nTab )) - --nCurY; - } - } + SkipCursorHorizontal(nCurX, nCurY, nOldX, nOldY, nMovX); if (nMovY != 0 && VALIDCOLROW(nCurX,nCurY)) - { - BOOL bVFlip = FALSE; - do - { - SCROW nLastRow = -1; - bSkipCell = pDoc->RowHidden(nCurY, nTab, nLastRow) || pDoc->IsVerOverlapped( nCurX, nCurY, nTab ); - if (bSkipProtected && !bSkipCell) - bSkipCell = pDoc->HasAttrib(nCurX, nCurY, nTab, nCurX, nCurY, nTab, HASATTR_PROTECTED); - if (bSkipUnprotected && !bSkipCell) - bSkipCell = !pDoc->HasAttrib(nCurX, nCurY, nTab, nCurX, nCurY, nTab, HASATTR_PROTECTED); - - if (bSkipCell) - { - if ( nCurY<=0 || nCurY>=MAXROW ) - { - if (bVFlip) - { - nCurY = nOldY; - bSkipCell = FALSE; - } - else - { - nMovY = -nMovY; - if (nMovY > 0) ++nCurY; else --nCurY; // zuruecknehmen - bVFlip = TRUE; - } - } - else - if (nMovY > 0) ++nCurY; else --nCurY; - } - } - while (bSkipCell); - - if (pDoc->IsHorOverlapped( nCurX, nCurY, nTab )) - { - aViewData.SetOldCursor( nCurX,nCurY ); - while (pDoc->IsHorOverlapped( nCurX, nCurY, nTab )) - --nCurX; - } - } + SkipCursorVertical(nCurX, nCurY, nOldX, nOldY, nMovY); MoveCursorAbs( nCurX, nCurY, eMode, bShift, FALSE, TRUE, bKeepSel ); } |