From 4a0ad999d29ae63db61f80c1b9ed9e76104015e7 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Fri, 9 Oct 2015 14:29:08 +0200 Subject: clang-analyzer-deadcode.DeadStores Change-Id: I11b99fca91b266bdf6c29dc142511bf01dbd4bed --- vcl/source/window/taskpanelist.cxx | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) (limited to 'vcl') diff --git a/vcl/source/window/taskpanelist.cxx b/vcl/source/window/taskpanelist.cxx index c9fcb88b968a..081947c538e3 100644 --- a/vcl/source/window/taskpanelist.cxx +++ b/vcl/source/window/taskpanelist.cxx @@ -162,7 +162,6 @@ bool TaskPaneList::HandleKeyEvent(const KeyEvent& rKeyEvent) if( aKeyCode.GetCode() == KEY_F6 && ! aKeyCode.IsMod2() ) // F6 { bool bSplitterOnly; - bool bFocusInList = false; bSplitterOnly = aKeyCode.IsMod1() && aKeyCode.IsShift(); @@ -173,8 +172,6 @@ bool TaskPaneList::HandleKeyEvent(const KeyEvent& rKeyEvent) vcl::Window *pWin = *p; if( pWin->HasChildPathFocus( true ) ) { - bFocusInList = true; - // Ctrl-F6 goes directly to the document if( !pWin->IsDialog() && aKeyCode.IsMod1() && !aKeyCode.IsShift() ) { @@ -214,18 +211,15 @@ bool TaskPaneList::HandleKeyEvent(const KeyEvent& rKeyEvent) } // the focus is not in the list: activate first float if F6 was pressed - if( !bFocusInList ) + vcl::Window *pWin; + if( bSplitterOnly ) + pWin = FindNextSplitter( NULL ); + else + pWin = FindNextFloat( NULL, bForward ); + if( pWin ) { - vcl::Window *pWin; - if( bSplitterOnly ) - pWin = FindNextSplitter( NULL ); - else - pWin = FindNextFloat( NULL, bForward ); - if( pWin ) - { - ImplTaskPaneListGrabFocus( pWin, bForward ); - return true; - } + ImplTaskPaneListGrabFocus( pWin, bForward ); + return true; } } -- cgit