diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-01-11 17:00:51 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-01-11 20:18:19 +0000 |
commit | cea2bd4d2d4601c22b6706c3ec334c4ad8b55c2d (patch) | |
tree | 68ed96309f43af6bfd9b2148c9658a830a6892a1 /vcl/source/control | |
parent | 3a81e90a45e361bef3dbacf533f6a5ddf7e901fa (diff) |
longparas: unnecessary xub_StrLen cast
Change-Id: I794faf7ba0c2dd32b0c846dd1cf6d1825cf8b63c
Diffstat (limited to 'vcl/source/control')
-rw-r--r-- | vcl/source/control/combobox.cxx | 2 | ||||
-rw-r--r-- | vcl/source/control/edit.cxx | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx index 214bbf53f527..92ea28e40cd4 100644 --- a/vcl/source/control/combobox.cxx +++ b/vcl/source/control/combobox.cxx @@ -394,7 +394,7 @@ IMPL_LINK_NOARG(ComboBox, ImplSelectHdl) if ( (nP != LISTBOX_ENTRY_NOTFOUND) && (!mpImplLB->GetEntryList()->IsEntryPosSelected( nP )) ) { aText = aText.replaceAt( nPrevIndex, nTokenLen, "" ); - nIndex = sal::static_int_cast<xub_StrLen>(nIndex - nTokenLen); + nIndex = nIndex - nTokenLen; sal_Int32 nSepCount=0; if ( (nPrevIndex+nSepCount < aText.getLength()) && (aText[nPrevIndex+nSepCount] == mcMultiSep) ) { diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx index 460244e75585..aa579e70107b 100644 --- a/vcl/source/control/edit.cxx +++ b/vcl/source/control/edit.cxx @@ -1297,12 +1297,12 @@ sal_Int32 Edit::ImplGetCharPos( const Point& rWindowPos ) const GetCaretPositions( aText, pDX, 0, aText.getLength() ); long nX = rWindowPos.X() - mnXOffset - ImplGetExtraOffset(); - for( int i = 0; i < aText.getLength(); i++ ) + for( sal_Int32 i = 0; i < aText.getLength(); i++ ) { if( (pDX[2*i] >= nX && pDX[2*i+1] <= nX) || (pDX[2*i+1] >= nX && pDX[2*i] <= nX)) { - nIndex = sal::static_int_cast<xub_StrLen>(i); + nIndex = i; if( pDX[2*i] < pDX[2*i+1] ) { if( nX > (pDX[2*i]+pDX[2*i+1])/2 ) @@ -1320,13 +1320,13 @@ sal_Int32 Edit::ImplGetCharPos( const Point& rWindowPos ) const { nIndex = 0; long nDiff = std::abs( pDX[0]-nX ); - for( int i = 1; i < aText.getLength(); i++ ) + for( sal_Int32 i = 1; i < aText.getLength(); i++ ) { long nNewDiff = std::abs( pDX[2*i]-nX ); if( nNewDiff < nDiff ) { - nIndex = sal::static_int_cast<xub_StrLen>(i); + nIndex = i; nDiff = nNewDiff; } } @@ -2270,7 +2270,7 @@ void Edit::Command( const CommandEvent& rCEvt ) { if ( mpIMEInfos ) { - xub_StrLen nCursorPos = (sal_uInt16)GetSelection().Max(); + sal_Int32 nCursorPos = GetSelection().Max(); SetCursorRect( NULL, GetTextWidth( maText.toString(), nCursorPos, mpIMEInfos->nPos+mpIMEInfos->nLen-nCursorPos ) ); } else |