Kaydet (Commit) d9f585b8 authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#706065 Unintended sign extension

Change-Id: If482c75af5128778a176c40e38000b78f2087131
üst bbda9919
......@@ -3606,14 +3606,14 @@ sal_uLong SvxIconChoiceCtrl_Impl::GetPredecessorGrid( const Point& rPos) const
Point aPos( rPos );
aPos.X() -= LROFFS_WINBORDER;
aPos.Y() -= TBOFFS_WINBORDER;
sal_uInt16 nMaxCol = (sal_uInt16)(aVirtOutputSize.Width() / nGridDX);
long nMaxCol = aVirtOutputSize.Width() / nGridDX;
if( nMaxCol )
nMaxCol--;
sal_uInt16 nGridX = (sal_uInt16)(aPos.X() / nGridDX);
long nGridX = aPos.X() / nGridDX;
if( nGridX > nMaxCol )
nGridX = nMaxCol;
sal_uInt16 nGridY = (sal_uInt16)(aPos.Y() / nGridDY);
sal_uInt16 nGridsX = (sal_uInt16)(aOutputSize.Width() / nGridDX);
long nGridY = aPos.Y() / nGridDY;
long nGridsX = aOutputSize.Width() / nGridDX;
sal_uLong nGrid = (nGridY * nGridsX) + nGridX;
long nMiddle = (nGridX * nGridDX) + (nGridDX / 2);
if( rPos.X() < nMiddle )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment