From e4472d3c139294499f4c0caeebd9d4e995958eb0 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 4 Dec 2018 11:20:03 +0200 Subject: loplugin:unnecessaryparen include more assignments Change-Id: I9fb8366634b31230b732dd38a98f800075529714 Reviewed-on: https://gerrit.libreoffice.org/64510 Tested-by: Jenkins Reviewed-by: Noel Grandin --- vcl/source/bitmap/BitmapScaleSuperFilter.cxx | 10 +++--- vcl/source/control/prgsbar.cxx | 2 +- vcl/source/gdi/pdfwriter_impl.cxx | 4 +-- vcl/source/gdi/pngread.cxx | 4 +-- vcl/source/outdev/textline.cxx | 2 +- vcl/source/treelist/svimpbox.cxx | 50 ++++++++++++++-------------- vcl/source/treelist/svlbitm.cxx | 6 ++-- vcl/source/treelist/svtabbx.cxx | 2 +- vcl/source/treelist/treelistbox.cxx | 18 +++++----- vcl/source/treelist/treelistentry.cxx | 2 +- vcl/source/window/builder.cxx | 2 +- vcl/source/window/menu.cxx | 2 +- vcl/source/window/seleng.cxx | 32 +++++++++--------- vcl/source/window/status.cxx | 2 +- vcl/source/window/window.cxx | 2 +- vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx | 4 +-- 16 files changed, 72 insertions(+), 72 deletions(-) (limited to 'vcl') diff --git a/vcl/source/bitmap/BitmapScaleSuperFilter.cxx b/vcl/source/bitmap/BitmapScaleSuperFilter.cxx index ba6be51513b0..27baa334b839 100644 --- a/vcl/source/bitmap/BitmapScaleSuperFilter.cxx +++ b/vcl/source/bitmap/BitmapScaleSuperFilter.cxx @@ -358,7 +358,7 @@ void scalePallete8bit2(ScaleContext &rCtx, long nStartY, long nEndY) } else if( j == 0 ) { - long nWeightX = (nMax- rCtx.mpMapFX[ nLeft ]) ; + long nWeightX = nMax- rCtx.mpMapFX[ nLeft ]; nSumRowB += ( nWeightX *rCol.GetBlue()) ; nSumRowG += ( nWeightX *rCol.GetGreen()) ; nSumRowR += ( nWeightX *rCol.GetRed()) ; @@ -485,7 +485,7 @@ void scalePalleteGeneral2(ScaleContext &rCtx, long nStartY, long nEndY) else if( j == 0 ) { - long nWeightX = (nMax- rCtx.mpMapFX[ nLeft ]) ; + long nWeightX = nMax- rCtx.mpMapFX[ nLeft ]; nSumRowB += ( nWeightX *aCol0.GetBlue()) ; nSumRowG += ( nWeightX *aCol0.GetGreen()) ; nSumRowR += ( nWeightX *aCol0.GetRed()) ; @@ -613,7 +613,7 @@ void scale24bitBGR2(ScaleContext &rCtx, long nStartY, long nEndY) } else if( j == 0 ) { - long nWeightX = (nMax- rCtx.mpMapFX[ nLeft ]) ; + long nWeightX = nMax- rCtx.mpMapFX[ nLeft ]; nSumRowB += ( nWeightX *( *pTmpX )) ;pTmpX++; nSumRowG += ( nWeightX *( *pTmpX )) ;pTmpX++; nSumRowR += ( nWeightX *( *pTmpX )) ;pTmpX++; @@ -735,7 +735,7 @@ void scale24bitRGB2(ScaleContext &rCtx, long nStartY, long nEndY) } else if( j == 0 ) { - long nWeightX = (nMax- rCtx.mpMapFX[ nLeft ]) ; + long nWeightX = nMax- rCtx.mpMapFX[ nLeft ]; nSumRowR += ( nWeightX *( *pTmpX )) ;pTmpX++; nSumRowG += ( nWeightX *( *pTmpX )) ;pTmpX++; nSumRowB += ( nWeightX *( *pTmpX )) ;pTmpX++; @@ -860,7 +860,7 @@ void scaleNonPalleteGeneral2(ScaleContext &rCtx, long nStartY, long nEndY) else if( j == 0 ) { - long nWeightX = (nMax- rCtx.mpMapFX[ nLeft ]) ; + long nWeightX = nMax- rCtx.mpMapFX[ nLeft ]; nSumRowB += ( nWeightX *aCol0.GetBlue()) ; nSumRowG += ( nWeightX *aCol0.GetGreen()) ; nSumRowR += ( nWeightX *aCol0.GetRed()) ; diff --git a/vcl/source/control/prgsbar.cxx b/vcl/source/control/prgsbar.cxx index 20525ca63efc..569814ddb263 100644 --- a/vcl/source/control/prgsbar.cxx +++ b/vcl/source/control/prgsbar.cxx @@ -127,7 +127,7 @@ void ProgressBar::ImplDrawProgress(vcl::RenderContext& rRenderContext, sal_uInt1 mnPrgsHeight = aSize.Height() - (PROGRESSBAR_WIN_OFFSET * 2); mnPrgsWidth = (mnPrgsHeight * 2) / 3; maPos.setY( PROGRESSBAR_WIN_OFFSET ); - long nMaxWidth = (aSize.Width() - (PROGRESSBAR_WIN_OFFSET * 2) + PROGRESSBAR_OFFSET); + long nMaxWidth = aSize.Width() - (PROGRESSBAR_WIN_OFFSET * 2) + PROGRESSBAR_OFFSET; sal_uInt16 nMaxCount = static_cast(nMaxWidth / (mnPrgsWidth+PROGRESSBAR_OFFSET)); if (nMaxCount <= 1) { diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 5a7bc38b643a..0a1c2c6998af 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -2939,7 +2939,7 @@ static void appendSubsetName( int nSubsetID, const OUString& rPSName, OStringBuf { for( int i = 0; i < 6; i++ ) { - int nOffset = (nSubsetID % 26); + int nOffset = nSubsetID % 26; nSubsetID /= 26; rBuffer.append( static_cast('A'+nOffset) ); } @@ -6328,7 +6328,7 @@ void PDFWriterImpl::drawVerticalGlyphs( fSkewA = -fSkewB; fSkewB = 0.0; } - aDeltaPos += (PixelToLogic( Point( static_cast(static_cast(nXOffset)/fXScale), 0 ) ) - PixelToLogic( Point() ) ); + aDeltaPos += PixelToLogic( Point( static_cast(static_cast(nXOffset)/fXScale), 0 ) ) - PixelToLogic( Point() ); if( i < rGlyphs.size()-1 ) // #i120627# the text on the Y axis is reversed when export ppt file to PDF format { diff --git a/vcl/source/gdi/pngread.cxx b/vcl/source/gdi/pngread.cxx index 753c85f9ae6d..cfd9391f69b5 100644 --- a/vcl/source/gdi/pngread.cxx +++ b/vcl/source/gdi/pngread.cxx @@ -814,7 +814,7 @@ void PNGReaderImpl::ImplGetGamma() return; sal_uInt32 nGammaValue = ImplReadsal_uInt32(); - double fGamma = ( ( VIEWING_GAMMA / DISPLAY_GAMMA ) * ( static_cast(nGammaValue) / 100000 ) ); + double fGamma = ( VIEWING_GAMMA / DISPLAY_GAMMA ) * ( static_cast(nGammaValue) / 100000 ); double fInvGamma = ( fGamma <= 0.0 || fGamma > 10.0 ) ? 1.0 : ( 1.0 / fGamma ); if ( fInvGamma != 1.0 ) @@ -883,7 +883,7 @@ void PNGReaderImpl::ImplGetBackground() // 2 and 6 (RGB) the return value is always the 8 bit color component sal_uInt8 PNGReaderImpl::ImplScaleColor() { - sal_uInt32 nMask = ( ( 1 << mnPngDepth ) - 1 ); + sal_uInt32 nMask = ( 1 << mnPngDepth ) - 1; sal_uInt16 nCol = ( *maDataIter++ << 8 ); nCol += *maDataIter++ & static_cast(nMask); diff --git a/vcl/source/outdev/textline.cxx b/vcl/source/outdev/textline.cxx index ba467962a080..2c88586618bf 100644 --- a/vcl/source/outdev/textline.cxx +++ b/vcl/source/outdev/textline.cxx @@ -215,7 +215,7 @@ void OutputDevice::ImplDrawWaveTextLine( long nBaseX, long nBaseY, if ( (eTextLine == LINESTYLE_SMALLWAVE) && (nLineHeight > 3) ) nLineHeight = 3; - long nLineWidth = (mnDPIX / 300); + long nLineWidth = mnDPIX / 300; if ( !nLineWidth ) nLineWidth = 1; diff --git a/vcl/source/treelist/svimpbox.cxx b/vcl/source/treelist/svimpbox.cxx index a39b18744878..1c6a222a2b3f 100644 --- a/vcl/source/treelist/svimpbox.cxx +++ b/vcl/source/treelist/svimpbox.cxx @@ -311,7 +311,7 @@ IMPL_LINK( SvImpLBox, ScrollUpDownHdl, ScrollBar *, pScrollBar, void ) if( !nDelta ) return; - nFlags &= (~LBoxFlags::Filling); + nFlags &= ~LBoxFlags::Filling; bInVScrollHdl = true; @@ -349,7 +349,7 @@ void SvImpLBox::CursorDown() SvTreeListEntry* pNextFirstToDraw = pView->NextVisible(pStartEntry); if( pNextFirstToDraw ) { - nFlags &= (~LBoxFlags::Filling); + nFlags &= ~LBoxFlags::Filling; ShowCursor( false ); pView->Update(); pStartEntry = pNextFirstToDraw; @@ -370,7 +370,7 @@ void SvImpLBox::CursorUp() if( !pPrevFirstToDraw ) return; - nFlags &= (~LBoxFlags::Filling); + nFlags &= ~LBoxFlags::Filling; long nEntryHeight = pView->GetEntryHeight(); ShowCursor( false ); pView->Update(); @@ -399,7 +399,7 @@ void SvImpLBox::PageDown( sal_uInt16 nDelta ) ShowCursor( false ); - nFlags &= (~LBoxFlags::Filling); + nFlags &= ~LBoxFlags::Filling; pView->Update(); pStartEntry = pNext; @@ -435,7 +435,7 @@ void SvImpLBox::PageUp( sal_uInt16 nDelta ) if( pPrev == pStartEntry ) return; - nFlags &= (~LBoxFlags::Filling); + nFlags &= ~LBoxFlags::Filling; ShowCursor( false ); pView->Update(); @@ -477,7 +477,7 @@ void SvImpLBox::KeyUp( bool bPageUp ) if( nDelta <= 0 ) return; - nFlags &= (~LBoxFlags::Filling); + nFlags &= ~LBoxFlags::Filling; BeginScroll(); aVerSBar->SetThumbPos( nThumbPos - nDelta ); @@ -512,7 +512,7 @@ void SvImpLBox::KeyDown( bool bPageDown ) if( nDelta <= 0 ) return; - nFlags &= (~LBoxFlags::Filling); + nFlags &= ~LBoxFlags::Filling; BeginScroll(); aVerSBar->SetThumbPos( nThumbPos+nDelta ); @@ -659,7 +659,7 @@ void SvImpLBox::SetCursor( SvTreeListEntry* pEntry, bool bForceNoSelect ) SetAnchorSelection( pOldCursor, pCursor ); } } - nFlags &= (~LBoxFlags::DeselectAll); + nFlags &= ~LBoxFlags::DeselectAll; pView->OnCurrentEntryChanged(); } @@ -724,7 +724,7 @@ void SvImpLBox::KeyLeftRight( long nDelta ) if( !(nFlags & LBoxFlags::InResize) ) pView->Update(); BeginScroll(); - nFlags &= (~LBoxFlags::Filling); + nFlags &= ~LBoxFlags::Filling; ShowCursor( false ); // calculate new origin @@ -933,9 +933,9 @@ void SvImpLBox::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle pEntry = pView->NextVisible(pEntry); } - nFlags &= (~LBoxFlags::DeselectAll); + nFlags &= ~LBoxFlags::DeselectAll; rRenderContext.SetClipRegion(); - nFlags &= (~LBoxFlags::InPaint); + nFlags &= ~LBoxFlags::InPaint; } void SvImpLBox::MakeVisible( SvTreeListEntry* pEntry, bool bMoveToTop ) @@ -949,7 +949,7 @@ void SvImpLBox::MakeVisible( SvTreeListEntry* pEntry, bool bMoveToTop ) return; // is already visible if( pStartEntry || mbForceMakeVisible ) - nFlags &= (~LBoxFlags::Filling); + nFlags &= ~LBoxFlags::Filling; if( !bInView ) { if( !pView->IsEntryVisible(pEntry) ) // Parent(s) collapsed? @@ -994,7 +994,7 @@ void SvImpLBox::ScrollToAbsPos( long nPos ) return; if( pStartEntry || mbForceMakeVisible ) - nFlags &= (~LBoxFlags::Filling); + nFlags &= ~LBoxFlags::Filling; if( pView->IsEntryVisible(pEntry) ) { @@ -1586,7 +1586,7 @@ void SvImpLBox::EntrySelected( SvTreeListEntry* pEntry, bool bSelect ) if( nFlags & LBoxFlags::IgnoreSelect ) return; - nFlags &= (~LBoxFlags::DeselectAll); + nFlags &= ~LBoxFlags::DeselectAll; if( bSelect && aSelEng.GetSelectionMode() == SelectionMode::Single && pEntry != pCursor ) @@ -1682,7 +1682,7 @@ void SvImpLBox::EntryRemoved() { if( nFlags & LBoxFlags::RemovedEntryInvisible ) { - nFlags &= (~LBoxFlags::RemovedEntryInvisible); + nFlags &= ~LBoxFlags::RemovedEntryInvisible; return; } if( !pStartEntry ) @@ -1723,7 +1723,7 @@ void SvImpLBox::EntryRemoved() } ShowCursor( true ); } - nFlags &= (~LBoxFlags::RemovedRecalcMostRight); + nFlags &= ~LBoxFlags::RemovedRecalcMostRight; } @@ -1732,7 +1732,7 @@ void SvImpLBox::MovingEntry( SvTreeListEntry* pEntry ) bool bDeselAll(nFlags & LBoxFlags::DeselectAll); SelAllDestrAnch( false ); // DeselectAll(); if( !bDeselAll ) - nFlags &= (~LBoxFlags::DeselectAll); + nFlags &= ~LBoxFlags::DeselectAll; if( pEntry == pCursor ) ShowCursor( false ); @@ -1989,7 +1989,7 @@ void SvImpLBox::MouseButtonDown( const MouseEvent& rMEvt ) if ( pEntry != pCursor ) // new entry selected -> reset current tab position to first tab nCurTabPos = FIRST_ENTRY_TAB; - nFlags &= (~LBoxFlags::Filling); + nFlags &= ~LBoxFlags::Filling; pView->GrabFocus(); //fdo#82270 Grabbing focus can invalidate the entries, re-fetch pEntry = GetEntry(aPos); @@ -2020,7 +2020,7 @@ void SvImpLBox::MouseButtonDown( const MouseEvent& rMEvt ) if( (rMEvt.GetClicks() % 2) == 0 ) { - nFlags &= (~LBoxFlags::StartEditTimer); + nFlags &= ~LBoxFlags::StartEditTimer; pView->pHdlEntry = pEntry; if( !pView->DoubleClickHdl() ) { @@ -2077,7 +2077,7 @@ void SvImpLBox::MouseButtonUp( const MouseEvent& rMEvt) EndScroll(); if( nFlags & LBoxFlags::StartEditTimer ) { - nFlags &= (~LBoxFlags::StartEditTimer); + nFlags &= ~LBoxFlags::StartEditTimer; aEditClickPos = rMEvt.GetPosPixel(); aEditIdle.Start(); } @@ -2098,7 +2098,7 @@ bool SvImpLBox::KeyInput( const KeyEvent& rKEvt) if( rKeyCode.IsMod2() ) return false; // don't evaluate Alt key - nFlags &= (~LBoxFlags::Filling); + nFlags &= ~LBoxFlags::Filling; if( !pCursor ) pCursor = pStartEntry; @@ -2642,7 +2642,7 @@ void ImpLBSelEng::DeselectAtPoint( const Point& rPoint ) void ImpLBSelEng::DeselectAll() { pImp->SelAllDestrAnch( false, false ); // don't reset SelectionEngine! - pImp->nFlags &= (~LBoxFlags::DeselectAll); + pImp->nFlags &= ~LBoxFlags::DeselectAll; } // *********************************************************************** @@ -2761,7 +2761,7 @@ void SvImpLBox::SelAllDestrAnch( bool bSelect, bool bDestroyAnchor, bool bSingleSelToo ) { SvTreeListEntry* pEntry; - nFlags &= (~LBoxFlags::DeselectAll); + nFlags &= ~LBoxFlags::DeselectAll; if( bSelect && bSimpleTravel ) { if( pCursor && !pView->IsSelected( pCursor )) @@ -2853,7 +2853,7 @@ void SvImpLBox::SetDragDropMode( DragDropMode eDDMode ) void SvImpLBox::BeginDrag() { - nFlags &= (~LBoxFlags::Filling); + nFlags &= ~LBoxFlags::Filling; if( !bAsyncBeginDrag ) { BeginScroll(); @@ -3033,7 +3033,7 @@ void SvImpLBox::EndScroll() if( nFlags & LBoxFlags::InScrolling) { pView->NotifyEndScroll(); - nFlags &= (~LBoxFlags::InScrolling); + nFlags &= ~LBoxFlags::InScrolling; } } diff --git a/vcl/source/treelist/svlbitm.cxx b/vcl/source/treelist/svlbitm.cxx index 734c5a43a976..530113c18177 100644 --- a/vcl/source/treelist/svlbitm.cxx +++ b/vcl/source/treelist/svlbitm.cxx @@ -105,9 +105,9 @@ void SvLBoxButtonData::StoreButtonState( SvTreeListEntry* pActEntry ) SvButtonState SvLBoxButtonData::ConvertToButtonState( SvItemStateFlags nItemFlags ) { - nItemFlags &= (SvItemStateFlags::UNCHECKED | - SvItemStateFlags::CHECKED | - SvItemStateFlags::TRISTATE); + nItemFlags &= SvItemStateFlags::UNCHECKED | + SvItemStateFlags::CHECKED | + SvItemStateFlags::TRISTATE; switch( nItemFlags ) { case SvItemStateFlags::UNCHECKED: diff --git a/vcl/source/treelist/svtabbx.cxx b/vcl/source/treelist/svtabbx.cxx index 44164bceca97..c797911edfa6 100644 --- a/vcl/source/treelist/svtabbx.cxx +++ b/vcl/source/treelist/svtabbx.cxx @@ -452,7 +452,7 @@ void SvTabListBox::SetTabJustify( sal_uInt16 nTab, SvTabJustify eJustify) return; SvLBoxTab& rTab = mvTabList[ nTab ]; SvLBoxTabFlags nFlags = rTab.nFlags; - nFlags &= (~MYTABMASK); + nFlags &= ~MYTABMASK; nFlags |= static_cast(eJustify); rTab.nFlags = nFlags; SvTreeListBox::nTreeFlags |= SvTreeFlags::RECALCTABS; diff --git a/vcl/source/treelist/treelistbox.cxx b/vcl/source/treelist/treelistbox.cxx index 00fdbb39fc9e..e4f41a51957a 100644 --- a/vcl/source/treelist/treelistbox.cxx +++ b/vcl/source/treelist/treelistbox.cxx @@ -853,12 +853,12 @@ void SvTreeListBox::EnableSelectionAsDropTarget( bool bEnable ) } else { - pSelEntry->nEntryFlags &= (~SvTLEntryFlags::DISABLE_DROP); + pSelEntry->nEntryFlags &= ~SvTLEntryFlags::DISABLE_DROP; nRefDepth = pModel->GetDepth( pSelEntry ); pTemp = Next( pSelEntry ); while( pTemp && pModel->GetDepth( pTemp ) > nRefDepth ) { - pTemp->nEntryFlags &= (~SvTLEntryFlags::DISABLE_DROP); + pTemp->nEntryFlags &= ~SvTLEntryFlags::DISABLE_DROP; pTemp = Next( pTemp ); } } @@ -899,7 +899,7 @@ IMPL_LINK_NOARG(SvTreeListBox, TextEditEndedHdl_Impl, SvInplaceEdit2&, void) // that we don't call the selection handler in the GetFocus of the listbox // with the old entry text. pEdCtrl->Hide(); - nImpFlags &= (~SvTreeListBoxFlags::IN_EDT); + nImpFlags &= ~SvTreeListBoxFlags::IN_EDT; GrabFocus(); } @@ -907,14 +907,14 @@ void SvTreeListBox::CancelTextEditing() { if ( pEdCtrl ) pEdCtrl->StopEditing( true ); - nImpFlags &= (~SvTreeListBoxFlags::IN_EDT); + nImpFlags &= ~SvTreeListBoxFlags::IN_EDT; } void SvTreeListBox::EndEditing( bool bCancel ) { if( pEdCtrl ) pEdCtrl->StopEditing( bCancel ); - nImpFlags &= (~SvTreeListBoxFlags::IN_EDT); + nImpFlags &= ~SvTreeListBoxFlags::IN_EDT; } @@ -1466,7 +1466,7 @@ void SvTreeListBox::SetTabs() { if( IsEditingActive() ) EndEditing( true ); - nTreeFlags &= (~SvTreeFlags::RECALCTABS); + nTreeFlags &= ~SvTreeFlags::RECALCTABS; nFocusWidth = -1; const WinBits nStyle( GetStyle() ); bool bHasButtons = (nStyle & WB_HASBUTTONS)!=0; @@ -1633,7 +1633,7 @@ SvTreeListEntry* SvTreeListBox::InsertEntry( aPrevInsertedExpBmp = rDefExpBmp; aPrevInsertedColBmp = rDefColBmp; - nTreeFlags &= (~SvTreeFlags::MANINS); + nTreeFlags &= ~SvTreeFlags::MANINS; return pEntry; } @@ -1662,7 +1662,7 @@ SvTreeListEntry* SvTreeListBox::InsertEntry( const OUString& rText, aPrevInsertedExpBmp = aExpEntryBmp; aPrevInsertedColBmp = aCollEntryBmp; - nTreeFlags &= (~SvTreeFlags::MANINS); + nTreeFlags &= ~SvTreeFlags::MANINS; return pEntry; } @@ -1894,7 +1894,7 @@ void SvTreeListBox::EnableCheckButton( SvLBoxButtonData* pData ) { DBG_ASSERT(!GetEntryCount(),"EnableCheckButton: Entry count != 0"); if( !pData ) - nTreeFlags &= (~SvTreeFlags::CHKBTN); + nTreeFlags &= ~SvTreeFlags::CHKBTN; else { SetCheckButtonData( pData ); diff --git a/vcl/source/treelist/treelistentry.cxx b/vcl/source/treelist/treelistentry.cxx index 35e0d80b6946..05729f2399e7 100644 --- a/vcl/source/treelist/treelistentry.cxx +++ b/vcl/source/treelist/treelistentry.cxx @@ -120,7 +120,7 @@ void SvTreeListEntry::EnableChildrenOnDemand( bool bEnable ) if ( bEnable ) nEntryFlags |= SvTLEntryFlags::CHILDREN_ON_DEMAND; else - nEntryFlags &= (~SvTLEntryFlags::CHILDREN_ON_DEMAND); + nEntryFlags &= ~SvTLEntryFlags::CHILDREN_ON_DEMAND; } void SvTreeListEntry::ReplaceItem(std::unique_ptr pNewItem, size_t const nPos) diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index 1799efe80997..210c867c8e38 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -1978,7 +1978,7 @@ VclPtr VclBuilder::makeObject(vcl::Window *pParent, const OString & if (HeaderBar* pHeaderBar = pTreeView ? pTreeView->GetHeaderBar() : nullptr) { OUString sTitle(extractTitle(rMap)); - HeaderBarItemBits nBits = (HeaderBarItemBits::LEFTIMAGE | HeaderBarItemBits::CLICKABLE); + HeaderBarItemBits nBits = HeaderBarItemBits::LEFTIMAGE | HeaderBarItemBits::CLICKABLE; float fAlign = extractAlignment(rMap); if (fAlign == 0.0) nBits |= HeaderBarItemBits::LEFT; diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx index 45532cd448a8..549595049b5f 100644 --- a/vcl/source/window/menu.cxx +++ b/vcl/source/window/menu.cxx @@ -1788,7 +1788,7 @@ void Menu::ImplPaint(vcl::RenderContext& rRenderContext, Size const & rSize, if (aPos.Y() >= 0) { - long nTextOffsetY = ((pData->aSz.Height() - nFontHeight) / 2); + long nTextOffsetY = (pData->aSz.Height() - nFontHeight) / 2; if (IsMenuBar()) nTextOffsetY += (aOutSz.Height()-pData->aSz.Height()) / 2; DrawTextFlags nTextStyle = DrawTextFlags::NONE; diff --git a/vcl/source/window/seleng.cxx b/vcl/source/window/seleng.cxx index 8e81ce88d095..53dff53e7fd5 100644 --- a/vcl/source/window/seleng.cxx +++ b/vcl/source/window/seleng.cxx @@ -98,7 +98,7 @@ void SelectionEngine::CursorPosChanging( bool bShift, bool bMod1 ) { // pFunctionSet->CreateCursor(); pFunctionSet->DestroyAnchor(); - nFlags &= (~SelectionEngineFlags::HAS_ANCH); + nFlags &= ~SelectionEngineFlags::HAS_ANCH; } } else @@ -107,14 +107,14 @@ void SelectionEngine::CursorPosChanging( bool bShift, bool bMod1 ) pFunctionSet->DeselectAll(); else pFunctionSet->DestroyAnchor(); - nFlags &= (~SelectionEngineFlags::HAS_ANCH); + nFlags &= ~SelectionEngineFlags::HAS_ANCH; } } } bool SelectionEngine::SelMouseButtonDown( const MouseEvent& rMEvt ) { - nFlags &= (~SelectionEngineFlags::CMDEVT); + nFlags &= ~SelectionEngineFlags::CMDEVT; if ( !pFunctionSet || !pWin || rMEvt.GetClicks() > 1 || rMEvt.IsRight() ) return false; @@ -144,7 +144,7 @@ bool SelectionEngine::SelMouseButtonDown( const MouseEvent& rMEvt ) case 0: // KEY_NO_KEY { bool bSelAtPoint = pFunctionSet->IsSelectionAtPoint( aPos ); - nFlags &= (~SelectionEngineFlags::IN_ADD); + nFlags &= ~SelectionEngineFlags::IN_ADD; if ( (nFlags & SelectionEngineFlags::DRG_ENAB) && bSelAtPoint ) { nFlags |= SelectionEngineFlags::WAIT_UPEVT; @@ -158,7 +158,7 @@ bool SelectionEngine::SelMouseButtonDown( const MouseEvent& rMEvt ) pFunctionSet->DeselectAll(); else pFunctionSet->DestroyAnchor(); - nFlags &= (~SelectionEngineFlags::HAS_ANCH); // bHasAnchor = false; + nFlags &= ~SelectionEngineFlags::HAS_ANCH; // bHasAnchor = false; } pFunctionSet->SetCursorAtPoint( aPos ); // special case Single-Selection, to enable simple Select+Drag @@ -171,13 +171,13 @@ bool SelectionEngine::SelMouseButtonDown( const MouseEvent& rMEvt ) if ( eSelMode == SelectionMode::Single ) { pWin->ReleaseMouse(); - nFlags &= (~SelectionEngineFlags::IN_SEL); + nFlags &= ~SelectionEngineFlags::IN_SEL; return false; } if ( nFlags & SelectionEngineFlags::ADD_ALW ) nFlags |= SelectionEngineFlags::IN_ADD; else - nFlags &= (~SelectionEngineFlags::IN_ADD); + nFlags &= ~SelectionEngineFlags::IN_ADD; if( !(nFlags & SelectionEngineFlags::HAS_ANCH) ) { @@ -193,7 +193,7 @@ bool SelectionEngine::SelMouseButtonDown( const MouseEvent& rMEvt ) // allow Control only for Multi-Select if ( eSelMode != SelectionMode::Multiple ) { - nFlags &= (~SelectionEngineFlags::IN_SEL); + nFlags &= ~SelectionEngineFlags::IN_SEL; pWin->ReleaseMouse(); return true; // skip Mouse-Click } @@ -201,7 +201,7 @@ bool SelectionEngine::SelMouseButtonDown( const MouseEvent& rMEvt ) { // pFunctionSet->CreateCursor(); pFunctionSet->DestroyAnchor(); - nFlags &= (~SelectionEngineFlags::HAS_ANCH); + nFlags &= ~SelectionEngineFlags::HAS_ANCH; } if ( pFunctionSet->IsSelectionAtPoint( aPos ) ) { @@ -218,7 +218,7 @@ bool SelectionEngine::SelMouseButtonDown( const MouseEvent& rMEvt ) if ( eSelMode != SelectionMode::Multiple ) { pWin->ReleaseMouse(); - nFlags &= (~SelectionEngineFlags::IN_SEL); + nFlags &= ~SelectionEngineFlags::IN_SEL; return false; } nFlags |= SelectionEngineFlags::IN_ADD; //bIsInAddMode = true; @@ -239,7 +239,7 @@ bool SelectionEngine::SelMouseButtonUp( const MouseEvent& rMEvt ) aWTimer.Stop(); if( !pFunctionSet || !pWin ) { - const SelectionEngineFlags nMask = (SelectionEngineFlags::CMDEVT | SelectionEngineFlags::WAIT_UPEVT | SelectionEngineFlags::IN_SEL); + const SelectionEngineFlags nMask = SelectionEngineFlags::CMDEVT | SelectionEngineFlags::WAIT_UPEVT | SelectionEngineFlags::IN_SEL; nFlags &= ~nMask; return false; } @@ -260,21 +260,21 @@ bool SelectionEngine::SelMouseButtonUp( const MouseEvent& rMEvt ) if( !(nModifier & KEY_SHIFT) ) { pFunctionSet->DestroyAnchor(); - nFlags &= (~SelectionEngineFlags::HAS_ANCH); // uncheck anchor + nFlags &= ~SelectionEngineFlags::HAS_ANCH; // uncheck anchor } pFunctionSet->DeselectAtPoint( aLastMove.GetPosPixel() ); - nFlags &= (~SelectionEngineFlags::HAS_ANCH); // uncheck anchor + nFlags &= ~SelectionEngineFlags::HAS_ANCH; // uncheck anchor pFunctionSet->SetCursorAtPoint( aLastMove.GetPosPixel(), true ); } else { pFunctionSet->DeselectAll(); - nFlags &= (~SelectionEngineFlags::HAS_ANCH); // uncheck anchor + nFlags &= ~SelectionEngineFlags::HAS_ANCH; // uncheck anchor pFunctionSet->SetCursorAtPoint( aLastMove.GetPosPixel() ); } } - const SelectionEngineFlags nMask = (SelectionEngineFlags::CMDEVT | SelectionEngineFlags::WAIT_UPEVT | SelectionEngineFlags::IN_SEL); + const SelectionEngineFlags nMask = SelectionEngineFlags::CMDEVT | SelectionEngineFlags::WAIT_UPEVT | SelectionEngineFlags::IN_SEL; nFlags &= ~nMask; return true; } @@ -359,7 +359,7 @@ void SelectionEngine::Command( const CommandEvent& rCEvt ) aLastMove.GetClicks(), aLastMove.GetMode(), aLastMove.GetButtons(), aLastMove.GetModifier() ); pFunctionSet->BeginDrag(); - const SelectionEngineFlags nMask = (SelectionEngineFlags::CMDEVT|SelectionEngineFlags::WAIT_UPEVT|SelectionEngineFlags::IN_SEL); + const SelectionEngineFlags nMask = SelectionEngineFlags::CMDEVT|SelectionEngineFlags::WAIT_UPEVT|SelectionEngineFlags::IN_SEL; nFlags &= ~nMask; } else diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx index ce605fa4d4b1..be83ef42282c 100644 --- a/vcl/source/window/status.cxx +++ b/vcl/source/window/status.cxx @@ -1394,7 +1394,7 @@ Size StatusBar::CalcWindowSizePixel() const size_t i = 0; size_t nCount = mvItemList.size(); long nOffset = 0; - long nCalcWidth = (STATUSBAR_OFFSET_X*2); + long nCalcWidth = STATUSBAR_OFFSET_X*2; long nCalcHeight; while ( i < nCount ) diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index a12d597091a7..11fd8d5f482e 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -996,7 +996,7 @@ void Window::ImplInit( vcl::Window* pParent, WinBits nStyle, SystemParentData* p { nFrameStyle = SalFrameStyleFlags::FLOAT; if( nStyle & WB_OWNERDRAWDECORATION ) - nFrameStyle |= (SalFrameStyleFlags::OWNERDRAWDECORATION | SalFrameStyleFlags::NOSHADOW); + nFrameStyle |= SalFrameStyleFlags::OWNERDRAWDECORATION | SalFrameStyleFlags::NOSHADOW; } else if( mpWindowImpl->mbFloatWin ) nFrameStyle |= SalFrameStyleFlags::TOOLWINDOW; diff --git a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx index f78eb392e1af..babe9273948b 100644 --- a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx @@ -1072,8 +1072,8 @@ void GtkSalGraphics::PaintOneSpinButton( GtkStyleContext *context, buttonRect.Left(), buttonRect.Top(), buttonRect.GetWidth(), buttonRect.GetHeight() ); - gint iconWidth = (buttonRect.GetWidth() - padding.left - padding.right - border.left - border.right); - gint iconHeight = (buttonRect.GetHeight() - padding.top - padding.bottom - border.top - border.bottom); + gint iconWidth = buttonRect.GetWidth() - padding.left - padding.right - border.left - border.right; + gint iconHeight = buttonRect.GetHeight() - padding.top - padding.bottom - border.top - border.bottom; const char* icon = (nPart == ControlPart::ButtonUp) ? "list-add-symbolic" : "list-remove-symbolic"; GtkIconTheme *pIconTheme = gtk_icon_theme_get_for_screen(gtk_widget_get_screen(mpWindow)); -- cgit