diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-04-25 10:33:32 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-04-25 12:15:17 +0200 |
commit | a334e85a2f0885b0d931fe80c50c4b3d07af7dd5 (patch) | |
tree | b4e2e73f094bf5a00c930af201822f75ffd9a8ec /vcl/source/window/splitwin.cxx | |
parent | 633bab98427fa3760c67274082283cd36b4508ca (diff) |
clang-tidy readability-simplify-boolean-expr in vcl
Change-Id: I10ad38bcb5b05a754de9a396f4aaa79d97458d6f
Reviewed-on: https://gerrit.libreoffice.org/36930
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source/window/splitwin.cxx')
-rw-r--r-- | vcl/source/window/splitwin.cxx | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx index 9d1c1a7af795..a5b71d093363 100644 --- a/vcl/source/window/splitwin.cxx +++ b/vcl/source/window/splitwin.cxx @@ -1839,10 +1839,7 @@ void SplitWindow::ImplStartSplit( const MouseEvent& rMEvt ) bool bPropSmaller; mnMouseModifier = rMEvt.GetModifier(); - if ( !(mnMouseModifier & KEY_SHIFT) || (static_cast<sal_uInt16>(mnSplitPos+1) >= mpSplitSet->mpItems.size()) ) - bPropSmaller = false; - else - bPropSmaller = true; + bPropSmaller = (mnMouseModifier & KEY_SHIFT) && (static_cast<sal_uInt16>(mnSplitPos+1) < mpSplitSet->mpItems.size()); // here we can set the maximum size StartSplit(); @@ -2865,10 +2862,7 @@ bool SplitWindow::IsItemValid( sal_uInt16 nId ) const sal_uInt16 nPos; ImplSplitSet* pSet = mpBaseSet ? ImplFindItem(mpBaseSet, nId, nPos) : nullptr; - if ( pSet ) - return true; - else - return false; + return pSet != nullptr; } sal_uInt16 SplitWindow::GetItemId( vcl::Window* pWindow ) const |