[Libreoffice-commits] core.git: reportdesign/source
Caolán McNamara
caolanm at redhat.com
Mon Dec 1 06:33:13 PST 2014
reportdesign/source/ui/dlg/CondFormat.cxx | 74 +++++++++++++++---------------
1 file changed, 38 insertions(+), 36 deletions(-)
New commits:
commit fd88318c21fbc7f6c3554e2fb524109a2aad5cf8
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Dec 1 14:32:26 2014 +0000
WaE: -Werror=switch
Change-Id: Ib29d9c377bad2ba6dfb771b74cc97dcffe768dcb
diff --git a/reportdesign/source/ui/dlg/CondFormat.cxx b/reportdesign/source/ui/dlg/CondFormat.cxx
index a4d8c03..07b06dd 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 );
More information about the Libreoffice-commits
mailing list