summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-11-22 09:33:32 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-11-23 06:59:31 +0100
commit7a1c21e53fc4733a4bb52282ce0098fcc085ab0e (patch)
treec1b90f74e1ce9e9f3a852f398890899459189cab /vcl
parentc24c32bf71b8e64bd0d36e511f554e1f6c015842 (diff)
loplugin:simplifybool for negation of comparison operator
Change-Id: Ie56daf560185274754afbc7a09c432b5c2793791 Reviewed-on: https://gerrit.libreoffice.org/45068 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/font/font.cxx2
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx2
-rw-r--r--vcl/source/opengl/OpenGLHelper.cxx2
-rw-r--r--vcl/source/window/decoview.cxx2
-rw-r--r--vcl/source/window/winproc.cxx4
-rw-r--r--vcl/unx/generic/print/common_gfx.cxx4
6 files changed, 8 insertions, 8 deletions
diff --git a/vcl/source/font/font.cxx b/vcl/source/font/font.cxx
index 06591700ee11..c6351c228097 100644
--- a/vcl/source/font/font.cxx
+++ b/vcl/source/font/font.cxx
@@ -210,7 +210,7 @@ void Font::SetKerning( FontKerning eKerning )
bool Font::IsKerning() const
{
- return !(mpImplFont->meKerning == FontKerning::NONE);
+ return mpImplFont->meKerning != FontKerning::NONE;
}
void Font::SetWeight( FontWeight eWeight )
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index e95502a2d053..e9dfafb02b57 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -7929,7 +7929,7 @@ void PDFWriterImpl::endTransparencyGroup( const tools::Rectangle& rBoundingBox,
SAL_WARN_IF( nTransparentPercent > 100, "vcl.pdfwriter", "invalid alpha value" );
nTransparentPercent = nTransparentPercent % 100;
- if( !(m_aContext.Version >= PDFWriter::PDFVersion::PDF_1_4) )
+ if( m_aContext.Version < PDFWriter::PDFVersion::PDF_1_4 )
return;
// create XObject
diff --git a/vcl/source/opengl/OpenGLHelper.cxx b/vcl/source/opengl/OpenGLHelper.cxx
index e48894168ac6..4c8660fb920a 100644
--- a/vcl/source/opengl/OpenGLHelper.cxx
+++ b/vcl/source/opengl/OpenGLHelper.cxx
@@ -348,7 +348,7 @@ namespace
GLenum nBinaryFormat = GL_NONE;
glGetProgramiv( nProgramID, GL_PROGRAM_BINARY_LENGTH, &nBinaryLength );
- if( !( nBinaryLength > 0 ) )
+ if( nBinaryLength <= 0 )
{
SAL_WARN( "vcl.opengl", "Binary size is zero" );
return;
diff --git a/vcl/source/window/decoview.cxx b/vcl/source/window/decoview.cxx
index f7879511b79b..b2c494390d09 100644
--- a/vcl/source/window/decoview.cxx
+++ b/vcl/source/window/decoview.cxx
@@ -531,7 +531,7 @@ void ImplDrawButton( OutputDevice *const pDev, tools::Rectangle aFillRect,
ImplDraw2ColorFrame( pDev, aFillRect, aColor1, aColor2 );
- if ( !((nStyle & BUTTON_DRAW_FLATTEST) == DrawButtonFlags::Flat) )
+ if ( (nStyle & BUTTON_DRAW_FLATTEST) != DrawButtonFlags::Flat )
{
if ( nStyle & (DrawButtonFlags::Pressed | DrawButtonFlags::Checked) )
{
diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx
index bed6fcc45854..bf64ef132cc7 100644
--- a/vcl/source/window/winproc.cxx
+++ b/vcl/source/window/winproc.cxx
@@ -583,8 +583,8 @@ bool ImplHandleMouseEvent( const VclPtr<vcl::Window>& xWindow, MouseNotifyEvent
pChild->ImplGetFrameData()->mnFirstMouseX = nMouseX;
pChild->ImplGetFrameData()->mnFirstMouseY = nMouseY;
pChild->ImplGetFrameData()->mnFirstMouseCode = nCode;
- pChild->ImplGetFrameData()->mbStartDragCalled = !((nCode & (MOUSE_LEFT | MOUSE_RIGHT | MOUSE_MIDDLE)) ==
- (rMSettings.GetStartDragCode() & (MOUSE_LEFT | MOUSE_RIGHT | MOUSE_MIDDLE)));
+ pChild->ImplGetFrameData()->mbStartDragCalled = (nCode & (MOUSE_LEFT | MOUSE_RIGHT | MOUSE_MIDDLE)) !=
+ (rMSettings.GetStartDragCode() & (MOUSE_LEFT | MOUSE_RIGHT | MOUSE_MIDDLE));
}
pChild->ImplGetFrameData()->mnMouseDownTime = nMsgTime;
}
diff --git a/vcl/unx/generic/print/common_gfx.cxx b/vcl/unx/generic/print/common_gfx.cxx
index 40894081cbd1..887c4370d356 100644
--- a/vcl/unx/generic/print/common_gfx.cxx
+++ b/vcl/unx/generic/print/common_gfx.cxx
@@ -378,7 +378,7 @@ void
PrinterGfx::DrawPolygon (sal_uInt32 nPoints, const Point* pPath)
{
// premature end of operation
- if (!(nPoints > 1) || (pPath == nullptr) || !(maFillColor.Is() || maLineColor.Is()))
+ if (nPoints <= 0 || (pPath == nullptr) || !(maFillColor.Is() || maLineColor.Is()))
return;
// setup closed path
@@ -529,7 +529,7 @@ PrinterGfx::DrawPolygonBezier (sal_uInt32 nPoints, const Point* pPath, const Pol
const sal_uInt32 nBezString = 1024;
sal_Char pString[nBezString];
// premature end of operation
- if (!(nPoints > 1) || (pPath == nullptr) || !(maFillColor.Is() || maLineColor.Is()))
+ if (nPoints <= 0 || (pPath == nullptr) || !(maFillColor.Is() || maLineColor.Is()))
return;
snprintf(pString, nBezString, "%li %li moveto\n", pPath[0].X(), pPath[0].Y());