diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-12-01 14:32:26 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-12-01 14:32:41 +0000 |
commit | fd88318c21fbc7f6c3554e2fb524109a2aad5cf8 (patch) | |
tree | a4c77895fdb33498cff760ff50c4646e4dad5583 /reportdesign | |
parent | 542120c30672144a6ad536909b7f4740d3a6112f (diff) |
WaE: -Werror=switch
Change-Id: Ib29d9c377bad2ba6dfb771b74cc97dcffe768dcb
Diffstat (limited to 'reportdesign')
-rw-r--r-- | reportdesign/source/ui/dlg/CondFormat.cxx | 74 |
1 files changed, 38 insertions, 36 deletions
diff --git a/reportdesign/source/ui/dlg/CondFormat.cxx b/reportdesign/source/ui/dlg/CondFormat.cxx index a4d8c031470a..07b06dd1bd6f 100644 --- a/reportdesign/source/ui/dlg/CondFormat.cxx +++ b/reportdesign/source/ui/dlg/CondFormat.cxx @@ -472,49 +472,51 @@ namespace rptui { switch ( _rNEvt.GetType() ) { - case MouseNotifyEvent::KEYINPUT: - { - const KeyEvent* pKeyEvent( _rNEvt.GetKeyEvent() ); - const vcl::KeyCode& rKeyCode = pKeyEvent->GetKeyCode(); - if ( rKeyCode.IsMod1() && rKeyCode.IsMod2() ) + case MouseNotifyEvent::KEYINPUT: { - if ( rKeyCode.GetCode() == 0x0508 ) - { - impl_deleteCondition_nothrow( impl_getFocusedConditionIndex( 0 ) ); - return true; - } - if ( rKeyCode.GetCode() == 0x0507 ) // + + const KeyEvent* pKeyEvent( _rNEvt.GetKeyEvent() ); + const vcl::KeyCode& rKeyCode = pKeyEvent->GetKeyCode(); + if ( rKeyCode.IsMod1() && rKeyCode.IsMod2() ) { - impl_addCondition_nothrow( impl_getFocusedConditionIndex( impl_getConditionCount() - 1 ) + 1 ); - return true; + if ( rKeyCode.GetCode() == 0x0508 ) + { + impl_deleteCondition_nothrow( impl_getFocusedConditionIndex( 0 ) ); + return true; + } + if ( rKeyCode.GetCode() == 0x0507 ) // + + { + impl_addCondition_nothrow( impl_getFocusedConditionIndex( impl_getConditionCount() - 1 ) + 1 ); + return true; + } } - } - } - break; - case MouseNotifyEvent::GETFOCUS: - { - if ( m_bDeletingCondition ) break; - - const vcl::Window* pGetFocusWindow( _rNEvt.GetWindow() ); - - // determine whether the new focus window is part of an (currently invisible) condition - const vcl::Window* pConditionCandidate = pGetFocusWindow->GetParent(); - const vcl::Window* pPlaygroundCandidate = pConditionCandidate ? pConditionCandidate->GetParent() : NULL; - while ( ( pPlaygroundCandidate ) - && ( pPlaygroundCandidate != this ) - && ( pPlaygroundCandidate != m_pConditionPlayground ) - ) - { - pConditionCandidate = pConditionCandidate->GetParent(); - pPlaygroundCandidate = pConditionCandidate ? pConditionCandidate->GetParent() : NULL; } - if (pConditionCandidate && pPlaygroundCandidate == m_pConditionPlayground) + case MouseNotifyEvent::GETFOCUS: { - impl_ensureConditionVisible( dynamic_cast< const Condition& >( *pConditionCandidate ).getConditionIndex() ); + if ( m_bDeletingCondition ) + break; + + const vcl::Window* pGetFocusWindow( _rNEvt.GetWindow() ); + + // determine whether the new focus window is part of an (currently invisible) condition + const vcl::Window* pConditionCandidate = pGetFocusWindow->GetParent(); + const vcl::Window* pPlaygroundCandidate = pConditionCandidate ? pConditionCandidate->GetParent() : NULL; + while ( ( pPlaygroundCandidate ) + && ( pPlaygroundCandidate != this ) + && ( pPlaygroundCandidate != m_pConditionPlayground ) + ) + { + pConditionCandidate = pConditionCandidate->GetParent(); + pPlaygroundCandidate = pConditionCandidate ? pConditionCandidate->GetParent() : NULL; + } + if (pConditionCandidate && pPlaygroundCandidate == m_pConditionPlayground) + { + impl_ensureConditionVisible( dynamic_cast< const Condition& >( *pConditionCandidate ).getConditionIndex() ); + } + break; } - } - break; + default: + break; } return ModalDialog::PreNotify( _rNEvt ); |