diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-11-01 13:14:09 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-11-08 07:37:40 +0100 |
commit | 7f48fa8152bd3320af7276d811b752c5a762dcce (patch) | |
tree | a95f2aec74a17050e825eb78833ee8f0274cb728 /vcl/source/control | |
parent | f10b7e820844d94b4dbec3dcaf24392275940914 (diff) |
loplugin:collapseif in tools..xmloff
Change-Id: Iea1227a9f13a0a618d9bb6b0bbedaa5ce8d1a4f5
Reviewed-on: https://gerrit.libreoffice.org/62732
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source/control')
-rw-r--r-- | vcl/source/control/imp_listbox.cxx | 13 | ||||
-rw-r--r-- | vcl/source/control/scrbar.cxx | 7 |
2 files changed, 7 insertions, 13 deletions
diff --git a/vcl/source/control/imp_listbox.cxx b/vcl/source/control/imp_listbox.cxx index bd6c0b04214c..e7f770d5ff1f 100644 --- a/vcl/source/control/imp_listbox.cxx +++ b/vcl/source/control/imp_listbox.cxx @@ -1493,16 +1493,13 @@ bool ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt ) { SetTopEntry( 0 ); } - else if ( !bCtrl && !bMod2 ) + else if ( !bCtrl && !bMod2 && mnCurrentPos ) { - if ( mnCurrentPos ) - { - nSelect = mpEntryList->FindFirstSelectable( mpEntryList->GetEntryCount() ? 0 : LISTBOX_ENTRY_NOTFOUND ); - if( mnTop != 0 ) - SetTopEntry( 0 ); + nSelect = mpEntryList->FindFirstSelectable( mpEntryList->GetEntryCount() ? 0 : LISTBOX_ENTRY_NOTFOUND ); + if( mnTop != 0 ) + SetTopEntry( 0 ); - bDone = true; - } + bDone = true; } maQuickSelectionEngine.Reset(); } diff --git a/vcl/source/control/scrbar.cxx b/vcl/source/control/scrbar.cxx index 61d22c90e3d9..e2b000cdd2ea 100644 --- a/vcl/source/control/scrbar.cxx +++ b/vcl/source/control/scrbar.cxx @@ -579,11 +579,8 @@ bool ScrollBar::ImplDrawNative(vcl::RenderContext& rRenderContext, sal_uInt16 nD if (IsMouseOver()) { tools::Rectangle* pRect = ImplFindPartRect(GetPointerPosPixel()); - if (pRect) - { - if (pRect == &maThumbRect) - nState |= ControlState::ROLLOVER; - } + if (pRect && pRect == &maThumbRect) + nState |= ControlState::ROLLOVER; } bNativeOK = rRenderContext.DrawNativeControl(ControlType::Scrollbar, (bHorz ? ControlPart::ThumbHorz : ControlPart::ThumbVert), |