diff options
Diffstat (limited to 'vcl')
23 files changed, 37 insertions, 34 deletions
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx index c8769355051b..e9f048b19dd3 100644 --- a/vcl/source/control/button.cxx +++ b/vcl/source/control/button.cxx @@ -1082,7 +1082,7 @@ void PushButton::ImplDrawPushButton(vcl::RenderContext& rRenderContext) Size aInRectSize(rRenderContext.LogicToPixel(Size(aInRect.GetWidth(), aInRect.GetHeight()))); aControlValue.mbSingleLine = (aInRectSize.Height() < 2 * aFontSize.Height()); - if (((nState & ControlState::ROLLOVER)) || !(GetStyle() & WB_FLATBUTTON)) + if ((nState & ControlState::ROLLOVER) || !(GetStyle() & WB_FLATBUTTON)) { bNativeOK = rRenderContext.DrawNativeControl(ControlType::Pushbutton, ControlPart::Entire, aCtrlRegion, nState, aControlValue, OUString() /*PushButton::GetText()*/); diff --git a/vcl/source/edit/texteng.cxx b/vcl/source/edit/texteng.cxx index 78d2e1dbb656..5f8084ee9d31 100644 --- a/vcl/source/edit/texteng.cxx +++ b/vcl/source/edit/texteng.cxx @@ -1833,7 +1833,7 @@ void TextEngine::RecalcTextPortion( sal_uInt32 nPara, sal_Int32 nStartPos, sal_I // Or if at the very beginning ( StartPos 0 ) followed by a tab... if ( ( pNode->GetCharAttribs().HasBoundingAttrib( nStartPos ) ) || ( nStartPos && ( pNode->GetText()[ nStartPos - 1 ] == '\t' ) ) || - ( ( !nStartPos && ( nNewChars < pNode->GetText().getLength() ) && pNode->GetText()[ nNewChars ] == '\t' ) ) ) + ( !nStartPos && ( nNewChars < pNode->GetText().getLength() ) && pNode->GetText()[ nNewChars ] == '\t' ) ) { std::size_t nNewPortionPos = 0; if ( nStartPos ) diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx index b78c2fdddafa..6ae9459f5bd6 100644 --- a/vcl/source/filter/graphicfilter.cxx +++ b/vcl/source/filter/graphicfilter.cxx @@ -762,8 +762,8 @@ static bool ImpPeekGraphicFormat( SvStream& rStream, OUString& rFormatExtension, if (!bTest || rFormatExtension.startsWith("PDF")) { - if ((sFirstBytes[0] == '%' && sFirstBytes[1] == 'P' && sFirstBytes[2] == 'D' && - sFirstBytes[3] == 'F' && sFirstBytes[4] == '-')) + if (sFirstBytes[0] == '%' && sFirstBytes[1] == 'P' && sFirstBytes[2] == 'D' && + sFirstBytes[3] == 'F' && sFirstBytes[4] == '-') { rFormatExtension = "PDF"; return true; diff --git a/vcl/source/filter/ipdf/pdfread.cxx b/vcl/source/filter/ipdf/pdfread.cxx index f1a7e2b52a17..fc85066a2b03 100644 --- a/vcl/source/filter/ipdf/pdfread.cxx +++ b/vcl/source/filter/ipdf/pdfread.cxx @@ -123,7 +123,7 @@ bool isCompatible(SvStream& rInStream) if (nRead < 8) return false; - if ((aFirstBytes[0] != '%' || aFirstBytes[1] != 'P' || aFirstBytes[2] != 'D' || aFirstBytes[3] != 'F' || aFirstBytes[4] != '-')) + if (aFirstBytes[0] != '%' || aFirstBytes[1] != 'P' || aFirstBytes[2] != 'D' || aFirstBytes[3] != 'F' || aFirstBytes[4] != '-') return false; sal_Int32 nMajor = OString(aFirstBytes[5]).toInt32(); diff --git a/vcl/source/filter/sgvtext.cxx b/vcl/source/filter/sgvtext.cxx index 32ce4f1d44a2..e53e6066e5ef 100644 --- a/vcl/source/filter/sgvtext.cxx +++ b/vcl/source/filter/sgvtext.cxx @@ -580,7 +580,7 @@ bool UpcasePossible(UCHAR c) UCHAR Upcase(UCHAR c) { - if ((c>=(UCHAR)'a' && c<=(UCHAR)'z')) c=(c-(UCHAR)'a')+(UCHAR)'A'; + if (c>=(UCHAR)'a' && c<=(UCHAR)'z') c=(c-(UCHAR)'a')+(UCHAR)'A'; else if ( c == 0xe4 ) c = 0xc4; else if ( c == 0xf6 ) c = 0xd6; else if ( c == 0xfc ) c = 0xdc; diff --git a/vcl/source/filter/wmf/winwmf.cxx b/vcl/source/filter/wmf/winwmf.cxx index b9d2f8d27615..501f36eabfe9 100644 --- a/vcl/source/filter/wmf/winwmf.cxx +++ b/vcl/source/filter/wmf/winwmf.cxx @@ -697,7 +697,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc ) pAcc.reset(); if ( nSye && nSxe && ( ( nSx + nSxe ) <= aBmp.GetSizePixel().Width() ) && - ( ( nSy + nSye <= aBmp.GetSizePixel().Height() ) ) ) + ( ( nSy + nSye ) <= aBmp.GetSizePixel().Height() ) ) { tools::Rectangle aCropRect( Point( nSx, nSy ), Size( nSxe, nSye ) ); aBmp.Crop( aCropRect ); @@ -748,7 +748,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc ) // test if it is sensible to crop if ( nSye && nSxe && ( ( nSx + nSxe ) <= aBmp.GetSizePixel().Width() ) && - ( ( nSy + nSye <= aBmp.GetSizePixel().Height() ) ) ) + ( ( nSy + nSye ) <= aBmp.GetSizePixel().Height() ) ) { tools::Rectangle aCropRect( Point( nSx, nSy ), Size( nSxe, nSye ) ); aBmp.Crop( aCropRect ); diff --git a/vcl/source/font/PhysicalFontCollection.cxx b/vcl/source/font/PhysicalFontCollection.cxx index b10f3c295926..869578425aef 100644 --- a/vcl/source/font/PhysicalFontCollection.cxx +++ b/vcl/source/font/PhysicalFontCollection.cxx @@ -46,7 +46,7 @@ static ImplFontAttrs lcl_IsCJKFont( const OUString& rFontName ) return ImplFontAttrs::CJK|ImplFontAttrs::CJK_KR; // chinese - if ( ((ch >= 0x3400) && (ch <= 0x9FFF)) ) + if ( (ch >= 0x3400) && (ch <= 0x9FFF) ) return ImplFontAttrs::CJK|ImplFontAttrs::CJK_TC|ImplFontAttrs::CJK_SC; // cjk diff --git a/vcl/source/font/PhysicalFontFamily.cxx b/vcl/source/font/PhysicalFontFamily.cxx index 5e28ab37a03f..5381e29e175e 100644 --- a/vcl/source/font/PhysicalFontFamily.cxx +++ b/vcl/source/font/PhysicalFontFamily.cxx @@ -72,7 +72,7 @@ static ImplFontAttrs lcl_IsCJKFont( const OUString& rFontName ) return ImplFontAttrs::CJK|ImplFontAttrs::CJK_KR; // chinese - if ( ((ch >= 0x3400) && (ch <= 0x9FFF)) ) + if ( (ch >= 0x3400) && (ch <= 0x9FFF) ) return ImplFontAttrs::CJK|ImplFontAttrs::CJK_TC|ImplFontAttrs::CJK_SC; // cjk diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index f45dd1685b64..0126752d2c67 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -702,7 +702,7 @@ void PDFWriterImpl::createWidgetFieldName( sal_Int32 i_nWidgetIndex, const PDFWr * outside the interval [32(=ASCII' ');126(=ASCII'~')] * should be escaped hexadecimal */ - if( (aStr[i] >= 32 && aStr[i] <= 126 ) ) + if( aStr[i] >= 32 && aStr[i] <= 126 ) aBuffer.append( aStr[i] ); else { diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx index 32643162d110..0473c541ae0f 100644 --- a/vcl/source/window/layout.cxx +++ b/vcl/source/window/layout.cxx @@ -396,8 +396,8 @@ void VclBox::setAllocation(const Size &rAllocation) long nHomogeneousDimension = 0, nExtraSpace = 0; if (m_bHomogeneous) { - nHomogeneousDimension = ((nAllocPrimaryDimension - - (nVisibleChildren - 1) * m_nSpacing)) / nVisibleChildren; + nHomogeneousDimension = (nAllocPrimaryDimension - + (nVisibleChildren - 1) * m_nSpacing) / nVisibleChildren; } else if (nExpandChildren) { diff --git a/vcl/source/window/legacyaccessibility.cxx b/vcl/source/window/legacyaccessibility.cxx index 62a500a060e7..bcf4bc2c0be6 100644 --- a/vcl/source/window/legacyaccessibility.cxx +++ b/vcl/source/window/legacyaccessibility.cxx @@ -162,9 +162,9 @@ static Window* ImplGetLabeledBy( Window* pFrameWindow, WindowType nMyType, Windo if( pSWindow && isVisibleInLayout(pSWindow) && !(pSWindow->GetStyle() & WB_NOLABEL) ) { WindowType nType = pSWindow->GetType(); - if ( ( nType == WindowType::FIXEDTEXT || - nType == WindowType::FIXEDLINE || - nType == WindowType::GROUPBOX ) ) + if ( nType == WindowType::FIXEDTEXT || + nType == WindowType::FIXEDLINE || + nType == WindowType::GROUPBOX ) { // a fixed text can't be labeld by a fixed text. if ( ( nMyType != WindowType::FIXEDTEXT ) || ( nType != WindowType::FIXEDTEXT ) ) diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx index 8142bb649cc5..271ab84ac60a 100644 --- a/vcl/source/window/menu.cxx +++ b/vcl/source/window/menu.cxx @@ -2764,7 +2764,10 @@ sal_uInt16 PopupMenu::ImplExecute( const VclPtr<vcl::Window>& pW, const tools::R // set the flag to hide or show accelerators in the menu depending on whether the menu was launched by mouse or keyboard shortcut if( pSFrom && pSFrom->IsMenuBar()) - ((static_cast<MenuBarWindow*>(pSFrom->pWindow.get())))->SetMBWHideAccel(!(static_cast<MenuBarWindow*>(pSFrom->pWindow.get())->GetMBWMenuKey())); + { + auto pMenuBarWindow = static_cast<MenuBarWindow*>(pSFrom->pWindow.get()); + pMenuBarWindow->SetMBWHideAccel( !(pMenuBarWindow->GetMBWMenuKey()) ); + } delete mpLayoutData; mpLayoutData = nullptr; diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx index 7c03f58eee8c..5630c1c09a08 100644 --- a/vcl/source/window/printdlg.cxx +++ b/vcl/source/window/printdlg.cxx @@ -919,7 +919,7 @@ void PrintDialog::setupOptionalUI() if( ! (rEntry.Value >>= aHelpTexts) ) { OUString aHelpText; - if( (rEntry.Value >>= aHelpText) ) + if( rEntry.Value >>= aHelpText ) { aHelpTexts.realloc( 1 ); *aHelpTexts.getArray() = aHelpText; @@ -931,7 +931,7 @@ void PrintDialog::setupOptionalUI() if( ! (rEntry.Value >>= aHelpIds ) ) { OUString aHelpId; - if( (rEntry.Value >>= aHelpId) ) + if( rEntry.Value >>= aHelpId ) { aHelpIds.realloc( 1 ); *aHelpIds.getArray() = aHelpId; diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx index 4475353a65a2..c76de72b03e1 100644 --- a/vcl/source/window/toolbox.cxx +++ b/vcl/source/window/toolbox.cxx @@ -1933,8 +1933,8 @@ void lcl_hideDoubleSeparators( ToolBox::ImplToolItems& rItems ) ToolBox::ImplToolItems::iterator temp_it; for ( temp_it = it+1; temp_it != rItems.end(); ++temp_it ) { - if ( ((temp_it->meType == ToolBoxItemType::BUTTON) && - temp_it->mbVisible) ) + if ( (temp_it->meType == ToolBoxItemType::BUTTON) && + temp_it->mbVisible ) { it->mbVisible = true; break; diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 04d8e8d5c3b2..5d30f4f54fda 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -1009,7 +1009,7 @@ void Window::ImplInit( vcl::Window* pParent, WinBits nStyle, SystemParentData* p ( !(nFrameStyle & ~SalFrameStyleFlags::CLOSEABLE) && ( mpWindowImpl->mbFloatWin || ((GetType() == WindowType::BORDERWINDOW) && static_cast<ImplBorderWindow*>(this)->mbFloatWindow) || (nStyle & WB_SYSTEMFLOATWIN) ) ) || // 2. borderwindows of floaters with ownerdraw decoration - ( ((GetType() == WindowType::BORDERWINDOW) && static_cast<ImplBorderWindow*>(this)->mbFloatWindow && (nStyle & WB_OWNERDRAWDECORATION) ) ) ) + ((GetType() == WindowType::BORDERWINDOW) && static_cast<ImplBorderWindow*>(this)->mbFloatWindow && (nStyle & WB_OWNERDRAWDECORATION) ) ) { nFrameStyle = SalFrameStyleFlags::FLOAT; if( nStyle & WB_OWNERDRAWDECORATION ) diff --git a/vcl/unx/generic/app/saldata.cxx b/vcl/unx/generic/app/saldata.cxx index 43b6bfbe9284..698955614daf 100644 --- a/vcl/unx/generic/app/saldata.cxx +++ b/vcl/unx/generic/app/saldata.cxx @@ -743,7 +743,7 @@ SalXLib::Yield( bool bWait, bool bHandleAllCurrentEvents ) CheckTimeout(); // handle wakeup events. - if ((nFound > 0) && (FD_ISSET(m_pTimeoutFDS[0], &ReadFDS))) + if ((nFound > 0) && FD_ISSET(m_pTimeoutFDS[0], &ReadFDS)) { int buffer; while (read (m_pTimeoutFDS[0], &buffer, sizeof(buffer)) > 0) diff --git a/vcl/unx/generic/dtrans/X11_selection.cxx b/vcl/unx/generic/dtrans/X11_selection.cxx index 0d3b58ee49cb..a4d08b8da1d0 100644 --- a/vcl/unx/generic/dtrans/X11_selection.cxx +++ b/vcl/unx/generic/dtrans/X11_selection.cxx @@ -3759,7 +3759,7 @@ void SelectionManager::shutdown() throw() sal_Bool SelectionManager::handleEvent(const Any& event) { Sequence< sal_Int8 > aSeq; - if( (event >>= aSeq) ) + if( event >>= aSeq ) { XEvent* pEvent = reinterpret_cast<XEvent*>(aSeq.getArray()); Time nTimestamp = CurrentTime; diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx index 46d642f98a64..180958e0321c 100644 --- a/vcl/unx/generic/window/salframe.cxx +++ b/vcl/unx/generic/window/salframe.cxx @@ -3966,7 +3966,7 @@ long X11SalFrame::Dispatch( XEvent *pEvent ) // don't set the focus into the IME status window // since this will lead to a parent loss of focus, close status, // reget focus, open status, .... flicker loop - if ( (vcl::I18NStatus::get().getStatusFrame() != this) ) + if ( vcl::I18NStatus::get().getStatusFrame() != this ) bSetFocus = true; } diff --git a/vcl/unx/gtk/gtksalframe.cxx b/vcl/unx/gtk/gtksalframe.cxx index e9430ea1fc8a..c23157d76785 100644 --- a/vcl/unx/gtk/gtksalframe.cxx +++ b/vcl/unx/gtk/gtksalframe.cxx @@ -1245,7 +1245,7 @@ void GtkSalFrame::Init( SalFrame* pParent, SalFrameStyleFlags nStyle ) if( bDecoHandling ) { gtk_window_set_resizable( GTK_WINDOW(m_pWindow), bool(nStyle & SalFrameStyleFlags::SIZEABLE) ); - if( ( (nStyle & (SalFrameStyleFlags::OWNERDRAWDECORATION)) ) ) + if( nStyle & (SalFrameStyleFlags::OWNERDRAWDECORATION) ) lcl_set_accept_focus( GTK_WINDOW(m_pWindow), false, false ); } } diff --git a/vcl/unx/gtk/salnativewidgets-gtk.cxx b/vcl/unx/gtk/salnativewidgets-gtk.cxx index ebe9112b480e..d2dbd5b9298a 100644 --- a/vcl/unx/gtk/salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk/salnativewidgets-gtk.cxx @@ -974,7 +974,7 @@ bool GtkSalGraphics::DoDrawNativeControl( { return NWPaintGTKEditBox( pDrawable, nType, nPart, aCtrlRect, aClip, nState, aValue, rCaption ); } - else if ( ((nType==ControlType::MultilineEditbox) && ((nPart==ControlPart::Entire) || (nPart==ControlPart::HasBackgroundTexture)) ) ) + else if ( (nType==ControlType::MultilineEditbox) && ((nPart==ControlPart::Entire) || (nPart==ControlPart::HasBackgroundTexture)) ) { return NWPaintGTKEditBox( pDrawable, nType, nPart, aCtrlRect, aClip, nState, aValue, rCaption ); } @@ -1201,8 +1201,8 @@ bool GtkSalGraphics::getNativeControlRegion( ControlType nType, child->style->font_desc, pango_context_get_language( context ) ); - arrow_size = ( PANGO_PIXELS( pango_font_metrics_get_ascent( metrics ) + - pango_font_metrics_get_descent( metrics ) )); + arrow_size = PANGO_PIXELS( pango_font_metrics_get_ascent( metrics ) + + pango_font_metrics_get_descent( metrics ) ); pango_font_metrics_unref( metrics ); @@ -1215,7 +1215,7 @@ bool GtkSalGraphics::getNativeControlRegion( ControlType nType, returnVal = true; } } - if( (nType == ControlType::Radiobutton || nType == ControlType::Checkbox) ) + if( nType == ControlType::Radiobutton || nType == ControlType::Checkbox ) { NWEnsureGTKRadio( m_nXScreen ); NWEnsureGTKCheck( m_nXScreen ); diff --git a/vcl/unx/gtk/salprn-gtk.cxx b/vcl/unx/gtk/salprn-gtk.cxx index bae9cba368bd..626b7ea10e01 100644 --- a/vcl/unx/gtk/salprn-gtk.cxx +++ b/vcl/unx/gtk/salprn-gtk.cxx @@ -356,7 +356,7 @@ lcl_extractHelpTextsOrIds( if (!(rEntry.Value >>= rHelpStrings)) { OUString aHelpString; - if ((rEntry.Value >>= aHelpString)) + if (rEntry.Value >>= aHelpString) { rHelpStrings.realloc(1); *rHelpStrings.getArray() = aHelpString; diff --git a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx index 6f460826e0ee..1a8f45137862 100644 --- a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx @@ -2632,8 +2632,8 @@ bool GtkSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPar } else if( nType == ControlType::MenuPopup) { - if (((nPart == ControlPart::MenuItemCheckMark) || - (nPart == ControlPart::MenuItemRadioMark) )) + if ((nPart == ControlPart::MenuItemCheckMark) || + (nPart == ControlPart::MenuItemRadioMark) ) { indicator_size = 0; diff --git a/vcl/workben/svptest.cxx b/vcl/workben/svptest.cxx index 95ab4ad3db69..6b66e122e703 100644 --- a/vcl/workben/svptest.cxx +++ b/vcl/workben/svptest.cxx @@ -110,7 +110,7 @@ MyWin::MyWin( vcl::Window* pParent, WinBits nWinStyle ) : double fRed = 255.0-1.5*sqrt((double)(nX*nX+nY*nY)); if( fRed < 0.0 ) fRed = 0.0; - double fGreen = 255.0-1.5*sqrt((double)(((255-nX)*(255-nX)+nY*nY))); + double fGreen = 255.0-1.5*sqrt((double)((255-nX)*(255-nX)+nY*nY)); if( fGreen < 0.0 ) fGreen = 0.0; double fBlue = 255.0-1.5*sqrt((double)((128-nX)*(128-nX)+(255-nY)*(255-nY))); |