summaryrefslogtreecommitdiff
path: root/framework/source
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 /framework/source
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 'framework/source')
-rw-r--r--framework/source/fwe/helper/propertysetcontainer.cxx4
-rw-r--r--framework/source/fwi/uielement/itemcontainer.cxx2
-rw-r--r--framework/source/fwi/uielement/rootitemcontainer.cxx2
-rw-r--r--framework/source/layoutmanager/uielement.cxx4
4 files changed, 6 insertions, 6 deletions
diff --git a/framework/source/fwe/helper/propertysetcontainer.cxx b/framework/source/fwe/helper/propertysetcontainer.cxx
index 5051d776f470..788a5e589801 100644
--- a/framework/source/fwe/helper/propertysetcontainer.cxx
+++ b/framework/source/fwe/helper/propertysetcontainer.cxx
@@ -105,7 +105,7 @@ void SAL_CALL PropertySetContainer::removeByIndex( sal_Int32 nIndex )
{
SolarMutexGuard g;
- if ( !((sal_Int32)m_aPropertySetVector.size() > nIndex) )
+ if ( (sal_Int32)m_aPropertySetVector.size() <= nIndex )
throw IndexOutOfBoundsException( OUString(), static_cast<OWeakObject *>(this) );
m_aPropertySetVector.erase(m_aPropertySetVector.begin() + nIndex);
@@ -114,7 +114,7 @@ void SAL_CALL PropertySetContainer::removeByIndex( sal_Int32 nIndex )
// XIndexReplace
void SAL_CALL PropertySetContainer::replaceByIndex( sal_Int32 Index, const css::uno::Any& Element )
{
- if ( !((sal_Int32)m_aPropertySetVector.size() > Index) )
+ if ( (sal_Int32)m_aPropertySetVector.size() <= Index )
throw IndexOutOfBoundsException( OUString(), static_cast<OWeakObject *>(this) );
Reference< XPropertySet > aPropertySetElement;
diff --git a/framework/source/fwi/uielement/itemcontainer.cxx b/framework/source/fwi/uielement/itemcontainer.cxx
index ec57f33b07a4..ba9e78128619 100644
--- a/framework/source/fwi/uielement/itemcontainer.cxx
+++ b/framework/source/fwi/uielement/itemcontainer.cxx
@@ -210,7 +210,7 @@ void SAL_CALL ItemContainer::replaceByIndex( sal_Int32 Index, const Any& aItem )
static_cast<OWeakObject *>(this), 2 );
ShareGuard aLock( m_aShareMutex );
- if ( !(sal_Int32( m_aItemVector.size()) > Index) )
+ if ( sal_Int32( m_aItemVector.size()) <= Index )
throw IndexOutOfBoundsException( OUString(), static_cast<OWeakObject *>(this) );
m_aItemVector[Index] = aSeq;
diff --git a/framework/source/fwi/uielement/rootitemcontainer.cxx b/framework/source/fwi/uielement/rootitemcontainer.cxx
index 72f41e761a1e..ee6e078ed3d9 100644
--- a/framework/source/fwi/uielement/rootitemcontainer.cxx
+++ b/framework/source/fwi/uielement/rootitemcontainer.cxx
@@ -224,7 +224,7 @@ void SAL_CALL RootItemContainer::replaceByIndex( sal_Int32 Index, const Any& aIt
throw IllegalArgumentException( WRONG_TYPE_EXCEPTION, static_cast<OWeakObject *>(this), 2 );
ShareGuard aLock( m_aShareMutex );
- if ( !(sal_Int32( m_aItemVector.size()) > Index) )
+ if ( sal_Int32( m_aItemVector.size()) <= Index )
throw IndexOutOfBoundsException( OUString(), static_cast<OWeakObject *>(this) );
m_aItemVector[Index] = aSeq;
diff --git a/framework/source/layoutmanager/uielement.cxx b/framework/source/layoutmanager/uielement.cxx
index be210277c6c0..097911b16441 100644
--- a/framework/source/layoutmanager/uielement.cxx
+++ b/framework/source/layoutmanager/uielement.cxx
@@ -61,7 +61,7 @@ namespace framework
if ( m_aDockedData.m_nDockedArea == ui::DockingArea_DOCKINGAREA_TOP ||
m_aDockedData.m_nDockedArea == ui::DockingArea_DOCKINGAREA_BOTTOM )
{
- if ( !( m_aDockedData.m_aPos.Y == aUIElement.m_aDockedData.m_aPos.Y ) )
+ if ( m_aDockedData.m_aPos.Y != aUIElement.m_aDockedData.m_aPos.Y )
return ( m_aDockedData.m_aPos.Y < aUIElement.m_aDockedData.m_aPos.Y );
else
{
@@ -76,7 +76,7 @@ namespace framework
}
else
{
- if ( !( m_aDockedData.m_aPos.X == aUIElement.m_aDockedData.m_aPos.X ) )
+ if ( m_aDockedData.m_aPos.X != aUIElement.m_aDockedData.m_aPos.X )
return ( m_aDockedData.m_aPos.X < aUIElement.m_aDockedData.m_aPos.X );
else
{