diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-04-25 10:33:00 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-04-25 13:45:17 +0200 |
commit | ae622df5df4094481ef4212dbe2ba8449e47871f (patch) | |
tree | c140eedc702566e33e8035952d3a1aaceb827c6c /sfx2/source/dialog | |
parent | 825c8f1b6e2c1e8c686f4656337fa2879ade481d (diff) |
clang-tidy readability-simplify-boolean-expr in sfx2
Change-Id: I388e0160daf6a7359881acb82145460ad5bbbbbf
Reviewed-on: https://gerrit.libreoffice.org/36929
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2/source/dialog')
-rw-r--r-- | sfx2/source/dialog/dockwin.cxx | 5 | ||||
-rw-r--r-- | sfx2/source/dialog/mgetempl.cxx | 5 | ||||
-rw-r--r-- | sfx2/source/dialog/splitwin.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/dialog/tabdlg.cxx | 5 |
4 files changed, 4 insertions, 15 deletions
diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx index ec7d0a085fa1..74522e290d4e 100644 --- a/sfx2/source/dialog/dockwin.cxx +++ b/sfx2/source/dialog/dockwin.cxx @@ -300,10 +300,7 @@ namespace static bool lcl_checkDockingWindowID( sal_uInt16 nID ) { - if (nID < SID_DOCKWIN_START || nID >= sal_uInt16(SID_DOCKWIN_START+NUM_OF_DOCKINGWINDOWS)) - return false; - else - return true; + return !(nID < SID_DOCKWIN_START || nID >= sal_uInt16(SID_DOCKWIN_START+NUM_OF_DOCKINGWINDOWS)); } static SfxWorkWindow* lcl_getWorkWindowFromXFrame( const uno::Reference< frame::XFrame >& rFrame ) diff --git a/sfx2/source/dialog/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx index 0989f25ac140..fca6b357efae 100644 --- a/sfx2/source/dialog/mgetempl.cxx +++ b/sfx2/source/dialog/mgetempl.cxx @@ -398,10 +398,7 @@ bool SfxManageStyleSheetPage::Execute_Impl( nId, SfxCallMode::SYNCHRON | SfxCallMode::RECORD | SfxCallMode::MODAL, pItems ); - if ( !pItem ) - return false; - - return true; + return pItem != nullptr; } diff --git a/sfx2/source/dialog/splitwin.cxx b/sfx2/source/dialog/splitwin.cxx index 5ae04bef74a5..3f75d5425338 100644 --- a/sfx2/source/dialog/splitwin.cxx +++ b/sfx2/source/dialog/splitwin.cxx @@ -1004,9 +1004,7 @@ bool SfxSplitWindow::CursorIsOverRect() const aRect = aRect.GetUnion( aVisRect ); } - if ( aRect.IsInside( OutputToScreenPixel( static_cast<vcl::Window*>(const_cast<SfxSplitWindow *>(this))->GetPointerPosPixel() ) ) ) - return true; - return false; + return aRect.IsInside( OutputToScreenPixel( static_cast<vcl::Window*>(const_cast<SfxSplitWindow *>(this))->GetPointerPosPixel() ) ); } diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx index e819521eb448..04bb0d07d19d 100644 --- a/sfx2/source/dialog/tabdlg.cxx +++ b/sfx2/source/dialog/tabdlg.cxx @@ -1201,10 +1201,7 @@ IMPL_LINK( SfxTabDialog, DeactivatePageHdl, TabControl *, pTabCtrl, bool ) pObj->bRefresh = false; } } - if ( nRet & DeactivateRC::LeavePage ) - return true; - else - return false; + return static_cast<bool>(nRet & DeactivateRC::LeavePage); } |