summaryrefslogtreecommitdiff
path: root/starmath
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-11-22 09:33:32 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-11-23 06:59:31 +0100
commit7a1c21e53fc4733a4bb52282ce0098fcc085ab0e (patch)
treec1b90f74e1ce9e9f3a852f398890899459189cab /starmath
parentc24c32bf71b8e64bd0d36e511f554e1f6c015842 (diff)
loplugin:simplifybool for negation of comparison operator
Change-Id: Ie56daf560185274754afbc7a09c432b5c2793791 Reviewed-on: https://gerrit.libreoffice.org/45068 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
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 c7e7ad737c60..057d2e0f62f5 100644
--- a/starmath/source/accessibility.cxx
+++ b/starmath/source/accessibility.cxx
@@ -415,7 +415,7 @@ sal_Bool SAL_CALL SmGraphicAccessible::setCaretPosition( sal_Int32 nIndex )
{
SolarMutexGuard aGuard;
OUString aTxt( GetAccessibleText_Impl() );
- if (!(nIndex < aTxt.getLength()))
+ if (nIndex >= aTxt.getLength())
throw IndexOutOfBoundsException();
return false;
}
@@ -424,7 +424,7 @@ sal_Unicode SAL_CALL SmGraphicAccessible::getCharacter( sal_Int32 nIndex )
{
SolarMutexGuard aGuard;
OUString aTxt( GetAccessibleText_Impl() );
- if (!(nIndex < aTxt.getLength()))
+ if (nIndex >= aTxt.getLength())
throw IndexOutOfBoundsException();
return aTxt[nIndex];
}
@@ -621,8 +621,8 @@ OUString SAL_CALL SmGraphicAccessible::getTextRange(
OUString aTxt( GetAccessibleText_Impl() );
sal_Int32 nStart = std::min(nStartIndex, nEndIndex);
sal_Int32 nEnd = std::max(nStartIndex, nEndIndex);
- if (!(nStart <= aTxt.getLength()) ||
- !(nEnd <= aTxt.getLength()))
+ if ((nStart > aTxt.getLength()) ||
+ (nEnd > aTxt.getLength()))
throw IndexOutOfBoundsException();
return aTxt.copy( nStart, nEnd - nStart );
}
@@ -632,7 +632,7 @@ css::accessibility::TextSegment SAL_CALL SmGraphicAccessible::getTextAtIndex( sa
SolarMutexGuard aGuard;
OUString aTxt( GetAccessibleText_Impl() );
//!! nIndex is allowed to be the string length
- if (!(nIndex <= aTxt.getLength()))
+ if (nIndex > aTxt.getLength())
throw IndexOutOfBoundsException();
css::accessibility::TextSegment aResult;
@@ -652,7 +652,7 @@ css::accessibility::TextSegment SAL_CALL SmGraphicAccessible::getTextBeforeIndex
SolarMutexGuard aGuard;
OUString aTxt( GetAccessibleText_Impl() );
//!! nIndex is allowed to be the string length
- if (!(nIndex <= aTxt.getLength()))
+ if (nIndex > aTxt.getLength())
throw IndexOutOfBoundsException();
css::accessibility::TextSegment aResult;
@@ -673,7 +673,7 @@ css::accessibility::TextSegment SAL_CALL SmGraphicAccessible::getTextBehindIndex
SolarMutexGuard aGuard;
OUString aTxt( GetAccessibleText_Impl() );
//!! nIndex is allowed to be the string length
- if (!(nIndex <= aTxt.getLength()))
+ if (nIndex > aTxt.getLength())
throw IndexOutOfBoundsException();
css::accessibility::TextSegment aResult;