diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-07-05 08:32:57 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-07-05 11:08:48 +0200 |
commit | 4b2262ab5b10f334f1984fec84d2978db81c58f1 (patch) | |
tree | de56663eba6ed2edf7a26127339dd8563fdf47be /svx | |
parent | ec1de6895d84fbe4f2d5fb7135a59a918138d970 (diff) |
new loplugin unnecessaryparen
Change-Id: Ic883a07b30069ca6342d7521c8ad890f4326f0ec
Reviewed-on: https://gerrit.libreoffice.org/39549
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/customshapes/EnhancedCustomShape2d.cxx | 8 | ||||
-rw-r--r-- | svx/source/dialog/dlgctrl.cxx | 4 | ||||
-rw-r--r-- | svx/source/fmcomp/dbaexchange.cxx | 2 | ||||
-rw-r--r-- | svx/source/form/formcontroller.cxx | 5 | ||||
-rw-r--r-- | svx/source/sidebar/nbdtmg.cxx | 6 | ||||
-rw-r--r-- | svx/source/svdraw/svdmrkv.cxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svdoashp.cxx | 4 | ||||
-rw-r--r-- | svx/source/svdraw/svdotextdecomposition.cxx | 2 | ||||
-rw-r--r-- | svx/source/table/tablecontroller.cxx | 12 | ||||
-rw-r--r-- | svx/source/table/tablelayouter.cxx | 2 | ||||
-rw-r--r-- | svx/source/table/viewcontactoftableobj.cxx | 4 | ||||
-rw-r--r-- | svx/source/tbxctrls/colrctrl.cxx | 6 | ||||
-rw-r--r-- | svx/source/unodraw/UnoNamespaceMap.cxx | 2 | ||||
-rw-r--r-- | svx/source/unodraw/unoshape.cxx | 7 |
14 files changed, 33 insertions, 33 deletions
diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx index e6bb4233d98c..c84e790f95c4 100644 --- a/svx/source/customshapes/EnhancedCustomShape2d.cxx +++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx @@ -1798,10 +1798,10 @@ void EnhancedCustomShape2d::CreateSubPath( sal_Int32& rSrcPt, sal_Int32& rSegmen Point aCenter( aRect.Center() ); Point aStart( GetPoint( seqCoordinates[ (sal_uInt16)( rSrcPt + nXor ) ], true, true ) ); Point aEnd( GetPoint( seqCoordinates[ (sal_uInt16)( rSrcPt + ( nXor ^ 1 ) ) ], true, true ) ); - aStart.X() = (sal_Int32)( ( (double)( aStart.X() - aCenter.X() ) ) ) + aCenter.X(); - aStart.Y() = (sal_Int32)( ( (double)( aStart.Y() - aCenter.Y() ) ) ) + aCenter.Y(); - aEnd.X() = (sal_Int32)( ( (double)( aEnd.X() - aCenter.X() ) ) ) + aCenter.X(); - aEnd.Y() = (sal_Int32)( ( (double)( aEnd.Y() - aCenter.Y() ) ) ) + aCenter.Y(); + aStart.X() = (sal_Int32)( (double)( aStart.X() - aCenter.X() ) ) + aCenter.X(); + aStart.Y() = (sal_Int32)( (double)( aStart.Y() - aCenter.Y() ) ) + aCenter.Y(); + aEnd.X() = (sal_Int32)( (double)( aEnd.X() - aCenter.X() ) ) + aCenter.X(); + aEnd.Y() = (sal_Int32)( (double)( aEnd.Y() - aCenter.Y() ) ) + aCenter.Y(); aNewB2DPolygon.append(CreateArc( aRect, aStart, aEnd, bClockwise)); } rSrcPt += 4; diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx index 09dffac31784..b55c16ef6cdb 100644 --- a/svx/source/dialog/dlgctrl.cxx +++ b/svx/source/dialog/dlgctrl.cxx @@ -888,7 +888,7 @@ void SvxPixelCtl::KeyInput( const KeyEvent& rKEvt ) switch(nCode) { case KEY_LEFT: - if((aFocusPosition.getX() >= 1)) + if(aFocusPosition.getX() >= 1) { aFocusPosition.setX( aFocusPosition.getX() - 1 ); Invalidate(aRepaintRect); @@ -904,7 +904,7 @@ void SvxPixelCtl::KeyInput( const KeyEvent& rKEvt ) } break; case KEY_UP: - if((aFocusPosition.getY() >= 1)) + if(aFocusPosition.getY() >= 1) { aFocusPosition.setY( aFocusPosition.getY() - 1 ); Invalidate(aRepaintRect); diff --git a/svx/source/fmcomp/dbaexchange.cxx b/svx/source/fmcomp/dbaexchange.cxx index e8c422914628..3763af2683a1 100644 --- a/svx/source/fmcomp/dbaexchange.cxx +++ b/svx/source/fmcomp/dbaexchange.cxx @@ -425,7 +425,7 @@ namespace svx ,sConnectionResource ,nObjectType ,sObjectName,xConnection - ,!((CommandType::QUERY == nObjectType)) + ,CommandType::QUERY != nObjectType ,sCompleteStatement); } diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx index 89518e9de4ac..db123f977bb9 100644 --- a/svx/source/form/formcontroller.cxx +++ b/svx/source/form/formcontroller.cxx @@ -2158,8 +2158,9 @@ void FormController::setControlLock(const Reference< XControl > & xControl) // a. if the entire record is locked // b. if the associated field is locked Reference< XBoundControl > xBound(xControl, UNO_QUERY); - if (xBound.is() && (( (bLocked && bLocked != bool(xBound->getLock())) || - !bLocked))) // always uncheck individual fields when unlocking + if (xBound.is() && + ( (bLocked && bLocked != bool(xBound->getLock())) || + !bLocked)) // always uncheck individual fields when unlocking { // there is a data source Reference< XPropertySet > xSet(xControl->getModel(), UNO_QUERY); diff --git a/svx/source/sidebar/nbdtmg.cxx b/svx/source/sidebar/nbdtmg.cxx index 5144e4023bea..6a81478a0c9b 100644 --- a/svx/source/sidebar/nbdtmg.cxx +++ b/svx/source/sidebar/nbdtmg.cxx @@ -285,9 +285,9 @@ sal_uInt16 BulletsTypeMgr::GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 mLe sal_Unicode cChar = aFmt.GetBulletChar(); for(sal_uInt16 i = nFromIndex; i < DEFAULT_BULLET_TYPES; i++) { - if ( (cChar == pActualBullets[i]->cBulletChar|| - (cChar == 9830 && 57356 == pActualBullets[i]->cBulletChar) || - (cChar == 9632 && 57354 == pActualBullets[i]->cBulletChar))) + if ( (cChar == pActualBullets[i]->cBulletChar) || + (cChar == 9830 && 57356 == pActualBullets[i]->cBulletChar) || + (cChar == 9632 && 57354 == pActualBullets[i]->cBulletChar) ) { return i+1; } diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx index 846a067e3d8b..a68dccb5c1a8 100644 --- a/svx/source/svdraw/svdmrkv.cxx +++ b/svx/source/svdraw/svdmrkv.cxx @@ -1651,7 +1651,7 @@ SdrObject* SdrMarkView::CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nT if (aRect.IsInside(rPnt)) { - if ((!bCheckIfMarkable || IsObjMarkable(pObj,pPV))) + if (!bCheckIfMarkable || IsObjMarkable(pObj,pPV)) { SdrObjList* pOL=pObj->GetSubList(); diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx index f672e5072c48..42c105bfe628 100644 --- a/svx/source/svdraw/svdoashp.cxx +++ b/svx/source/svdraw/svdoashp.cxx @@ -1000,7 +1000,7 @@ void SdrObjCustomShape::MergeDefaultAttributes( const OUString* pType ) if ( !pAny && pDefCustomShape ) { sal_Int32 nXRef = pDefCustomShape->nXRef; - if ( ( nXRef != DEFAULT_MINIMUM_SIGNED_COMPARE ) ) + if ( nXRef != DEFAULT_MINIMUM_SIGNED_COMPARE ) { aPropVal.Name = sStretchX; aPropVal.Value <<= nXRef; @@ -1014,7 +1014,7 @@ void SdrObjCustomShape::MergeDefaultAttributes( const OUString* pType ) if ( !pAny && pDefCustomShape ) { sal_Int32 nYRef = pDefCustomShape->nYRef; - if ( ( nYRef != DEFAULT_MINIMUM_SIGNED_COMPARE ) ) + if ( nYRef != DEFAULT_MINIMUM_SIGNED_COMPARE ) { aPropVal.Name = sStretchY; aPropVal.Value <<= nYRef; diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx index a05a428b6798..0ba47e9b4c83 100644 --- a/svx/source/svdraw/svdotextdecomposition.cxx +++ b/svx/source/svdraw/svdotextdecomposition.cxx @@ -762,7 +762,7 @@ void SdrTextObj::impDecomposeAutoFitTextPrimitive( const bool bTopToBottom(pOutlinerParaObject->IsTopToBottom()); const Size aAnchorTextSize(Size(nAnchorTextWidth, nAnchorTextHeight)); - if((rSdrAutofitTextPrimitive.getWordWrap() || IsTextFrame())) + if(rSdrAutofitTextPrimitive.getWordWrap() || IsTextFrame()) { rOutliner.SetMaxAutoPaperSize(aAnchorTextSize); } diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx index a9850d598b03..3e49ca7b07b4 100644 --- a/svx/source/table/tablecontroller.cxx +++ b/svx/source/table/tablecontroller.cxx @@ -1126,22 +1126,22 @@ void SvxTableController::SetTableStyleSettings( const SfxItemSet* pArgs ) const SfxPoolItem *pPoolItem=nullptr; - if( (SfxItemState::SET == pArgs->GetItemState(ID_VAL_USEFIRSTROWSTYLE, false,&pPoolItem)) ) + if( SfxItemState::SET == pArgs->GetItemState(ID_VAL_USEFIRSTROWSTYLE, false,&pPoolItem) ) aSettings.mbUseFirstRow = static_cast< const SfxBoolItem* >(pPoolItem)->GetValue(); - if( (SfxItemState::SET == pArgs->GetItemState(ID_VAL_USELASTROWSTYLE, false,&pPoolItem)) ) + if( SfxItemState::SET == pArgs->GetItemState(ID_VAL_USELASTROWSTYLE, false,&pPoolItem) ) aSettings.mbUseLastRow = static_cast< const SfxBoolItem* >(pPoolItem)->GetValue(); - if( (SfxItemState::SET == pArgs->GetItemState(ID_VAL_USEBANDINGROWSTYLE, false,&pPoolItem)) ) + if( SfxItemState::SET == pArgs->GetItemState(ID_VAL_USEBANDINGROWSTYLE, false,&pPoolItem) ) aSettings.mbUseRowBanding = static_cast< const SfxBoolItem* >(pPoolItem)->GetValue(); - if( (SfxItemState::SET == pArgs->GetItemState(ID_VAL_USEFIRSTCOLUMNSTYLE, false,&pPoolItem)) ) + if( SfxItemState::SET == pArgs->GetItemState(ID_VAL_USEFIRSTCOLUMNSTYLE, false,&pPoolItem) ) aSettings.mbUseFirstColumn = static_cast< const SfxBoolItem* >(pPoolItem)->GetValue(); - if( (SfxItemState::SET == pArgs->GetItemState(ID_VAL_USELASTCOLUMNSTYLE, false,&pPoolItem)) ) + if( SfxItemState::SET == pArgs->GetItemState(ID_VAL_USELASTCOLUMNSTYLE, false,&pPoolItem) ) aSettings.mbUseLastColumn = static_cast< const SfxBoolItem* >(pPoolItem)->GetValue(); - if( (SfxItemState::SET == pArgs->GetItemState(ID_VAL_USEBANDINGCOLUMNSTYLE, false,&pPoolItem)) ) + if( SfxItemState::SET == pArgs->GetItemState(ID_VAL_USEBANDINGCOLUMNSTYLE, false,&pPoolItem) ) aSettings.mbUseColumnBanding = static_cast< const SfxBoolItem* >(pPoolItem)->GetValue(); if( aSettings == pTableObj->getTableStyleSettings() ) diff --git a/svx/source/table/tablelayouter.cxx b/svx/source/table/tablelayouter.cxx index 19ac6bfea300..b48833191503 100644 --- a/svx/source/table/tablelayouter.cxx +++ b/svx/source/table/tablelayouter.cxx @@ -118,7 +118,7 @@ bool TableLayouter::getCellArea( const CellRef& xCell, const CellPos& rPos, base const basegfx::B2ITuple aCellSize( getCellSize( xCell, rPos ) ); const bool bRTL = (mxTable->getSdrTableObj()->GetWritingMode() == WritingMode_RL_TB); - if( (rPos.mnCol < ((sal_Int32)maColumns.size()) && (rPos.mnRow < ((sal_Int32)maRows.size()) ) ) ) + if( (rPos.mnCol < ((sal_Int32)maColumns.size())) && (rPos.mnRow < ((sal_Int32)maRows.size()) ) ) { const sal_Int32 y = maRows[rPos.mnRow].mnPos; diff --git a/svx/source/table/viewcontactoftableobj.cxx b/svx/source/table/viewcontactoftableobj.cxx index fc1adcda3dad..27409ce2ddee 100644 --- a/svx/source/table/viewcontactoftableobj.cxx +++ b/svx/source/table/viewcontactoftableobj.cxx @@ -255,11 +255,11 @@ namespace drawinglayer if(!rLineSide.isEmpty()) { // reduce to inner edge of associated matching line - nExtend = -((getBorderLineWidth(rLineSide) / 2.0)); + nExtend = -(getBorderLineWidth(rLineSide) / 2.0); } else { - nExtend = ((getBorderLineWidth(rLineOpposite) / 2.0)); + nExtend = (getBorderLineWidth(rLineOpposite) / 2.0); } return nExtend; diff --git a/svx/source/tbxctrls/colrctrl.cxx b/svx/source/tbxctrls/colrctrl.cxx index de140408609d..faaf6552b800 100644 --- a/svx/source/tbxctrls/colrctrl.cxx +++ b/svx/source/tbxctrls/colrctrl.cxx @@ -457,8 +457,8 @@ void SvxColorDockingWindow::Resizing( Size& rNewSize ) if( nScrollWidth > 0 ) { // calculate columns with scroll bar - nCols = (sal_uInt16) ( ( ( (float) rNewSize.Width() - (float) nScrollWidth ) ) - / (float) aItemSize.Width() + 0.5 ); + nCols = (sal_uInt16) ( ( (float) rNewSize.Width() - (float) nScrollWidth ) + / (float) aItemSize.Width() + 0.5 ); } if( nCols <= 1 ) nCols = 2; @@ -497,7 +497,7 @@ void SvxColorDockingWindow::GetFocus() bool SvxColorDockingWindow::EventNotify( NotifyEvent& rNEvt ) { bool bRet = false; - if( ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) ) + if( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) { KeyEvent aKeyEvt = *rNEvt.GetKeyEvent(); sal_uInt16 nKeyCode = aKeyEvt.GetKeyCode().GetCode(); diff --git a/svx/source/unodraw/UnoNamespaceMap.cxx b/svx/source/unodraw/UnoNamespaceMap.cxx index 14b274a1f9de..4eb77feb7986 100644 --- a/svx/source/unodraw/UnoNamespaceMap.cxx +++ b/svx/source/unodraw/UnoNamespaceMap.cxx @@ -165,7 +165,7 @@ bool NamespaceIteratorImpl::next( OUString& rPrefix, OUString& rURL ) // get that item and see if there namespaces inside const SvXMLAttrContainerItem *pUnknown = static_cast<const SvXMLAttrContainerItem *>(pItem); - if( (pUnknown->GetAttrCount() > 0) ) + if( pUnknown->GetAttrCount() > 0 ) { mpCurrentAttr = pUnknown; mnCurrentAttr = pUnknown->GetFirstNamespaceIndex(); diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx index ccc976217b67..42b0f4b16463 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -1013,10 +1013,9 @@ void SvxShape::Notify( SfxBroadcaster&, const SfxHint& rHint ) throw() // #i55919# SdrHintKind::ObjectChange is only interesting if it's for this object const SdrHint* pSdrHint = dynamic_cast<const SdrHint*>(&rHint); - if (!pSdrHint || ( /* (pSdrHint->GetKind() != SdrHintKind::ObjectRemoved) && */ - (pSdrHint->GetKind() != SdrHintKind::ModelCleared) && - // #110094#-9 (pSdrHint->GetKind() != HINT_OBJLISTCLEAR) && - ((pSdrHint->GetKind() != SdrHintKind::ObjectChange || pSdrHint->GetObject() != mpObj.get() )))) + if (!pSdrHint || + ((pSdrHint->GetKind() != SdrHintKind::ModelCleared) && + (pSdrHint->GetKind() != SdrHintKind::ObjectChange || pSdrHint->GetObject() != mpObj.get() ))) return; uno::Reference< uno::XInterface > xSelf( mpObj->getWeakUnoShape() ); |