From 7a1c21e53fc4733a4bb52282ce0098fcc085ab0e Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 22 Nov 2017 09:33:32 +0200 Subject: loplugin:simplifybool for negation of comparison operator Change-Id: Ie56daf560185274754afbc7a09c432b5c2793791 Reviewed-on: https://gerrit.libreoffice.org/45068 Tested-by: Jenkins Reviewed-by: Noel Grandin --- framework/source/fwi/uielement/itemcontainer.cxx | 2 +- framework/source/fwi/uielement/rootitemcontainer.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'framework/source/fwi') 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(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(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(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(this) ); m_aItemVector[Index] = aSeq; -- cgit