diff options
-rw-r--r-- | accessibility/source/extended/accessibletabbarpagelist.cxx | 6 | ||||
-rw-r--r-- | accessibility/source/standard/accessiblemenubasecomponent.cxx | 2 | ||||
-rw-r--r-- | accessibility/source/standard/vclxaccessiblestatusbar.cxx | 8 | ||||
-rw-r--r-- | accessibility/source/standard/vclxaccessibletabcontrol.cxx | 4 | ||||
-rw-r--r-- | basctl/source/basicide/basidesh.cxx | 4 | ||||
-rw-r--r-- | basctl/source/basicide/brkdlg.cxx | 2 | ||||
-rw-r--r-- | basegfx/source/polygon/b2dpolygoncutandtouch.cxx | 2 | ||||
-rw-r--r-- | basegfx/source/polygon/b2dsvgpolypolygon.cxx | 2 | ||||
-rw-r--r-- | basic/source/classes/sbxmod.cxx | 4 | ||||
-rw-r--r-- | basic/source/comp/dim.cxx | 6 | ||||
-rw-r--r-- | basic/source/sbx/sbxobj.cxx | 2 |
11 files changed, 21 insertions, 21 deletions
diff --git a/accessibility/source/extended/accessibletabbarpagelist.cxx b/accessibility/source/extended/accessibletabbarpagelist.cxx index 680e0e70ba97..7fd901037c07 100644 --- a/accessibility/source/extended/accessibletabbarpagelist.cxx +++ b/accessibility/source/extended/accessibletabbarpagelist.cxx @@ -88,7 +88,7 @@ namespace accessibility void AccessibleTabBarPageList::UpdatePageText( sal_Int32 i ) { - if ( !(i >= 0 && i < static_cast<sal_Int32>(m_aAccessibleChildren.size())) ) + if ( i < 0 || i >= static_cast<sal_Int32>(m_aAccessibleChildren.size()) ) return; Reference< XAccessible > xChild( m_aAccessibleChildren[i] ); @@ -106,7 +106,7 @@ namespace accessibility void AccessibleTabBarPageList::InsertChild( sal_Int32 i ) { - if ( !(i >= 0 && i <= static_cast<sal_Int32>(m_aAccessibleChildren.size())) ) + if ( i < 0 || i > static_cast<sal_Int32>(m_aAccessibleChildren.size()) ) return; // insert entry in child list @@ -125,7 +125,7 @@ namespace accessibility void AccessibleTabBarPageList::RemoveChild( sal_Int32 i ) { - if ( !(i >= 0 && i < static_cast<sal_Int32>(m_aAccessibleChildren.size())) ) + if ( i < 0 || i >= static_cast<sal_Int32>(m_aAccessibleChildren.size()) ) return; // get the accessible of the removed page diff --git a/accessibility/source/standard/accessiblemenubasecomponent.cxx b/accessibility/source/standard/accessiblemenubasecomponent.cxx index d3070d1bacb6..3c5cdd53c71f 100644 --- a/accessibility/source/standard/accessiblemenubasecomponent.cxx +++ b/accessibility/source/standard/accessiblemenubasecomponent.cxx @@ -409,7 +409,7 @@ void OAccessibleMenuBaseComponent::InsertChild( sal_Int32 i ) void OAccessibleMenuBaseComponent::RemoveChild( sal_Int32 i ) { - if ( !(i >= 0 && i < static_cast<sal_Int32>(m_aAccessibleChildren.size())) ) + if ( i < 0 || i >= static_cast<sal_Int32>(m_aAccessibleChildren.size()) ) return; // keep the accessible of the removed item diff --git a/accessibility/source/standard/vclxaccessiblestatusbar.cxx b/accessibility/source/standard/vclxaccessiblestatusbar.cxx index ff6351c6bd7c..e84825ea0b3f 100644 --- a/accessibility/source/standard/vclxaccessiblestatusbar.cxx +++ b/accessibility/source/standard/vclxaccessiblestatusbar.cxx @@ -62,7 +62,7 @@ void VCLXAccessibleStatusBar::UpdateShowing( sal_Int32 i, bool bShowing ) void VCLXAccessibleStatusBar::UpdateItemName( sal_Int32 i ) { - if ( !(i >= 0 && i < static_cast<sal_Int32>(m_aAccessibleChildren.size())) ) + if ( i < 0 || i >= static_cast<sal_Int32>(m_aAccessibleChildren.size()) ) return; Reference< XAccessible > xChild( m_aAccessibleChildren[i] ); @@ -80,7 +80,7 @@ void VCLXAccessibleStatusBar::UpdateItemName( sal_Int32 i ) void VCLXAccessibleStatusBar::UpdateItemText( sal_Int32 i ) { - if ( !(i >= 0 && i < static_cast<sal_Int32>(m_aAccessibleChildren.size())) ) + if ( i < 0 || i >= static_cast<sal_Int32>(m_aAccessibleChildren.size()) ) return; Reference< XAccessible > xChild( m_aAccessibleChildren[i] ); @@ -98,7 +98,7 @@ void VCLXAccessibleStatusBar::UpdateItemText( sal_Int32 i ) void VCLXAccessibleStatusBar::InsertChild( sal_Int32 i ) { - if ( !(i >= 0 && i <= static_cast<sal_Int32>(m_aAccessibleChildren.size())) ) + if ( i < 0 || i > static_cast<sal_Int32>(m_aAccessibleChildren.size()) ) return; // insert entry in child list @@ -117,7 +117,7 @@ void VCLXAccessibleStatusBar::InsertChild( sal_Int32 i ) void VCLXAccessibleStatusBar::RemoveChild( sal_Int32 i ) { - if ( !(i >= 0 && i < static_cast<sal_Int32>(m_aAccessibleChildren.size())) ) + if ( i < 0 || i >= static_cast<sal_Int32>(m_aAccessibleChildren.size()) ) return; // get the accessible of the removed page diff --git a/accessibility/source/standard/vclxaccessibletabcontrol.cxx b/accessibility/source/standard/vclxaccessibletabcontrol.cxx index 4842e43b2c6c..29fea97781a6 100644 --- a/accessibility/source/standard/vclxaccessibletabcontrol.cxx +++ b/accessibility/source/standard/vclxaccessibletabcontrol.cxx @@ -116,7 +116,7 @@ void VCLXAccessibleTabControl::UpdateTabPage( sal_Int32 i, bool bNew ) void VCLXAccessibleTabControl::InsertChild( sal_Int32 i ) { - if ( !(i >= 0 && i <= static_cast<sal_Int32>(m_aAccessibleChildren.size())) ) + if ( i < 0 || i > static_cast<sal_Int32>(m_aAccessibleChildren.size()) ) return; // insert entry in child list @@ -135,7 +135,7 @@ void VCLXAccessibleTabControl::InsertChild( sal_Int32 i ) void VCLXAccessibleTabControl::RemoveChild( sal_Int32 i ) { - if ( !(i >= 0 && i < static_cast<sal_Int32>(m_aAccessibleChildren.size())) ) + if ( i < 0 || i >= static_cast<sal_Int32>(m_aAccessibleChildren.size()) ) return; // get the accessible of the removed page diff --git a/basctl/source/basicide/basidesh.cxx b/basctl/source/basicide/basidesh.cxx index 896b77f2f892..3a2259bf40ac 100644 --- a/basctl/source/basicide/basidesh.cxx +++ b/basctl/source/basicide/basidesh.cxx @@ -487,8 +487,8 @@ void Shell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) return; const SfxHintId nHintId = pSbxHint->GetId(); - if ( !(( nHintId == SfxHintId::BasicStart ) || - ( nHintId == SfxHintId::BasicStop )) ) + if ( ( nHintId != SfxHintId::BasicStart ) && + ( nHintId != SfxHintId::BasicStop ) ) return; if (SfxBindings* pBindings = GetBindingsPtr()) diff --git a/basctl/source/basicide/brkdlg.cxx b/basctl/source/basicide/brkdlg.cxx index 15a4b5a91d05..e5fafd545331 100644 --- a/basctl/source/basicide/brkdlg.cxx +++ b/basctl/source/basicide/brkdlg.cxx @@ -47,7 +47,7 @@ bool lcl_ParseText(OUString const &rText, size_t& rLineNr ) if (aText.isEmpty()) return false; sal_Unicode cFirst = aText[0]; - if (cFirst != '#' && !(cFirst >= '0' && cFirst <= '9')) + if (cFirst != '#' && (cFirst < '0' || cFirst > '9')) return false; if (cFirst == '#') aText = aText.copy(1); diff --git a/basegfx/source/polygon/b2dpolygoncutandtouch.cxx b/basegfx/source/polygon/b2dpolygoncutandtouch.cxx index a8ae6372d5ea..99a73ca82bc3 100644 --- a/basegfx/source/polygon/b2dpolygoncutandtouch.cxx +++ b/basegfx/source/polygon/b2dpolygoncutandtouch.cxx @@ -278,7 +278,7 @@ namespace basegfx const sal_uInt32 nPointCountA(rCandidateA.count()); const sal_uInt32 nPointCountB(rCandidateB.count()); - if(!(nPointCountA > 1 && nPointCountB > 1)) + if(nPointCountA <= 1 || nPointCountB <= 1) return; const sal_uInt32 nEdgeCountA(nPointCountA - 1); diff --git a/basegfx/source/polygon/b2dsvgpolypolygon.cxx b/basegfx/source/polygon/b2dsvgpolypolygon.cxx index e8ec2cf6e76e..323fff14c024 100644 --- a/basegfx/source/polygon/b2dsvgpolypolygon.cxx +++ b/basegfx/source/polygon/b2dsvgpolypolygon.cxx @@ -93,7 +93,7 @@ namespace basegfx::utils bool bRelative(false); const sal_Unicode aCurrChar(rSvgDStatement[nPos]); - if(o_rPolyPolygon.count() && !aCurrPoly.count() && !(aCurrChar == 'm' || aCurrChar == 'M')) + if(o_rPolyPolygon.count() && !aCurrPoly.count() && aCurrChar != 'm' && aCurrChar != 'M') { // we have a new sub-polygon starting, but without a 'moveto' command. // this requires to add the current point as start point to the polygon diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx index 0232c01ca44e..b735933ea9b9 100644 --- a/basic/source/classes/sbxmod.cxx +++ b/basic/source/classes/sbxmod.cxx @@ -1482,7 +1482,7 @@ const sal_uInt8* SbModule::FindNextStmnt( const sal_uInt8* p, sal_uInt16& nLine, p += 8; nPC += 8; } - else if( !( eOp >= SbiOpcode::SbOP0_START && eOp <= SbiOpcode::SbOP0_END ) ) + else if( eOp < SbiOpcode::SbOP0_START || eOp > SbiOpcode::SbOP0_END ) { StarBASIC::FatalError( ERRCODE_BASIC_INTERNAL_ERROR ); break; @@ -1759,7 +1759,7 @@ bool SbModule::HasExeCode() } bool bRes = false; - if (pImage && !(pImage->GetCodeSize() == 5 && (memcmp(pImage->GetCode(), pEmptyImage, pImage->GetCodeSize()) == 0 ))) + if (pImage && (pImage->GetCodeSize() != 5 || (memcmp(pImage->GetCode(), pEmptyImage, pImage->GetCodeSize()) != 0 ))) bRes = true; return bRes; diff --git a/basic/source/comp/dim.cxx b/basic/source/comp/dim.cxx index 211d4e325f5b..43352aea3f1f 100644 --- a/basic/source/comp/dim.cxx +++ b/basic/source/comp/dim.cxx @@ -316,7 +316,7 @@ void SbiParser::DefVar( SbiOpcode eOp, bool bStatic ) if( pOld ) bRtlSym = true; } - if( pOld && !(eOp == SbiOpcode::REDIM_ || eOp == SbiOpcode::REDIMP_) ) + if( pOld && eOp != SbiOpcode::REDIM_ && eOp != SbiOpcode::REDIMP_ ) { if( pDef->GetScope() == SbLOCAL ) if (auto eOldScope = pOld->GetScope(); eOldScope != SbLOCAL && eOldScope != SbPARAM) @@ -337,7 +337,7 @@ void SbiParser::DefVar( SbiOpcode eOp, bool bStatic ) } else if( pOld->GetType() != ( eDefType = pDef->GetType() ) ) { - if( !( eDefType == SbxVARIANT && !pDef->IsDefinedAs() ) ) + if( eDefType != SbxVARIANT || pDef->IsDefinedAs() ) bError_ = true; } if( bError_ ) @@ -352,7 +352,7 @@ void SbiParser::DefVar( SbiOpcode eOp, bool bStatic ) // #36374: Create the variable in front of the distinction IsNew() // Otherwise error at Dim Identifier As New Type and option explicit - if( !bDefined && !(eOp == SbiOpcode::REDIM_ || eOp == SbiOpcode::REDIMP_) + if( !bDefined && eOp != SbiOpcode::REDIM_ && eOp != SbiOpcode::REDIMP_ && ( !bConst || pDef->GetScope() == SbGLOBAL ) ) { // Declare variable or global constant diff --git a/basic/source/sbx/sbxobj.cxx b/basic/source/sbx/sbxobj.cxx index fe42fa1939a1..58056dd39acd 100644 --- a/basic/source/sbx/sbxobj.cxx +++ b/basic/source/sbx/sbxobj.cxx @@ -356,7 +356,7 @@ SbxVariable* SbxObject::Make( const OUString& rName, SbxClassType ct, SbxDataTyp return nullptr; } // Collections may contain objects of the same name - if( !( ct == SbxClassType::Object && dynamic_cast<const SbxCollection*>( this ) != nullptr ) ) + if( ct != SbxClassType::Object || dynamic_cast<const SbxCollection*>( this ) == nullptr ) { SbxVariable* pRes = pArray->Find( rName, ct ); if( pRes ) |