diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-12-04 11:20:03 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-12-05 07:49:30 +0100 |
commit | e4472d3c139294499f4c0caeebd9d4e995958eb0 (patch) | |
tree | 3e62a6530f8b758dddab18981ee38cc76ecaef9e /svtools | |
parent | 126e5a4d5b1d6c7ba5b313786793a38f99488b33 (diff) |
loplugin:unnecessaryparen include more assignments
Change-Id: I9fb8366634b31230b732dd38a98f800075529714
Reviewed-on: https://gerrit.libreoffice.org/64510
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/config/printoptions.cxx | 2 | ||||
-rw-r--r-- | svtools/source/contnr/fileview.cxx | 2 | ||||
-rw-r--r-- | svtools/source/contnr/iconviewimpl.cxx | 18 | ||||
-rw-r--r-- | svtools/source/contnr/imivctl1.cxx | 6 | ||||
-rw-r--r-- | svtools/source/contnr/imivctl2.cxx | 2 | ||||
-rw-r--r-- | svtools/source/control/calendar.cxx | 2 | ||||
-rw-r--r-- | svtools/source/control/ruler.cxx | 2 | ||||
-rw-r--r-- | svtools/source/control/toolbarmenu.cxx | 2 | ||||
-rw-r--r-- | svtools/source/dialogs/wizardmachine.cxx | 2 | ||||
-rw-r--r-- | svtools/source/svhtml/parhtml.cxx | 2 | ||||
-rw-r--r-- | svtools/source/uno/unoevent.cxx | 2 |
11 files changed, 21 insertions, 21 deletions
diff --git a/svtools/source/config/printoptions.cxx b/svtools/source/config/printoptions.cxx index a0beda999bb0..c5bc4950c162 100644 --- a/svtools/source/config/printoptions.cxx +++ b/svtools/source/config/printoptions.cxx @@ -680,7 +680,7 @@ void SvtBasePrintOptions::SetPrinterOptions( const PrinterOptions& rOptions ) SetReducedBitmapResolution( 0 ); else { - for( long i = ( DPI_COUNT - 1 ); i >= 0; i-- ) + for( long i = DPI_COUNT - 1; i >= 0; i-- ) { if( nDPI >= aDPIArray[ i ] ) { diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx index 72a42bcd3b56..14d4a0b2e5b2 100644 --- a/svtools/source/contnr/fileview.cxx +++ b/svtools/source/contnr/fileview.cxx @@ -390,7 +390,7 @@ ViewTabListBox_Impl::ViewTabListBox_Impl( vcl::Window* pParentWin, mpHeaderBar = VclPtr<HeaderBar>::Create( pParentWin, WB_BUTTONSTYLE | WB_BOTTOMBORDER ); mpHeaderBar->SetPosSizePixel( Point( 0, 0 ), mpHeaderBar->CalcWindowSizePixel() ); - HeaderBarItemBits nBits = ( HeaderBarItemBits::LEFT | HeaderBarItemBits::CLICKABLE ); + HeaderBarItemBits nBits = HeaderBarItemBits::LEFT | HeaderBarItemBits::CLICKABLE; long aTabPositions[] = { 20, 180, 320, 400, 600 }; SetTabs(SAL_N_ELEMENTS(aTabPositions), aTabPositions, MapUnit::MapPixel); diff --git a/svtools/source/contnr/iconviewimpl.cxx b/svtools/source/contnr/iconviewimpl.cxx index f1613fe4e6bd..0ffe52386b5b 100644 --- a/svtools/source/contnr/iconviewimpl.cxx +++ b/svtools/source/contnr/iconviewimpl.cxx @@ -39,7 +39,7 @@ void IconViewImpl::CursorUp() if( !pPrevFirstToDraw ) return; - nFlags &= (~LBoxFlags::Filling); + nFlags &= ~LBoxFlags::Filling; long nEntryHeight = pView->GetEntryHeight(); ShowCursor( false ); pView->Update(); @@ -64,7 +64,7 @@ void IconViewImpl::CursorDown() if( pNextFirstToDraw ) { - nFlags &= (~LBoxFlags::Filling); + nFlags &= ~LBoxFlags::Filling; ShowCursor( false ); pView->Update(); pStartEntry = pNextFirstToDraw; @@ -92,7 +92,7 @@ void IconViewImpl::PageDown( sal_uInt16 nDelta ) ShowCursor( false ); - nFlags &= (~LBoxFlags::Filling); + nFlags &= ~LBoxFlags::Filling; pView->Update(); pStartEntry = pNext; @@ -128,7 +128,7 @@ void IconViewImpl::PageUp( sal_uInt16 nDelta ) if( pPrev == pStartEntry ) return; - nFlags &= (~LBoxFlags::Filling); + nFlags &= ~LBoxFlags::Filling; ShowCursor( false ); pView->Update(); @@ -167,7 +167,7 @@ void IconViewImpl::KeyDown( bool bPageDown ) if( nDelta <= 0 ) return; - nFlags &= (~LBoxFlags::Filling); + nFlags &= ~LBoxFlags::Filling; BeginScroll(); aVerSBar->SetThumbPos( nThumbPos+nDelta ); @@ -198,7 +198,7 @@ void IconViewImpl::KeyUp( bool bPageUp ) if( nDelta < 0 ) return; - nFlags &= (~LBoxFlags::Filling); + nFlags &= ~LBoxFlags::Filling; BeginScroll(); aVerSBar->SetThumbPos( nThumbPos - nDelta ); @@ -433,9 +433,9 @@ void IconViewImpl::Paint(vcl::RenderContext& rRenderContext, const tools::Rectan pEntry = pView->NextVisible(pEntry); } - nFlags &= (~LBoxFlags::DeselectAll); + nFlags &= ~LBoxFlags::DeselectAll; rRenderContext.SetClipRegion(); - nFlags &= (~LBoxFlags::InPaint); + nFlags &= ~LBoxFlags::InPaint; } void IconViewImpl::InvalidateEntry( long nId ) const @@ -462,7 +462,7 @@ bool IconViewImpl::KeyInput( const KeyEvent& rKEvt ) if( rKeyCode.IsMod2() ) return false; // don't evaluate Alt key - nFlags &= (~LBoxFlags::Filling); + nFlags &= ~LBoxFlags::Filling; if( !pCursor ) pCursor = pStartEntry; diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx index 4193a3056b32..7807ed358058 100644 --- a/svtools/source/contnr/imivctl1.cxx +++ b/svtools/source/contnr/imivctl1.cxx @@ -1023,7 +1023,7 @@ bool SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& rKEvt ) if( rKEvt.GetKeyCode().IsShift() ) { if( nFlags & IconChoiceFlags::AddMode ) - nFlags &= (~IconChoiceFlags::AddMode); + nFlags &= ~IconChoiceFlags::AddMode; else nFlags |= IconChoiceFlags::AddMode; } @@ -2151,7 +2151,7 @@ void SvxIconChoiceCtrl_Impl::DeselectAllBut( SvxIconChoiceCtrlEntry const * pThi SelectEntry( pEntry, false, true ); } pAnchor = nullptr; - nFlags &= (~IconChoiceFlags::AddMode); + nFlags &= ~IconChoiceFlags::AddMode; } Size SvxIconChoiceCtrl_Impl::GetMinGrid() const @@ -2692,7 +2692,7 @@ void SvxIconChoiceCtrl_Impl::SelectAll() SvxIconChoiceCtrlEntry* pEntry = aEntries[ nCur ]; SelectEntry( pEntry, true/*bSelect*/, true ); } - nFlags &= (~IconChoiceFlags::AddMode); + nFlags &= ~IconChoiceFlags::AddMode; pAnchor = nullptr; } diff --git a/svtools/source/contnr/imivctl2.cxx b/svtools/source/contnr/imivctl2.cxx index ccbbe3e33c59..1a452e9e5cee 100644 --- a/svtools/source/contnr/imivctl2.cxx +++ b/svtools/source/contnr/imivctl2.cxx @@ -334,7 +334,7 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::GoPageUpDown( SvxIconChoiceCtrlEntry* pS if( pView->IsAutoArrange() && !(pView->nWinBits & WB_ALIGN_TOP) ) { const long nPos = static_cast<long>(pView->GetEntryListPos( pStart )); - long nEntriesInView = (pView->aOutputSize.Height() / pView->nGridDY); + long nEntriesInView = pView->aOutputSize.Height() / pView->nGridDY; nEntriesInView *= ((pView->aOutputSize.Width()+(pView->nGridDX/2)) / pView->nGridDX ); long nNewPos = nPos; diff --git a/svtools/source/control/calendar.cxx b/svtools/source/control/calendar.cxx index 61adb2802371..baf324e9b071 100644 --- a/svtools/source/control/calendar.cxx +++ b/svtools/source/control/calendar.cxx @@ -222,7 +222,7 @@ void Calendar::ImplFormat() mnMonthPerLine = aOutSize.Width() / mnMonthWidth; if ( !mnMonthPerLine ) mnMonthPerLine = 1; - long nOver = ((aOutSize.Width()-(mnMonthPerLine*mnMonthWidth)) / mnMonthPerLine); + long nOver = (aOutSize.Width()-(mnMonthPerLine*mnMonthWidth)) / mnMonthPerLine; mnMonthWidth += nOver; mnDaysOffX = MONTH_BORDERX; mnDaysOffX += nOver/2; diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx index 7baf7ffd1c86..d380523ca7aa 100644 --- a/svtools/source/control/ruler.cxx +++ b/svtools/source/control/ruler.cxx @@ -575,7 +575,7 @@ void Ruler::ImplDrawTicks(vcl::RenderContext& rRenderContext, long nMin, long nM n = aPixSize.Height(); // Tick4 - Output (Text) - double aStep = (nTick / nTick4); + double aStep = nTick / nTick4; double aRest = std::abs(aStep - std::floor(aStep)); double nAcceptanceDelta = 0.0001; diff --git a/svtools/source/control/toolbarmenu.cxx b/svtools/source/control/toolbarmenu.cxx index 4530ec1c54dc..76de7e8534b9 100644 --- a/svtools/source/control/toolbarmenu.cxx +++ b/svtools/source/control/toolbarmenu.cxx @@ -1199,7 +1199,7 @@ void ToolbarMenu::implPaint(vcl::RenderContext& rRenderContext, ToolbarMenuEntry if( aPos.Y() >= 0 ) { - long nTextOffsetY = ((pEntry->maSize.Height() - nFontHeight) / 2); + long nTextOffsetY = (pEntry->maSize.Height() - nFontHeight) / 2; DrawTextFlags nTextStyle = DrawTextFlags::NONE; DrawSymbolFlags nSymbolStyle = DrawSymbolFlags::NONE; diff --git a/svtools/source/dialogs/wizardmachine.cxx b/svtools/source/dialogs/wizardmachine.cxx index bf14a0dae2e0..2f7cf48a8af3 100644 --- a/svtools/source/dialogs/wizardmachine.cxx +++ b/svtools/source/dialogs/wizardmachine.cxx @@ -223,7 +223,7 @@ namespace svt TabPage* pCurrentPage = GetPage(getCurrentState()); if ( pCurrentPage && !pCurrentPage->GetText().isEmpty() ) { - sCompleteTitle += (" - " + pCurrentPage->GetText()); + sCompleteTitle += " - " + pCurrentPage->GetText(); } SetText(sCompleteTitle); diff --git a/svtools/source/svhtml/parhtml.cxx b/svtools/source/svhtml/parhtml.cxx index 6f9e33a8bd2e..ab174dd713a2 100644 --- a/svtools/source/svhtml/parhtml.cxx +++ b/svtools/source/svhtml/parhtml.cxx @@ -1615,7 +1615,7 @@ HtmlTokenId HTMLParser::FilterPRE( HtmlTokenId nToken ) case HtmlTokenId::TABCHAR: { - sal_Int32 nSpaces = (8 - (nPre_LinePos % 8)); + sal_Int32 nSpaces = 8 - (nPre_LinePos % 8); DBG_ASSERT( aToken.isEmpty(), "Why is the token not empty?" ); if (aToken.getLength() < nSpaces) { diff --git a/svtools/source/uno/unoevent.cxx b/svtools/source/uno/unoevent.cxx index 54582979066e..a0ca2b82080d 100644 --- a/svtools/source/uno/unoevent.cxx +++ b/svtools/source/uno/unoevent.cxx @@ -434,7 +434,7 @@ void SvDetachedEventDescriptor::getByName( throw NoSuchElementException(); if( aMacros[nIndex] ) - rMacro = (*aMacros[nIndex]); + rMacro = *aMacros[nIndex]; } bool SvDetachedEventDescriptor::hasById( |