diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-11-23 08:13:06 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-11-23 10:00:44 +0100 |
commit | b26012ef159bd420ac3bb9275607d3a1622422f7 (patch) | |
tree | e39d6e31122a22d7c0c27336410acaafe71c4fcf /vcl/source | |
parent | bfaf5740bb10ce8c51017cba44681de10953bea4 (diff) |
Make loplugin:unnecessaryparen look through implicit
...similar to how <https://gerrit.libreoffice.org/#/c/45083/2> "Make not warning
about !! in loplugin:simplifybool consistent" does for loplugin:simplifybool
Change-Id: I23eef400af71c582d380c9bae6546ce06e8a1e18
Reviewed-on: https://gerrit.libreoffice.org/45122
Tested-by: Stephan Bergmann <sbergman@redhat.com>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/control/imp_listbox.cxx | 8 | ||||
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.cxx | 16 | ||||
-rw-r--r-- | vcl/source/gdi/salgdilayout.cxx | 12 | ||||
-rw-r--r-- | vcl/source/outdev/bitmap.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/toolbox.cxx | 2 |
5 files changed, 20 insertions, 20 deletions
diff --git a/vcl/source/control/imp_listbox.cxx b/vcl/source/control/imp_listbox.cxx index d23659e3e8f1..c9d4babe859b 100644 --- a/vcl/source/control/imp_listbox.cxx +++ b/vcl/source/control/imp_listbox.cxx @@ -619,7 +619,7 @@ void ImplListBoxWindow::ImplUpdateEntryMetrics( ImplEntryType& rEntry ) if ( aMetrics.bText ) { - if( (rEntry.mnFlags & ListBoxEntryFlags::MultiLine) ) + if( rEntry.mnFlags & ListBoxEntryFlags::MultiLine ) { // multiline case Size aCurSize( PixelToLogic( GetSizePixel() ) ); @@ -1796,7 +1796,7 @@ void ImplListBoxWindow::DrawEntry(vcl::RenderContext& rRenderContext, sal_Int32 { long nMaxWidth = std::max(mnMaxWidth, GetOutputSizePixel().Width() - 2 * mnBorder); // a multiline entry should only be as wide a the window - if ((pEntry->mnFlags & ListBoxEntryFlags::MultiLine)) + if (pEntry->mnFlags & ListBoxEntryFlags::MultiLine) nMaxWidth = GetOutputSizePixel().Width() - 2 * mnBorder; tools::Rectangle aTextRect(Point(mnBorder - mnLeft, nY), @@ -1818,9 +1818,9 @@ void ImplListBoxWindow::DrawEntry(vcl::RenderContext& rRenderContext, sal_Int32 } DrawTextFlags nDrawStyle = ImplGetTextStyle(); - if ((pEntry->mnFlags & ListBoxEntryFlags::MultiLine)) + if (pEntry->mnFlags & ListBoxEntryFlags::MultiLine) nDrawStyle |= MULTILINE_ENTRY_DRAW_FLAGS; - if ((pEntry->mnFlags & ListBoxEntryFlags::DrawDisabled)) + if (pEntry->mnFlags & ListBoxEntryFlags::DrawDisabled) nDrawStyle |= DrawTextFlags::Disable; rRenderContext.DrawText(aTextRect, aStr, nDrawStyle); diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 6d958b3bc231..e6bd9760c9d4 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -10232,7 +10232,7 @@ void PDFWriterImpl::updateGraphicsState(Mode const mode) GraphicsState& rNewState = m_aGraphicsStack.front(); // first set clip region since it might invalidate everything else - if( (rNewState.m_nUpdateFlags & GraphicsStateUpdateFlags::ClipRegion) ) + if( rNewState.m_nUpdateFlags & GraphicsStateUpdateFlags::ClipRegion ) { rNewState.m_nUpdateFlags &= ~GraphicsStateUpdateFlags::ClipRegion; @@ -10268,32 +10268,32 @@ void PDFWriterImpl::updateGraphicsState(Mode const mode) } } - if( (rNewState.m_nUpdateFlags & GraphicsStateUpdateFlags::MapMode) ) + if( rNewState.m_nUpdateFlags & GraphicsStateUpdateFlags::MapMode ) { rNewState.m_nUpdateFlags &= ~GraphicsStateUpdateFlags::MapMode; getReferenceDevice()->SetMapMode( rNewState.m_aMapMode ); } - if( (rNewState.m_nUpdateFlags & GraphicsStateUpdateFlags::Font) ) + if( rNewState.m_nUpdateFlags & GraphicsStateUpdateFlags::Font ) { rNewState.m_nUpdateFlags &= ~GraphicsStateUpdateFlags::Font; getReferenceDevice()->SetFont( rNewState.m_aFont ); getReferenceDevice()->ImplNewFont(); } - if( (rNewState.m_nUpdateFlags & GraphicsStateUpdateFlags::LayoutMode) ) + if( rNewState.m_nUpdateFlags & GraphicsStateUpdateFlags::LayoutMode ) { rNewState.m_nUpdateFlags &= ~GraphicsStateUpdateFlags::LayoutMode; getReferenceDevice()->SetLayoutMode( rNewState.m_nLayoutMode ); } - if( (rNewState.m_nUpdateFlags & GraphicsStateUpdateFlags::DigitLanguage) ) + if( rNewState.m_nUpdateFlags & GraphicsStateUpdateFlags::DigitLanguage ) { rNewState.m_nUpdateFlags &= ~GraphicsStateUpdateFlags::DigitLanguage; getReferenceDevice()->SetDigitLanguage( rNewState.m_aDigitLanguage ); } - if( (rNewState.m_nUpdateFlags & GraphicsStateUpdateFlags::LineColor) ) + if( rNewState.m_nUpdateFlags & GraphicsStateUpdateFlags::LineColor ) { rNewState.m_nUpdateFlags &= ~GraphicsStateUpdateFlags::LineColor; if( m_aCurrentPDFState.m_aLineColor != rNewState.m_aLineColor && @@ -10304,7 +10304,7 @@ void PDFWriterImpl::updateGraphicsState(Mode const mode) } } - if( (rNewState.m_nUpdateFlags & GraphicsStateUpdateFlags::FillColor) ) + if( rNewState.m_nUpdateFlags & GraphicsStateUpdateFlags::FillColor ) { rNewState.m_nUpdateFlags &= ~GraphicsStateUpdateFlags::FillColor; if( m_aCurrentPDFState.m_aFillColor != rNewState.m_aFillColor && @@ -10315,7 +10315,7 @@ void PDFWriterImpl::updateGraphicsState(Mode const mode) } } - if( (rNewState.m_nUpdateFlags & GraphicsStateUpdateFlags::TransparentPercent) ) + if( rNewState.m_nUpdateFlags & GraphicsStateUpdateFlags::TransparentPercent ) { rNewState.m_nUpdateFlags &= ~GraphicsStateUpdateFlags::TransparentPercent; if( m_aContext.Version >= PDFWriter::PDFVersion::PDF_1_4 ) diff --git a/vcl/source/gdi/salgdilayout.cxx b/vcl/source/gdi/salgdilayout.cxx index 1c99d4d2ac1a..732a7181cf2b 100644 --- a/vcl/source/gdi/salgdilayout.cxx +++ b/vcl/source/gdi/salgdilayout.cxx @@ -120,7 +120,7 @@ void SalGraphics::mirror( long& x, const OutputDevice *pOutDev ) const { OutputDevice *pOutDevRef = const_cast<OutputDevice*>(pOutDev); // mirror this window back - if( (m_nLayout & SalLayoutFlags::BiDiRtl) ) + if( m_nLayout & SalLayoutFlags::BiDiRtl ) { long devX = w-pOutDevRef->GetOutputWidthPixel()-pOutDevRef->GetOutOffXPixel(); // re-mirrored mnOutOffX x = devX + (x - pOutDevRef->GetOutOffXPixel()); @@ -131,7 +131,7 @@ void SalGraphics::mirror( long& x, const OutputDevice *pOutDev ) const x = pOutDevRef->GetOutputWidthPixel() - (x - devX) + pOutDevRef->GetOutOffXPixel() - 1; } } - else if( (m_nLayout & SalLayoutFlags::BiDiRtl) ) + else if( m_nLayout & SalLayoutFlags::BiDiRtl ) x = w-1-x; } } @@ -150,7 +150,7 @@ void SalGraphics::mirror( long& x, long nWidth, const OutputDevice *pOutDev, boo { OutputDevice *pOutDevRef = const_cast<OutputDevice*>(pOutDev); // mirror this window back - if( (m_nLayout & SalLayoutFlags::BiDiRtl) ) + if( m_nLayout & SalLayoutFlags::BiDiRtl ) { long devX = w-pOutDevRef->GetOutputWidthPixel()-pOutDevRef->GetOutOffXPixel(); // re-mirrored mnOutOffX if( bBack ) @@ -167,7 +167,7 @@ void SalGraphics::mirror( long& x, long nWidth, const OutputDevice *pOutDev, boo x = pOutDevRef->GetOutputWidthPixel() - (x - devX) + pOutDevRef->GetOutOffXPixel() - nWidth; } } - else if( (m_nLayout & SalLayoutFlags::BiDiRtl) ) + else if( m_nLayout & SalLayoutFlags::BiDiRtl ) x = w-nWidth-x; } @@ -189,7 +189,7 @@ bool SalGraphics::mirror( sal_uInt32 nPoints, const SalPoint *pPtAry, SalPoint * { OutputDevice *pOutDevRef = const_cast<OutputDevice*>(pOutDev); // mirror this window back - if( (m_nLayout & SalLayoutFlags::BiDiRtl) ) + if( m_nLayout & SalLayoutFlags::BiDiRtl ) { long devX = w-pOutDevRef->GetOutputWidthPixel()-pOutDevRef->GetOutOffXPixel(); // re-mirrored mnOutOffX for( i=0, j=nPoints-1; i<nPoints; i++,j-- ) @@ -208,7 +208,7 @@ bool SalGraphics::mirror( sal_uInt32 nPoints, const SalPoint *pPtAry, SalPoint * } } } - else if( (m_nLayout & SalLayoutFlags::BiDiRtl) ) + else if( m_nLayout & SalLayoutFlags::BiDiRtl ) { for( i=0, j=nPoints-1; i<nPoints; i++,j-- ) { diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx index cfdae8d46e9d..0e6b651f3b10 100644 --- a/vcl/source/outdev/bitmap.cxx +++ b/vcl/source/outdev/bitmap.cxx @@ -65,7 +65,7 @@ void OutputDevice::DrawBitmap( const Point& rDestPt, const Size& rDestSize, if( ImplIsRecordLayout() ) return; - if ( ( mnDrawMode & DrawModeFlags::NoBitmap ) ) + if ( mnDrawMode & DrawModeFlags::NoBitmap ) { return; } diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx index 71172415fc49..c7b98962689b 100644 --- a/vcl/source/window/toolbox.cxx +++ b/vcl/source/window/toolbox.cxx @@ -3517,7 +3517,7 @@ void ToolBox::MouseButtonDown( const MouseEvent& rMEvt ) } // was dropdown arrow pressed - if( (it->mnBits & ToolBoxItemBits::DROPDOWN) ) + if( it->mnBits & ToolBoxItemBits::DROPDOWN ) { if( ( (it->mnBits & ToolBoxItemBits::DROPDOWNONLY) == ToolBoxItemBits::DROPDOWNONLY) || it->GetDropDownRect( mbHorz && ( meTextPosition == ToolBoxTextPosition::Right ) ).IsInside( aMousePos )) |