summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-07-06 14:51:38 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-07-06 15:15:12 +0100
commitd9f585b89bfcbfda47d718a15af52ce66390dd28 (patch)
treeb39a70a20a09adf3abd359160f83a8bf72403878 /svtools
parentbbda99198c950b6cfe4bab140b9ad676699fef7b (diff)
coverity#706065 Unintended sign extension
Change-Id: If482c75af5128778a176c40e38000b78f2087131
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/contnr/imivctl1.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx
index d7ccee171e51..6b00f95824b7 100644
--- a/svtools/source/contnr/imivctl1.cxx
+++ b/svtools/source/contnr/imivctl1.cxx
@@ -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 )