summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2013-10-07 21:51:26 +0200
committerMichael Stahl <mstahl@redhat.com>2013-10-08 14:59:07 +0000
commite2ed0bc526db564114a4daf58d32b8bbcdbb84c9 (patch)
tree5e592efc5b9b0eb05878b47cd4f25ee8e6fbafa9
parent3ec0cbd7f176b14353fcf8e1eb8d5e453b7fcc05 (diff)
WaE [-Wstrict-overflow] assuming signed overflow does not occur
... when assuming that (X - c) <= X is always true ... or that (X + c) < X is always false Change-Id: Ib2313827cd6358ced0141b41cba753896b676e28 (cherry picked from commit ca576e0804324bbb36b697543cbe992e34d4b951) Reviewed-on: https://gerrit.libreoffice.org/6158 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r--svtools/source/contnr/imivctl1.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx
index 805ce6fb45c6..01f733db1462 100644
--- a/svtools/source/contnr/imivctl1.cxx
+++ b/svtools/source/contnr/imivctl1.cxx
@@ -2709,9 +2709,9 @@ Rectangle SvxIconChoiceCtrl_Impl::CalcFocusRect( SvxIconChoiceCtrlEntry* pEntry
Rectangle aFocusRect( aBoundRect.Left(), aBmpRect.Top() - 1,
aBoundRect.Right() - 4, aTextRect.Bottom() + 1 );
// the focus rectangle should not touch the text
- if( aFocusRect.Left() - 1 >= pEntry->aRect.Left() )
+ if( aFocusRect.Left() > ::std::numeric_limits<long>::min() && aFocusRect.Left() - 1 >= pEntry->aRect.Left() )
aFocusRect.Left()--;
- if( aFocusRect.Right() + 1 <= pEntry->aRect.Right() )
+ if( aFocusRect.Right() < ::std::numeric_limits<long>::max() && aFocusRect.Right() + 1 <= pEntry->aRect.Right() )
aFocusRect.Right()++;
return aFocusRect;