summaryrefslogtreecommitdiff
path: root/starmath
diff options
context:
space:
mode:
authorPhil Bordelon <phil@thenexusproject.org>2010-09-30 10:43:59 -0500
committerCédric Bosdonnat <cedricbosdo@openoffice.org>2010-09-30 20:25:31 +0200
commitf6f2659f6e081947c29bdbc16e5cb74a6442306e (patch)
tree2ef1204ae19061b0abdc5ee622f2943b88ec856e /starmath
parent217e648d8401fd1e2c45e350a0b41ae4074475de (diff)
Remove dead less-than-zero conditional checks.
A large number of conditionals in accessibility.cxx checked that their values were above zero at some point, but that code was commented out; this removes those (unused) checks completely. Signed-off-by: Phil Bordelon <phil@thenexusproject.org>
Diffstat (limited to 'starmath')
-rw-r--r--starmath/source/accessibility.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/starmath/source/accessibility.cxx b/starmath/source/accessibility.cxx
index e734a3f86830..a364d92cd073 100644
--- a/starmath/source/accessibility.cxx
+++ b/starmath/source/accessibility.cxx
@@ -464,7 +464,7 @@ sal_Bool SAL_CALL SmGraphicAccessible::setCaretPosition( sal_Int32 nIndex )
{
xub_StrLen nIdx = (xub_StrLen) nIndex;
String aTxt( GetAccessibleText_Impl() );
- if (!(/*0 <= nIdx &&*/ nIdx < aTxt.Len()))
+ if (!(nIdx < aTxt.Len()))
throw IndexOutOfBoundsException();
return sal_False;
}
@@ -476,7 +476,7 @@ sal_Unicode SAL_CALL SmGraphicAccessible::getCharacter( sal_Int32 nIndex )
xub_StrLen nIdx = (xub_StrLen) nIndex;
String aTxt( GetAccessibleText_Impl() );
- if (!(/*0 <= nIdx &&*/ nIdx < aTxt.Len()))
+ if (!(nIdx < aTxt.Len()))
throw IndexOutOfBoundsException();
return aTxt.GetChar( nIdx );
}
@@ -694,8 +694,8 @@ OUString SAL_CALL SmGraphicAccessible::getTextRange(
String aTxt( GetAccessibleText_Impl() );
xub_StrLen nStart = (xub_StrLen) Min(nStartIndex, nEndIndex);
xub_StrLen nEnd = (xub_StrLen) Max(nStartIndex, nEndIndex);
- if (!(/*0 <= nStart &&*/ nStart <= aTxt.Len()) ||
- !(/*0 <= nEnd &&*/ nEnd <= aTxt.Len()))
+ if (!(nStart <= aTxt.Len()) ||
+ !(nEnd <= aTxt.Len()))
throw IndexOutOfBoundsException();
return aTxt.Copy( nStart, nEnd - nStart );
}
@@ -706,7 +706,7 @@ OUString SAL_CALL SmGraphicAccessible::getTextRange(
String aTxt( GetAccessibleText_Impl() );
xub_StrLen nIdx = (xub_StrLen) nIndex;
//!! nIndex is allowed to be the string length
- if (!(/*0 <= nIdx &&*/ nIdx <= aTxt.Len()))
+ if (!(nIdx <= aTxt.Len()))
throw IndexOutOfBoundsException();
::com::sun::star::accessibility::TextSegment aResult;
@@ -727,7 +727,7 @@ OUString SAL_CALL SmGraphicAccessible::getTextRange(
String aTxt( GetAccessibleText_Impl() );
xub_StrLen nIdx = (xub_StrLen) nIndex;
//!! nIndex is allowed to be the string length
- if (!(/*0 <= nIdx &&*/ nIdx <= aTxt.Len()))
+ if (!(nIdx <= aTxt.Len()))
throw IndexOutOfBoundsException();
::com::sun::star::accessibility::TextSegment aResult;
@@ -749,7 +749,7 @@ OUString SAL_CALL SmGraphicAccessible::getTextRange(
String aTxt( GetAccessibleText_Impl() );
xub_StrLen nIdx = (xub_StrLen) nIndex;
//!! nIndex is allowed to be the string length
- if (!(/*0 <= nIdx &&*/ nIdx <= aTxt.Len()))
+ if (!(nIdx <= aTxt.Len()))
throw IndexOutOfBoundsException();
::com::sun::star::accessibility::TextSegment aResult;