diff options
author | Noel Grandin <noel@peralex.com> | 2013-11-29 11:45:09 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-12-03 11:34:45 +0200 |
commit | 4ded81770296b6eec9291924db53666f1d8e8d7e (patch) | |
tree | c09bce1ba48bef1e0996895becea4b2ead5046da /vcl | |
parent | 9083e8d1ca0246ba21423726d568846cb89efae9 (diff) |
convert Edit::GetCharPos from xub_StrLen to sal_Int32
Change-Id: I8fe982d0c0c0a04e2a10cff0f0ae68d51bed590a
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/control/edit.cxx | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx index 904a502ef501..d9d17ae52dc7 100644 --- a/vcl/source/control/edit.cxx +++ b/vcl/source/control/edit.cxx @@ -1430,7 +1430,7 @@ void Edit::MouseButtonDown( const MouseEvent& rMEvt ) return; } - xub_StrLen nChar = ImplGetCharPos( rMEvt.GetPosPixel() ); + sal_Int32 nCharPos = ImplGetCharPos( rMEvt.GetPosPixel() ); Selection aSelection( maSelection ); aSelection.Justify(); @@ -1451,10 +1451,10 @@ void Edit::MouseButtonDown( const MouseEvent& rMEvt ) ImplSetSelection( Selection( aBoundary.startPos, aBoundary.endPos ) ); ImplCopyToSelectionClipboard(); } - else if ( !rMEvt.IsShift() && HasFocus() && aSelection.IsInside( nChar ) ) + else if ( !rMEvt.IsShift() && HasFocus() && aSelection.IsInside( nCharPos ) ) mbClickedInSelection = sal_True; else if ( rMEvt.IsLeft() ) - ImplSetCursorPos( nChar, rMEvt.IsShift() ); + ImplSetCursorPos( nCharPos, rMEvt.IsShift() ); if ( !mbClickedInSelection && rMEvt.IsLeft() && ( rMEvt.GetClicks() == 1 ) ) StartTracking( STARTTRACK_SCROLLREPEAT ); @@ -1471,8 +1471,8 @@ void Edit::MouseButtonUp( const MouseEvent& rMEvt ) { if ( mbClickedInSelection && rMEvt.IsLeft() ) { - xub_StrLen nChar = ImplGetCharPos( rMEvt.GetPosPixel() ); - ImplSetCursorPos( nChar, sal_False ); + sal_Int32 nCharPos = ImplGetCharPos( rMEvt.GetPosPixel() ); + ImplSetCursorPos( nCharPos, sal_False ); mbClickedInSelection = sal_False; } else if ( rMEvt.IsMiddle() && !mbReadOnly && @@ -1492,8 +1492,8 @@ void Edit::Tracking( const TrackingEvent& rTEvt ) { if ( mbClickedInSelection ) { - xub_StrLen nChar = ImplGetCharPos( rTEvt.GetMouseEvent().GetPosPixel() ); - ImplSetCursorPos( nChar, sal_False ); + sal_Int32 nCharPos = ImplGetCharPos( rTEvt.GetMouseEvent().GetPosPixel() ); + ImplSetCursorPos( nCharPos, sal_False ); mbClickedInSelection = sal_False; } else if ( rTEvt.GetMouseEvent().IsLeft() ) @@ -1505,8 +1505,8 @@ void Edit::Tracking( const TrackingEvent& rTEvt ) { if( !mbClickedInSelection ) { - xub_StrLen nChar = ImplGetCharPos( rTEvt.GetMouseEvent().GetPosPixel() ); - ImplSetCursorPos( nChar, sal_True ); + sal_Int32 nCharPos = ImplGetCharPos( rTEvt.GetMouseEvent().GetPosPixel() ); + ImplSetCursorPos( nCharPos, sal_True ); } } @@ -2967,7 +2967,7 @@ xub_StrLen Edit::GetMaxVisChars() const // ----------------------------------------------------------------------- -xub_StrLen Edit::GetCharPos( const Point& rWindowPos ) const +sal_Int32 Edit::GetCharPos( const Point& rWindowPos ) const { return ImplGetCharPos( rWindowPos ); } @@ -3033,8 +3033,8 @@ void Edit::dragGestureRecognized( const ::com::sun::star::datatransfer::dnd::Dra // Nur wenn Maus in der Selektion... Point aMousePos( rDGE.DragOriginX, rDGE.DragOriginY ); - xub_StrLen nChar = ImplGetCharPos( aMousePos ); - if ( (nChar >= aSel.Min()) && (nChar < aSel.Max()) ) + sal_Int32 nCharPos = ImplGetCharPos( aMousePos ); + if ( (nCharPos >= aSel.Min()) && (nCharPos < aSel.Max()) ) { if ( !mpDDInfo ) mpDDInfo = new DDInfo; |