summaryrefslogtreecommitdiff
path: root/vcl/unx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-11-23 08:13:06 +0100
committerStephan Bergmann <sbergman@redhat.com>2017-11-23 10:00:44 +0100
commitb26012ef159bd420ac3bb9275607d3a1622422f7 (patch)
treee39d6e31122a22d7c0c27336410acaafe71c4fcf /vcl/unx
parentbfaf5740bb10ce8c51017cba44681de10953bea4 (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/unx')
-rw-r--r--vcl/unx/generic/window/salframe.cxx10
-rw-r--r--vcl/unx/gtk/gtksalframe.cxx8
-rw-r--r--vcl/unx/gtk/salnativewidgets-gtk.cxx2
-rw-r--r--vcl/unx/gtk3/gtk3gtkframe.cxx8
-rw-r--r--vcl/unx/kde4/KDESalGraphics.cxx12
5 files changed, 20 insertions, 20 deletions
diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx
index 10516bec1158..f88e9b6219a8 100644
--- a/vcl/unx/generic/window/salframe.cxx
+++ b/vcl/unx/generic/window/salframe.cxx
@@ -436,7 +436,7 @@ void X11SalFrame::Init( SalFrameStyleFlags nSalFrameStyle, SalX11Screen nXScreen
}
Attributes.override_redirect = True;
}
- else if( (nSalFrameStyle & SalFrameStyleFlags::SYSTEMCHILD ) )
+ else if( nSalFrameStyle & SalFrameStyleFlags::SYSTEMCHILD )
{
SAL_WARN_IF( !mpParent, "vcl", "SalFrameStyleFlags::SYSTEMCHILD window without parent" );
if( mpParent )
@@ -618,7 +618,7 @@ void X11SalFrame::Init( SalFrameStyleFlags nSalFrameStyle, SalX11Screen nXScreen
X11SalFrame* pFrame = this;
while( pFrame->mpParent )
pFrame = pFrame->mpParent;
- if( (pFrame->nStyle_ & SalFrameStyleFlags::PLUG ) )
+ if( pFrame->nStyle_ & SalFrameStyleFlags::PLUG )
{
// if the top level window is a plugin window,
// then we should place us in the same window group as
@@ -703,7 +703,7 @@ void X11SalFrame::Init( SalFrameStyleFlags nSalFrameStyle, SalX11Screen nXScreen
a[n++] = pDisplay_->getWMAdaptor()->getAtom( WMAdaptor::NET_WM_PING );
#endif
- if( (nSalFrameStyle & SalFrameStyleFlags::OWNERDRAWDECORATION) )
+ if( nSalFrameStyle & SalFrameStyleFlags::OWNERDRAWDECORATION )
a[n++] = pDisplay_->getWMAdaptor()->getAtom( WMAdaptor::WM_TAKE_FOCUS );
XSetWMProtocols( GetXDisplay(), GetShellWindow(), a, n );
@@ -1919,7 +1919,7 @@ void X11SalFrame::SetSize( const Size &rSize )
XResizeWindow( GetXDisplay(), IsSysChildWindow() ? GetWindow() : GetShellWindow(), rSize.Width(), rSize.Height() );
if( GetWindow() != GetShellWindow() )
{
- if( (nStyle_ & SalFrameStyleFlags::PLUG ) )
+ if( nStyle_ & SalFrameStyleFlags::PLUG )
XMoveResizeWindow( GetXDisplay(), GetWindow(), 0, 0, rSize.Width(), rSize.Height() );
else
XResizeWindow( GetXDisplay(), GetWindow(), rSize.Width(), rSize.Height() );
@@ -2017,7 +2017,7 @@ void X11SalFrame::SetPosSize( const tools::Rectangle &rPosSize )
XMoveResizeWindow( GetXDisplay(), IsSysChildWindow() ? GetWindow() : GetShellWindow(), values.x, values.y, values.width, values.height );
if( GetShellWindow() != GetWindow() )
{
- if( (nStyle_ & SalFrameStyleFlags::PLUG ) )
+ if( nStyle_ & SalFrameStyleFlags::PLUG )
XMoveResizeWindow( GetXDisplay(), GetWindow(), 0, 0, values.width, values.height );
else
XMoveResizeWindow( GetXDisplay(), GetWindow(), values.x, values.y, values.width, values.height );
diff --git a/vcl/unx/gtk/gtksalframe.cxx b/vcl/unx/gtk/gtksalframe.cxx
index 4d039a0d0759..c0bbf1303b1a 100644
--- a/vcl/unx/gtk/gtksalframe.cxx
+++ b/vcl/unx/gtk/gtksalframe.cxx
@@ -1201,17 +1201,17 @@ void GtkSalFrame::Init( SalFrame* pParent, SalFrameStyleFlags nStyle )
GdkWindowTypeHint eType = GDK_WINDOW_TYPE_HINT_NORMAL;
if( (nStyle & SalFrameStyleFlags::DIALOG) && m_pParent != nullptr )
eType = GDK_WINDOW_TYPE_HINT_DIALOG;
- if( (nStyle & SalFrameStyleFlags::INTRO) )
+ if( nStyle & SalFrameStyleFlags::INTRO )
{
gtk_window_set_role( GTK_WINDOW(m_pWindow), "splashscreen" );
eType = GDK_WINDOW_TYPE_HINT_SPLASHSCREEN;
}
- else if( (nStyle & SalFrameStyleFlags::TOOLWINDOW ) )
+ else if( nStyle & SalFrameStyleFlags::TOOLWINDOW )
{
eType = GDK_WINDOW_TYPE_HINT_UTILITY;
gtk_window_set_skip_taskbar_hint( GTK_WINDOW(m_pWindow), true );
}
- else if( (nStyle & SalFrameStyleFlags::OWNERDRAWDECORATION) )
+ else if( nStyle & SalFrameStyleFlags::OWNERDRAWDECORATION )
{
eType = GDK_WINDOW_TYPE_HINT_TOOLBAR;
lcl_set_accept_focus( GTK_WINDOW(m_pWindow), false, true );
@@ -1226,7 +1226,7 @@ void GtkSalFrame::Init( SalFrame* pParent, SalFrameStyleFlags nStyle )
gtk_window_set_type_hint( GTK_WINDOW(m_pWindow), eType );
gtk_window_set_gravity( GTK_WINDOW(m_pWindow), GDK_GRAVITY_STATIC );
}
- else if( (nStyle & SalFrameStyleFlags::FLOAT) )
+ else if( nStyle & SalFrameStyleFlags::FLOAT )
gtk_window_set_type_hint( GTK_WINDOW(m_pWindow), GDK_WINDOW_TYPE_HINT_POPUP_MENU );
if( eWinType == GTK_WINDOW_TOPLEVEL )
diff --git a/vcl/unx/gtk/salnativewidgets-gtk.cxx b/vcl/unx/gtk/salnativewidgets-gtk.cxx
index 71cdf74f0ca5..313af6cc0518 100644
--- a/vcl/unx/gtk/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/salnativewidgets-gtk.cxx
@@ -1645,7 +1645,7 @@ bool GtkSalGraphics::NWPaintGTKButtonReal(
if ( GTK_IS_BUTTON(button) )
{
- if ( (nState & ControlState::DEFAULT) )
+ if ( nState & ControlState::DEFAULT )
gtk_paint_box( button->style, gdkDrawable, GTK_STATE_NORMAL, GTK_SHADOW_IN,
&clipRect, button, "buttondefault", x, y, w, h );
diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
index 19b6e815ff26..725c64594d92 100644
--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
@@ -1221,17 +1221,17 @@ void GtkSalFrame::Init( SalFrame* pParent, SalFrameStyleFlags nStyle )
GdkWindowTypeHint eType = GDK_WINDOW_TYPE_HINT_NORMAL;
if( (nStyle & SalFrameStyleFlags::DIALOG) && m_pParent != nullptr )
eType = GDK_WINDOW_TYPE_HINT_DIALOG;
- if( (nStyle & SalFrameStyleFlags::INTRO) )
+ if( nStyle & SalFrameStyleFlags::INTRO )
{
gtk_window_set_role( GTK_WINDOW(m_pWindow), "splashscreen" );
eType = GDK_WINDOW_TYPE_HINT_SPLASHSCREEN;
}
- else if( (nStyle & SalFrameStyleFlags::TOOLWINDOW ) )
+ else if( nStyle & SalFrameStyleFlags::TOOLWINDOW )
{
eType = GDK_WINDOW_TYPE_HINT_DIALOG;
gtk_window_set_skip_taskbar_hint( GTK_WINDOW(m_pWindow), true );
}
- else if( (nStyle & SalFrameStyleFlags::OWNERDRAWDECORATION) )
+ else if( nStyle & SalFrameStyleFlags::OWNERDRAWDECORATION )
{
eType = GDK_WINDOW_TYPE_HINT_TOOLBAR;
gtk_window_set_focus_on_map(GTK_WINDOW(m_pWindow), false);
@@ -1241,7 +1241,7 @@ void GtkSalFrame::Init( SalFrame* pParent, SalFrameStyleFlags nStyle )
gtk_window_set_gravity( GTK_WINDOW(m_pWindow), GDK_GRAVITY_STATIC );
gtk_window_set_resizable( GTK_WINDOW(m_pWindow), bool(nStyle & SalFrameStyleFlags::SIZEABLE) );
}
- else if( (nStyle & SalFrameStyleFlags::FLOAT) )
+ else if( nStyle & SalFrameStyleFlags::FLOAT )
gtk_window_set_type_hint( GTK_WINDOW(m_pWindow), GDK_WINDOW_TYPE_HINT_POPUP_MENU );
InitCommon();
diff --git a/vcl/unx/kde4/KDESalGraphics.cxx b/vcl/unx/kde4/KDESalGraphics.cxx
index f58240ea3aec..a4ad88117f57 100644
--- a/vcl/unx/kde4/KDESalGraphics.cxx
+++ b/vcl/unx/kde4/KDESalGraphics.cxx
@@ -513,17 +513,17 @@ bool KDESalGraphics::drawNativeControl( ControlType type, ControlPart part,
if( value.getType() == ControlType::SpinButtons )
{
const SpinbuttonValue* pSpinVal = static_cast<const SpinbuttonValue *>(&value);
- if( (pSpinVal->mnUpperState & ControlState::PRESSED) )
+ if( pSpinVal->mnUpperState & ControlState::PRESSED )
option.activeSubControls |= QStyle::SC_SpinBoxUp;
- if( (pSpinVal->mnLowerState & ControlState::PRESSED) )
+ if( pSpinVal->mnLowerState & ControlState::PRESSED )
option.activeSubControls |= QStyle::SC_SpinBoxDown;
- if( (pSpinVal->mnUpperState & ControlState::ENABLED) )
+ if( pSpinVal->mnUpperState & ControlState::ENABLED )
option.stepEnabled |= QAbstractSpinBox::StepUpEnabled;
- if( (pSpinVal->mnLowerState & ControlState::ENABLED) )
+ if( pSpinVal->mnLowerState & ControlState::ENABLED )
option.stepEnabled |= QAbstractSpinBox::StepDownEnabled;
- if( (pSpinVal->mnUpperState & ControlState::ROLLOVER) )
+ if( pSpinVal->mnUpperState & ControlState::ROLLOVER )
option.state = QStyle::State_MouseOver;
- if( (pSpinVal->mnLowerState & ControlState::ROLLOVER) )
+ if( pSpinVal->mnLowerState & ControlState::ROLLOVER )
option.state = QStyle::State_MouseOver;
}