Lines Matching refs:nPos

184 void ScCsvRuler::MoveCursor( sal_Int32 nPos, bool bScroll )  in MoveCursor()  argument
188 Execute( CSVCMD_MAKEPOSVISIBLE, nPos ); in MoveCursor()
189 Execute( CSVCMD_MOVERULERCURSOR, IsVisibleSplitPos( nPos ) ? nPos : CSV_POS_INVALID ); in MoveCursor()
238 sal_Int32 nPos = maSplits[ nIndex ]; in MoveCursorToSplit() local
239 if( nPos != CSV_POS_INVALID ) in MoveCursorToSplit()
240 MoveCursor( nPos ); in MoveCursorToSplit()
264 sal_Int32 ScCsvRuler::GetNoScrollPos( sal_Int32 nPos ) const in GetNoScrollPos()
266 sal_Int32 nNewPos = nPos; in GetNoScrollPos()
272 nNewPos = Max( nPos, GetFirstVisPos() + nScroll ); in GetNoScrollPos()
283 void ScCsvRuler::InsertSplit( sal_Int32 nPos ) in InsertSplit() argument
285 if( maSplits.Insert( nPos ) ) in InsertSplit()
287 ImplDrawSplit( nPos ); in InsertSplit()
292 void ScCsvRuler::RemoveSplit( sal_Int32 nPos ) in RemoveSplit() argument
294 if( maSplits.Remove( nPos ) ) in RemoveSplit()
296 ImplEraseSplit( nPos ); in RemoveSplit()
301 void ScCsvRuler::MoveSplit( sal_Int32 nPos, sal_Int32 nNewPos ) in MoveSplit() argument
303 bool bRemove = maSplits.Remove( nPos ); in MoveSplit()
307 ImplEraseSplit( nPos ); in MoveSplit()
319 sal_Int32 ScCsvRuler::FindEmptyPos( sal_Int32 nPos, ScMoveMode eDir ) const in FindEmptyPos() argument
321 sal_Int32 nNewPos = nPos; in FindEmptyPos()
327 nNewPos = Min( nPos, FindEmptyPos( 0, MOVE_NEXT ) ); in FindEmptyPos()
330 nNewPos = Max( nPos, FindEmptyPos( GetPosCount(), MOVE_PREV ) ); in FindEmptyPos()
408 sal_Int32 nPos = GetPosFromX( rMEvt.GetPosPixel().X() ); in MouseButtonDown() local
409 if( IsVisibleSplitPos( nPos ) ) in MouseButtonDown()
410 StartMouseTracking( nPos ); in MouseButtonDown()
411 ImplSetMousePointer( nPos ); in MouseButtonDown()
420 sal_Int32 nPos = GetPosFromX( rMEvt.GetPosPixel().X() ); in MouseMove() local
424 nPos = Max( Min( nPos, GetPosCount() - sal_Int32( 1 ) ), sal_Int32( 1 ) ); in MouseMove()
425 MoveMouseTracking( nPos ); in MouseMove()
431 if( !IsVisibleSplitPos( nPos ) || !aRect.IsInside( rMEvt.GetPosPixel() ) ) in MouseMove()
433 nPos = HasFocus() ? GetRulerCursorPos() : CSV_POS_INVALID; in MouseMove()
434 MoveCursor( nPos, false ); in MouseMove()
436 ImplSetMousePointer( nPos ); in MouseMove()
484 void ScCsvRuler::StartMouseTracking( sal_Int32 nPos ) in StartMouseTracking() argument
486 mnPosMTStart = mnPosMTCurr = nPos; in StartMouseTracking()
489 Execute( CSVCMD_INSERTSPLIT, nPos ); in StartMouseTracking()
490 if( HasSplit( nPos ) ) in StartMouseTracking()
494 void ScCsvRuler::MoveMouseTracking( sal_Int32 nPos ) in MoveMouseTracking() argument
496 if( mnPosMTCurr != nPos ) in MoveMouseTracking()
499 MoveCursor( nPos ); in MoveMouseTracking()
501 Execute( CSVCMD_INSERTSPLIT, nPos ); in MoveMouseTracking()
503 Execute( CSVCMD_MOVESPLIT, mnPosMTCurr, nPos ); in MoveMouseTracking()
504 mnPosMTCurr = nPos; in MoveMouseTracking()
582 sal_Int32 nPos; in ImplDrawBackgrDev() local
587 for( nPos = nFirstPos; nPos <= nLastPos; ++nPos ) in ImplDrawBackgrDev()
589 sal_Int32 nX = GetX( nPos ); in ImplDrawBackgrDev()
590 if( nPos % 5 ) in ImplDrawBackgrDev()
599 for( nPos = ((nFirstPos + 9) / 10) * 10; nPos <= nLastPos; nPos += 10 ) in ImplDrawBackgrDev()
601 String aText( String::CreateFromInt32( nPos ) ); in ImplDrawBackgrDev()
603 sal_Int32 nTextX = GetX( nPos ) - nTextWidth / 2; in ImplDrawBackgrDev()
609 void ScCsvRuler::ImplDrawSplit( sal_Int32 nPos ) in ImplDrawSplit() argument
611 if( IsVisibleSplitPos( nPos ) ) in ImplDrawSplit()
613 Point aPos( GetX( nPos ) - mnSplitSize / 2, GetHeight() - mnSplitSize - 2 ); in ImplDrawSplit()
618 maRulerDev.DrawPixel( Point( GetX( nPos ), GetHeight() - 2 ) ); in ImplDrawSplit()
622 void ScCsvRuler::ImplEraseSplit( sal_Int32 nPos ) in ImplEraseSplit() argument
624 if( IsVisibleSplitPos( nPos ) ) in ImplEraseSplit()
627 Point aPos( GetX( nPos ) - mnSplitSize / 2, 0 ); in ImplEraseSplit()
646 void ScCsvRuler::ImplInvertCursor( sal_Int32 nPos ) in ImplInvertCursor() argument
648 if( IsVisibleSplitPos( nPos ) ) in ImplInvertCursor()
650 …ImplInvertRect( maRulerDev, Rectangle( Point( GetX( nPos ) - 1, 0 ), Size( 3, GetHeight() - 1 ) ) … in ImplInvertCursor()
651 if( HasSplit( nPos ) ) in ImplInvertCursor()
652 ImplDrawSplit( nPos ); in ImplInvertCursor()
663 void ScCsvRuler::ImplSetMousePointer( sal_Int32 nPos ) in ImplSetMousePointer() argument
665 SetPointer( Pointer( HasSplit( nPos ) ? POINTER_HSPLIT : POINTER_ARROW ) ); in ImplSetMousePointer()