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 | |
parent | 3a81e90a45e361bef3dbacf533f6a5ddf7e901fa (diff) |
longparas: unnecessary xub_StrLen cast
Change-Id: I794faf7ba0c2dd32b0c846dd1cf6d1825cf8b63c
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/control/combobox.cxx | 2 | ||||
-rw-r--r-- | vcl/source/control/edit.cxx | 10 | ||||
-rw-r--r-- | vcl/source/edit/vclmedit.cxx | 10 | ||||
-rw-r--r-- | vcl/source/gdi/cvtsvm.cxx | 4 | ||||
-rw-r--r-- | vcl/source/window/winproc.cxx | 4 |
5 files changed, 15 insertions, 15 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 diff --git a/vcl/source/edit/vclmedit.cxx b/vcl/source/edit/vclmedit.cxx index 2f4c7556cfc2..3d9cec0b78d0 100644 --- a/vcl/source/edit/vclmedit.cxx +++ b/vcl/source/edit/vclmedit.cxx @@ -91,7 +91,7 @@ private: ScrollBarBox* mpScrollBox; Point maTextWindowOffset; - xub_StrLen mnTextWidth; + sal_Int32 mnTextWidth; mutable Selection maSelection; protected: @@ -286,7 +286,7 @@ void ImpVclMEdit::ImpSetScrollBarRanges() // Es gibt kein Notify bei Breiten-Aenderung... // sal_uLong nW = Max( (sal_uLong)mpTextWindow->GetOutputSizePixel().Width()*5, (sal_uLong)nTextWidth ); // mpHScrollBar->SetRange( Range( 0, (long)nW ) ); - mpHScrollBar->SetRange( Range( 0, (long)mnTextWidth-1 ) ); + mpHScrollBar->SetRange( Range( 0, mnTextWidth-1 ) ); } } @@ -547,11 +547,11 @@ void ImpVclMEdit::Notify( SfxBroadcaster&, const SfxHint& rHint ) { if ( mpHScrollBar ) { - sal_uLong nWidth = mpTextWindow->GetTextEngine()->CalcTextWidth(); + sal_Int32 nWidth = mpTextWindow->GetTextEngine()->CalcTextWidth(); if ( nWidth != mnTextWidth ) { - mnTextWidth = sal::static_int_cast< xub_StrLen >(nWidth); - mpHScrollBar->SetRange( Range( 0, (long)mnTextWidth-1 ) ); + mnTextWidth = nWidth; + mpHScrollBar->SetRange( Range( 0, mnTextWidth-1 ) ); ImpSetHScrollBarThumbPos(); } } diff --git a/vcl/source/gdi/cvtsvm.cxx b/vcl/source/gdi/cvtsvm.cxx index 54dafd3b79bc..43b285cf8148 100644 --- a/vcl/source/gdi/cvtsvm.cxx +++ b/vcl/source/gdi/cvtsvm.cxx @@ -281,13 +281,13 @@ void ImplReadUnicodeComment( sal_uInt32 nStrmPos, SvStream& rIStm, OUString& rSt { sal_uInt16 nType; sal_uInt32 nActionSize; - xub_StrLen nStringLen; + sal_Size nStringLen; rIStm.Seek( nStrmPos ); rIStm >> nType >> nActionSize; - nStringLen = sal::static_int_cast<xub_StrLen>(( nActionSize - 4 ) >> 1); + nStringLen = (nActionSize - 4) >> 1; if ( nStringLen && ( nType == GDI_UNICODE_COMMENT ) ) rString = read_uInt16s_ToOUString(rIStm, nStringLen); diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx index 7a93680ab324..83cd4d2a8d1f 100644 --- a/vcl/source/window/winproc.cxx +++ b/vcl/source/window/winproc.cxx @@ -1282,7 +1282,7 @@ static long ImplHandleExtTextInput( Window* pWindow, nDeltaStart = 0; else { - xub_StrLen i = 0; + sal_Int32 i = 0; while ( i < nDeltaStart ) { if ( pWinData->mpExtOldAttrAry[i] != pTextAttr[i] ) @@ -1300,7 +1300,7 @@ static long ImplHandleExtTextInput( Window* pWindow, // Call Event and store the information CommandExtTextInputData aData( rText, pTextAttr, - (xub_StrLen)nCursorPos, nCursorFlags, + nCursorPos, nCursorFlags, nDeltaStart, pWinData->mpExtOldText->getLength(), bOnlyCursor ); *pWinData->mpExtOldText = rText; |