diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-12-06 13:26:09 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-12-07 07:10:39 +0000 |
commit | 2d48f5fc0a4f7b5b8c9d3a4f4cc85d5f3a7e5053 (patch) | |
tree | c2e18df7dd44255e98c91f242194fd9bb66f3f3e /toolkit/source | |
parent | ed80d28d9f019a1afa2edd66e115eae26ea19963 (diff) |
convert VCLEVENT constants to scoped enum
Change-Id: Ic8ccb0a9715ec05182dacddab2c015b0de6a0fba
Reviewed-on: https://gerrit.libreoffice.org/31675
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'toolkit/source')
-rw-r--r-- | toolkit/source/awt/animatedimagespeer.cxx | 4 | ||||
-rw-r--r-- | toolkit/source/awt/stylesettings.cxx | 2 | ||||
-rw-r--r-- | toolkit/source/awt/vclxaccessiblecomponent.cxx | 57 | ||||
-rw-r--r-- | toolkit/source/awt/vclxmenu.cxx | 36 | ||||
-rw-r--r-- | toolkit/source/awt/vclxspinbutton.cxx | 4 | ||||
-rw-r--r-- | toolkit/source/awt/vclxtabpagecontainer.cxx | 2 | ||||
-rw-r--r-- | toolkit/source/awt/vclxtoolkit.cxx | 34 | ||||
-rw-r--r-- | toolkit/source/awt/vclxwindow.cxx | 70 | ||||
-rw-r--r-- | toolkit/source/awt/vclxwindows.cxx | 45 |
9 files changed, 128 insertions, 126 deletions
diff --git a/toolkit/source/awt/animatedimagespeer.cxx b/toolkit/source/awt/animatedimagespeer.cxx index 3dae4a6bfad5..f0fd2cf0ec50 100644 --- a/toolkit/source/awt/animatedimagespeer.cxx +++ b/toolkit/source/awt/animatedimagespeer.cxx @@ -413,11 +413,9 @@ namespace toolkit void AnimatedImagesPeer::ProcessWindowEvent( const VclWindowEvent& i_windowEvent ) { - switch ( i_windowEvent.GetId() ) + if ( i_windowEvent.GetId() == VclEventId::WindowResize ) { - case VCLEVENT_WINDOW_RESIZE: lcl_updateImageList_nothrow( *m_xData ); - break; } AnimatedImagesPeer_Base::ProcessWindowEvent( i_windowEvent ); diff --git a/toolkit/source/awt/stylesettings.cxx b/toolkit/source/awt/stylesettings.cxx index 86ab25ce80bb..1ed728c4b485 100644 --- a/toolkit/source/awt/stylesettings.cxx +++ b/toolkit/source/awt/stylesettings.cxx @@ -62,7 +62,7 @@ namespace toolkit IMPL_LINK( WindowStyleSettings_Data, OnWindowEvent, VclWindowEvent&, rEvent, void ) { - if ( rEvent.GetId() != VCLEVENT_WINDOW_DATACHANGED ) + if ( rEvent.GetId() != VclEventId::WindowDataChanged ) return; const DataChangedEvent* pDataChangedEvent = static_cast< const DataChangedEvent* >( rEvent.GetData() ); if ( !pDataChangedEvent || ( pDataChangedEvent->GetType() != DataChangedEventType::SETTINGS ) ) diff --git a/toolkit/source/awt/vclxaccessiblecomponent.cxx b/toolkit/source/awt/vclxaccessiblecomponent.cxx index a02db4444e1e..9b6480039d92 100644 --- a/toolkit/source/awt/vclxaccessiblecomponent.cxx +++ b/toolkit/source/awt/vclxaccessiblecomponent.cxx @@ -113,14 +113,14 @@ uno::Sequence< OUString > VCLXAccessibleComponent::getSupportedServiceNames() th IMPL_LINK( VCLXAccessibleComponent, WindowEventListener, VclWindowEvent&, rEvent, void ) { - /* Ignore VCLEVENT_WINDOW_ENDPOPUPMODE, because the UNO accessibility wrapper + /* Ignore VclEventId::WindowEndPopupMode, because the UNO accessibility wrapper * might have been destroyed by the previous VCLEventListener (if no AT tool * is running), e.g. sub-toolbars in impress. */ - if ( m_xVCLXWindow.is() /* #122218# */ && (rEvent.GetId() != VCLEVENT_WINDOW_ENDPOPUPMODE) ) + if ( m_xVCLXWindow.is() /* #122218# */ && (rEvent.GetId() != VclEventId::WindowEndPopupMode) ) { DBG_ASSERT( rEvent.GetWindow(), "Window???" ); - if( !rEvent.GetWindow()->IsAccessibilityEventsSuppressed() || ( rEvent.GetId() == VCLEVENT_OBJECT_DYING ) ) + if( !rEvent.GetWindow()->IsAccessibilityEventsSuppressed() || ( rEvent.GetId() == VclEventId::ObjectDying ) ) { ProcessWindowEvent( rEvent ); } @@ -150,7 +150,7 @@ uno::Reference< accessibility::XAccessible > VCLXAccessibleComponent::GetChildAc // MT: Change this later, normally a show/hide event shouldn't have the vcl::Window* in pData. vcl::Window* pChildWindow = static_cast<vcl::Window *>(rVclWindowEvent.GetData()); if( pChildWindow && GetWindow() == pChildWindow->GetAccessibleParentWindow() ) - return pChildWindow->GetAccessible( rVclWindowEvent.GetId() == VCLEVENT_WINDOW_SHOW ); + return pChildWindow->GetAccessible( rVclWindowEvent.GetId() == VclEventId::WindowShow ); else return uno::Reference< accessibility::XAccessible > (); } @@ -162,7 +162,7 @@ void VCLXAccessibleComponent::ProcessWindowChildEvent( const VclWindowEvent& rVc switch ( rVclWindowEvent.GetId() ) { - case VCLEVENT_WINDOW_SHOW: // send create on show for direct accessible children + case VclEventId::WindowShow: // send create on show for direct accessible children { xAcc = GetChildAccessible( rVclWindowEvent ); if( xAcc.is() ) @@ -172,7 +172,7 @@ void VCLXAccessibleComponent::ProcessWindowChildEvent( const VclWindowEvent& rVc } } break; - case VCLEVENT_WINDOW_HIDE: // send destroy on hide for direct accessible children + case VclEventId::WindowHide: // send destroy on hide for direct accessible children { xAcc = GetChildAccessible( rVclWindowEvent ); if( xAcc.is() ) @@ -182,6 +182,7 @@ void VCLXAccessibleComponent::ProcessWindowChildEvent( const VclWindowEvent& rVc } } break; + default: break; } } @@ -194,16 +195,16 @@ void VCLXAccessibleComponent::ProcessWindowEvent( const VclWindowEvent& rVclWind switch ( rVclWindowEvent.GetId() ) { - case VCLEVENT_OBJECT_DYING: + case VclEventId::ObjectDying: { DisconnectEvents(); m_xVCLXWindow.clear(); } break; - case VCLEVENT_WINDOW_CHILDDESTROYED: + case VclEventId::WindowChildDestroyed: { vcl::Window* pWindow = static_cast<vcl::Window*>(rVclWindowEvent.GetData()); - DBG_ASSERT( pWindow, "VCLEVENT_WINDOW_CHILDDESTROYED - Window=?" ); + DBG_ASSERT( pWindow, "VclEventId::WindowChildDestroyed - Window=?" ); if ( pWindow->GetAccessible( false ).is() ) { aOldValue <<= pWindow->GetAccessible( false ); @@ -211,7 +212,7 @@ void VCLXAccessibleComponent::ProcessWindowEvent( const VclWindowEvent& rVclWind } } break; - case VCLEVENT_WINDOW_ACTIVATE: + case VclEventId::WindowActivate: { // avoid notification if a child frame is already active // only one frame may be active at a given time @@ -225,7 +226,7 @@ void VCLXAccessibleComponent::ProcessWindowEvent( const VclWindowEvent& rVclWind } } break; - case VCLEVENT_WINDOW_DEACTIVATE: + case VclEventId::WindowDeactivate: { if ( getAccessibleRole() == accessibility::AccessibleRole::FRAME || getAccessibleRole() == accessibility::AccessibleRole::ALERT || @@ -236,11 +237,11 @@ void VCLXAccessibleComponent::ProcessWindowEvent( const VclWindowEvent& rVclWind } } break; - case VCLEVENT_WINDOW_GETFOCUS: - case VCLEVENT_CONTROL_GETFOCUS: + case VclEventId::WindowGetFocus: + case VclEventId::ControlGetFocus: { - if( (pAccWindow->IsCompoundControl() && rVclWindowEvent.GetId() == VCLEVENT_CONTROL_GETFOCUS) || - (!pAccWindow->IsCompoundControl() && rVclWindowEvent.GetId() == VCLEVENT_WINDOW_GETFOCUS) ) + if( (pAccWindow->IsCompoundControl() && rVclWindowEvent.GetId() == VclEventId::ControlGetFocus) || + (!pAccWindow->IsCompoundControl() && rVclWindowEvent.GetId() == VclEventId::WindowGetFocus) ) { // if multiple listeners were registered it is possible that the // focus was changed during event processing (eg SfxTopWindow ) @@ -254,18 +255,18 @@ void VCLXAccessibleComponent::ProcessWindowEvent( const VclWindowEvent& rVclWind } } break; - case VCLEVENT_WINDOW_LOSEFOCUS: - case VCLEVENT_CONTROL_LOSEFOCUS: + case VclEventId::WindowLoseFocus: + case VclEventId::ControlLoseFocus: { - if( (pAccWindow->IsCompoundControl() && rVclWindowEvent.GetId() == VCLEVENT_CONTROL_LOSEFOCUS) || - (!pAccWindow->IsCompoundControl() && rVclWindowEvent.GetId() == VCLEVENT_WINDOW_LOSEFOCUS) ) + if( (pAccWindow->IsCompoundControl() && rVclWindowEvent.GetId() == VclEventId::ControlLoseFocus) || + (!pAccWindow->IsCompoundControl() && rVclWindowEvent.GetId() == VclEventId::WindowLoseFocus) ) { aOldValue <<= accessibility::AccessibleStateType::FOCUSED; NotifyAccessibleEvent( accessibility::AccessibleEventId::STATE_CHANGED, aOldValue, aNewValue ); } } break; - case VCLEVENT_WINDOW_FRAMETITLECHANGED: + case VclEventId::WindowFrameTitleChanged: { OUString aOldName( *static_cast<OUString*>(rVclWindowEvent.GetData()) ); OUString aNewName( getAccessibleName() ); @@ -274,7 +275,7 @@ void VCLXAccessibleComponent::ProcessWindowEvent( const VclWindowEvent& rVclWind NotifyAccessibleEvent( accessibility::AccessibleEventId::NAME_CHANGED, aOldValue, aNewValue ); } break; - case VCLEVENT_WINDOW_ENABLED: + case VclEventId::WindowEnabled: { aNewValue <<= accessibility::AccessibleStateType::ENABLED; NotifyAccessibleEvent( accessibility::AccessibleEventId::STATE_CHANGED, aOldValue, aNewValue ); @@ -282,7 +283,7 @@ void VCLXAccessibleComponent::ProcessWindowEvent( const VclWindowEvent& rVclWind NotifyAccessibleEvent( accessibility::AccessibleEventId::STATE_CHANGED, aOldValue, aNewValue ); } break; - case VCLEVENT_WINDOW_DISABLED: + case VclEventId::WindowDisabled: { aOldValue <<= accessibility::AccessibleStateType::SENSITIVE; NotifyAccessibleEvent( accessibility::AccessibleEventId::STATE_CHANGED, aOldValue, aNewValue ); @@ -291,13 +292,13 @@ void VCLXAccessibleComponent::ProcessWindowEvent( const VclWindowEvent& rVclWind NotifyAccessibleEvent( accessibility::AccessibleEventId::STATE_CHANGED, aOldValue, aNewValue ); } break; - case VCLEVENT_WINDOW_MOVE: - case VCLEVENT_WINDOW_RESIZE: + case VclEventId::WindowMove: + case VclEventId::WindowResize: { NotifyAccessibleEvent( accessibility::AccessibleEventId::BOUNDRECT_CHANGED, aOldValue, aNewValue ); } break; - case VCLEVENT_WINDOW_MENUBARADDED: + case VclEventId::WindowMenubarAdded: { MenuBar* pMenuBar = static_cast<MenuBar*>(rVclWindowEvent.GetData()); if ( pMenuBar ) @@ -311,7 +312,7 @@ void VCLXAccessibleComponent::ProcessWindowEvent( const VclWindowEvent& rVclWind } } break; - case VCLEVENT_WINDOW_MENUBARREMOVED: + case VclEventId::WindowMenubarRemoved: { MenuBar* pMenuBar = static_cast<MenuBar*>(rVclWindowEvent.GetData()); if ( pMenuBar ) @@ -325,13 +326,13 @@ void VCLXAccessibleComponent::ProcessWindowEvent( const VclWindowEvent& rVclWind } } break; - case VCLEVENT_WINDOW_MINIMIZE: + case VclEventId::WindowMinimize: { aNewValue <<= accessibility::AccessibleStateType::ICONIFIED; NotifyAccessibleEvent( accessibility::AccessibleEventId::STATE_CHANGED, aOldValue, aNewValue ); } break; - case VCLEVENT_WINDOW_NORMALIZE: + case VclEventId::WindowNormalize: { aOldValue <<= accessibility::AccessibleStateType::ICONIFIED; NotifyAccessibleEvent( accessibility::AccessibleEventId::STATE_CHANGED, aOldValue, aNewValue ); diff --git a/toolkit/source/awt/vclxmenu.cxx b/toolkit/source/awt/vclxmenu.cxx index 45252bc718e4..aafa5b9c7529 100644 --- a/toolkit/source/awt/vclxmenu.cxx +++ b/toolkit/source/awt/vclxmenu.cxx @@ -87,7 +87,7 @@ IMPL_LINK( VCLXMenu, MenuEventListener, VclMenuEvent&, rMenuEvent, void ) { switch ( rMenuEvent.GetId() ) { - case VCLEVENT_MENU_SELECT: + case VclEventId::MenuSelect: { if ( maMenuListeners.getLength() ) { @@ -98,12 +98,12 @@ IMPL_LINK( VCLXMenu, MenuEventListener, VclMenuEvent&, rMenuEvent, void ) } } break; - case VCLEVENT_OBJECT_DYING: + case VclEventId::ObjectDying: { mpMenu = nullptr; } break; - case VCLEVENT_MENU_HIGHLIGHT: + case VclEventId::MenuHighlight: { if ( maMenuListeners.getLength() ) { @@ -114,7 +114,7 @@ IMPL_LINK( VCLXMenu, MenuEventListener, VclMenuEvent&, rMenuEvent, void ) } } break; - case VCLEVENT_MENU_ACTIVATE: + case VclEventId::MenuActivate: { if ( maMenuListeners.getLength() ) { @@ -125,7 +125,7 @@ IMPL_LINK( VCLXMenu, MenuEventListener, VclMenuEvent&, rMenuEvent, void ) } } break; - case VCLEVENT_MENU_DEACTIVATE: + case VclEventId::MenuDeactivate: { if ( maMenuListeners.getLength() ) { @@ -138,19 +138,19 @@ IMPL_LINK( VCLXMenu, MenuEventListener, VclMenuEvent&, rMenuEvent, void ) break; // ignore accessibility events - case VCLEVENT_MENU_ENABLE: - case VCLEVENT_MENU_INSERTITEM: - case VCLEVENT_MENU_REMOVEITEM: - case VCLEVENT_MENU_SUBMENUACTIVATE: - case VCLEVENT_MENU_SUBMENUDEACTIVATE: - case VCLEVENT_MENU_SUBMENUCHANGED: - case VCLEVENT_MENU_DEHIGHLIGHT: - case VCLEVENT_MENU_DISABLE: - case VCLEVENT_MENU_ITEMTEXTCHANGED: - case VCLEVENT_MENU_ITEMCHECKED: - case VCLEVENT_MENU_ITEMUNCHECKED: - case VCLEVENT_MENU_SHOW: - case VCLEVENT_MENU_HIDE: + case VclEventId::MenuEnable: + case VclEventId::MenuInsertItem: + case VclEventId::MenuRemoveItem: + case VclEventId::MenuSubmenuActivate: + case VclEventId::MenuSubmenuDeactivate: + case VclEventId::MenuSubmenuChanged: + case VclEventId::MenuDehighlight: + case VclEventId::MenuDisable: + case VclEventId::MenuItemTextChanged: + case VclEventId::MenuItemChecked: + case VclEventId::MenuItemUnchecked: + case VclEventId::MenuShow: + case VclEventId::MenuHide: break; default: OSL_FAIL( "MenuEventListener - Unknown event!" ); diff --git a/toolkit/source/awt/vclxspinbutton.cxx b/toolkit/source/awt/vclxspinbutton.cxx index 2488359b13b7..30e44899f8f6 100644 --- a/toolkit/source/awt/vclxspinbutton.cxx +++ b/toolkit/source/awt/vclxspinbutton.cxx @@ -205,8 +205,8 @@ namespace toolkit switch ( _rVclWindowEvent.GetId() ) { - case VCLEVENT_SPINBUTTON_UP: - case VCLEVENT_SPINBUTTON_DOWN: + case VclEventId::SpinbuttonUp: + case VclEventId::SpinbuttonDown: if ( maAdjustmentListeners.getLength() ) { AdjustmentEvent aEvent; diff --git a/toolkit/source/awt/vclxtabpagecontainer.cxx b/toolkit/source/awt/vclxtabpagecontainer.cxx index 7e8b451dd7d8..6219648d513c 100644 --- a/toolkit/source/awt/vclxtabpagecontainer.cxx +++ b/toolkit/source/awt/vclxtabpagecontainer.cxx @@ -157,7 +157,7 @@ void VCLXTabPageContainer::ProcessWindowEvent( const VclWindowEvent& _rVclWindow { switch ( _rVclWindowEvent.GetId() ) { - case VCLEVENT_TABPAGE_ACTIVATE: + case VclEventId::TabpageActivate: { sal_uLong page = reinterpret_cast<sal_uLong>(_rVclWindowEvent.GetData()); awt::tab::TabPageActivatedEvent aEvent(nullptr,page); diff --git a/toolkit/source/awt/vclxtoolkit.cxx b/toolkit/source/awt/vclxtoolkit.cxx index 1695a8750f28..b5dbe26218ae 100644 --- a/toolkit/source/awt/vclxtoolkit.cxx +++ b/toolkit/source/awt/vclxtoolkit.cxx @@ -1745,40 +1745,41 @@ IMPL_LINK(VCLXToolkit, eventListenerHandler, ::VclSimpleEvent&, rEvent, void) { switch (rEvent.GetId()) { - case VCLEVENT_WINDOW_SHOW: + case VclEventId::WindowShow: callTopWindowListeners( &rEvent, &css::awt::XTopWindowListener::windowOpened); break; - case VCLEVENT_WINDOW_HIDE: + case VclEventId::WindowHide: callTopWindowListeners( &rEvent, &css::awt::XTopWindowListener::windowClosed); break; - case VCLEVENT_WINDOW_ACTIVATE: + case VclEventId::WindowActivate: callTopWindowListeners( &rEvent, &css::awt::XTopWindowListener::windowActivated); break; - case VCLEVENT_WINDOW_DEACTIVATE: + case VclEventId::WindowDeactivate: callTopWindowListeners( &rEvent, &css::awt::XTopWindowListener::windowDeactivated); break; - case VCLEVENT_WINDOW_CLOSE: + case VclEventId::WindowClose: callTopWindowListeners( &rEvent, &css::awt::XTopWindowListener::windowClosing); break; - case VCLEVENT_WINDOW_GETFOCUS: + case VclEventId::WindowGetFocus: callFocusListeners(&rEvent, true); break; - case VCLEVENT_WINDOW_LOSEFOCUS: + case VclEventId::WindowLoseFocus: callFocusListeners(&rEvent, false); break; - case VCLEVENT_WINDOW_MINIMIZE: + case VclEventId::WindowMinimize: callTopWindowListeners( &rEvent, &css::awt::XTopWindowListener::windowMinimized); break; - case VCLEVENT_WINDOW_NORMALIZE: + case VclEventId::WindowNormalize: callTopWindowListeners( &rEvent, &css::awt::XTopWindowListener::windowNormalized); break; + default: break; } } @@ -1786,10 +1787,11 @@ IMPL_LINK(VCLXToolkit, keyListenerHandler, ::VclWindowEvent&, rEvent, bool) { switch (rEvent.GetId()) { - case VCLEVENT_WINDOW_KEYINPUT: + case VclEventId::WindowKeyInput: return callKeyHandlers(&rEvent, true); - case VCLEVENT_WINDOW_KEYUP: + case VclEventId::WindowKeyUp: return callKeyHandlers(&rEvent, false); + default: break; } return false; } @@ -1981,7 +1983,7 @@ void SAL_CALL VCLXToolkit::keyPress( const css::awt::KeyEvent & aKeyEvent ) throw css::uno::RuntimeException( "invalid event source" ); ::KeyEvent aVCLKeyEvent = VCLUnoHelper::createVCLKeyEvent( aKeyEvent ); - ::Application::PostKeyEvent( VCLEVENT_WINDOW_KEYINPUT, pWindow, &aVCLKeyEvent ); + ::Application::PostKeyEvent( VclEventId::WindowKeyInput, pWindow, &aVCLKeyEvent ); } void SAL_CALL VCLXToolkit::keyRelease( const css::awt::KeyEvent & aKeyEvent ) @@ -1996,7 +1998,7 @@ void SAL_CALL VCLXToolkit::keyRelease( const css::awt::KeyEvent & aKeyEvent ) throw css::uno::RuntimeException( "invalid event source" ); ::KeyEvent aVCLKeyEvent = VCLUnoHelper::createVCLKeyEvent( aKeyEvent ); - ::Application::PostKeyEvent( VCLEVENT_WINDOW_KEYUP, pWindow, &aVCLKeyEvent ); + ::Application::PostKeyEvent( VclEventId::WindowKeyUp, pWindow, &aVCLKeyEvent ); } @@ -2012,7 +2014,7 @@ void SAL_CALL VCLXToolkit::mousePress( const css::awt::MouseEvent & aMouseEvent throw css::uno::RuntimeException( "invalid event source" ); ::MouseEvent aVCLMouseEvent = VCLUnoHelper::createVCLMouseEvent( aMouseEvent ); - ::Application::PostMouseEvent( VCLEVENT_WINDOW_MOUSEBUTTONDOWN, pWindow, &aVCLMouseEvent ); + ::Application::PostMouseEvent( VclEventId::WindowMouseButtonDown, pWindow, &aVCLMouseEvent ); } void SAL_CALL VCLXToolkit::mouseRelease( const css::awt::MouseEvent & aMouseEvent ) @@ -2027,7 +2029,7 @@ void SAL_CALL VCLXToolkit::mouseRelease( const css::awt::MouseEvent & aMouseEven throw css::uno::RuntimeException( "invalid event source" ); ::MouseEvent aVCLMouseEvent = VCLUnoHelper::createVCLMouseEvent( aMouseEvent ); - ::Application::PostMouseEvent( VCLEVENT_WINDOW_MOUSEBUTTONUP, pWindow, &aVCLMouseEvent ); + ::Application::PostMouseEvent( VclEventId::WindowMouseButtonUp, pWindow, &aVCLMouseEvent ); } void SAL_CALL VCLXToolkit::mouseMove( const css::awt::MouseEvent & aMouseEvent ) @@ -2042,7 +2044,7 @@ void SAL_CALL VCLXToolkit::mouseMove( const css::awt::MouseEvent & aMouseEvent ) throw css::uno::RuntimeException( "invalid event source" ); ::MouseEvent aVCLMouseEvent = VCLUnoHelper::createVCLMouseEvent( aMouseEvent ); - ::Application::PostMouseEvent( VCLEVENT_WINDOW_MOUSEMOVE, pWindow, &aVCLMouseEvent ); + ::Application::PostMouseEvent( VclEventId::WindowMouseMove, pWindow, &aVCLMouseEvent ); } diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx index e4a449925886..f2aa9f04d723 100644 --- a/toolkit/source/awt/vclxwindow.cxx +++ b/toolkit/source/awt/vclxwindow.cxx @@ -438,19 +438,19 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) switch ( rVclWindowEvent.GetId() ) { - case VCLEVENT_WINDOW_ENABLED: - case VCLEVENT_WINDOW_DISABLED: + case VclEventId::WindowEnabled: + case VclEventId::WindowDisabled: { Callback aCallback = CallWindow2Listener( mpImpl->getWindow2Listeners(), - ( VCLEVENT_WINDOW_ENABLED == rVclWindowEvent.GetId() ), + ( VclEventId::WindowEnabled == rVclWindowEvent.GetId() ), EventObject( *this ) ); ImplExecuteAsyncWithoutSolarLock( aCallback ); } break; - case VCLEVENT_WINDOW_PAINT: + case VclEventId::WindowPaint: { if ( mpImpl->getPaintListeners().getLength() ) { @@ -462,7 +462,7 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) } } break; - case VCLEVENT_WINDOW_MOVE: + case VclEventId::WindowMove: { if ( mpImpl->getWindowListeners().getLength() ) { @@ -473,7 +473,7 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) } } break; - case VCLEVENT_WINDOW_RESIZE: + case VclEventId::WindowResize: { if ( mpImpl->getWindowListeners().getLength() ) { @@ -484,7 +484,7 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) } } break; - case VCLEVENT_WINDOW_SHOW: + case VclEventId::WindowShow: { if ( mpImpl->getWindowListeners().getLength() ) { @@ -503,7 +503,7 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) } } break; - case VCLEVENT_WINDOW_HIDE: + case VclEventId::WindowHide: { if ( mpImpl->getWindowListeners().getLength() ) { @@ -522,7 +522,7 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) } } break; - case VCLEVENT_WINDOW_ACTIVATE: + case VclEventId::WindowActivate: { if ( mpImpl->getTopWindowListeners().getLength() ) { @@ -532,7 +532,7 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) } } break; - case VCLEVENT_WINDOW_DEACTIVATE: + case VclEventId::WindowDeactivate: { if ( mpImpl->getTopWindowListeners().getLength() ) { @@ -542,7 +542,7 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) } } break; - case VCLEVENT_WINDOW_CLOSE: + case VclEventId::WindowClose: { if ( mpImpl->getDockableWindowListeners().getLength() ) { @@ -558,14 +558,14 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) } } break; - case VCLEVENT_CONTROL_GETFOCUS: - case VCLEVENT_WINDOW_GETFOCUS: + case VclEventId::ControlGetFocus: + case VclEventId::WindowGetFocus: { if ( ( rVclWindowEvent.GetWindow()->IsCompoundControl() - && rVclWindowEvent.GetId() == VCLEVENT_CONTROL_GETFOCUS + && rVclWindowEvent.GetId() == VclEventId::ControlGetFocus ) || ( !rVclWindowEvent.GetWindow()->IsCompoundControl() - && rVclWindowEvent.GetId() == VCLEVENT_WINDOW_GETFOCUS + && rVclWindowEvent.GetId() == VclEventId::WindowGetFocus ) ) { @@ -580,14 +580,14 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) } } break; - case VCLEVENT_CONTROL_LOSEFOCUS: - case VCLEVENT_WINDOW_LOSEFOCUS: + case VclEventId::ControlLoseFocus: + case VclEventId::WindowLoseFocus: { if ( ( rVclWindowEvent.GetWindow()->IsCompoundControl() - && rVclWindowEvent.GetId() == VCLEVENT_CONTROL_LOSEFOCUS + && rVclWindowEvent.GetId() == VclEventId::ControlLoseFocus ) || ( !rVclWindowEvent.GetWindow()->IsCompoundControl() - && rVclWindowEvent.GetId() == VCLEVENT_WINDOW_LOSEFOCUS + && rVclWindowEvent.GetId() == VclEventId::WindowLoseFocus ) ) { @@ -616,7 +616,7 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) } } break; - case VCLEVENT_WINDOW_MINIMIZE: + case VclEventId::WindowMinimize: { if ( mpImpl->getTopWindowListeners().getLength() ) { @@ -626,7 +626,7 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) } } break; - case VCLEVENT_WINDOW_NORMALIZE: + case VclEventId::WindowNormalize: { if ( mpImpl->getTopWindowListeners().getLength() ) { @@ -636,7 +636,7 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) } } break; - case VCLEVENT_WINDOW_KEYINPUT: + case VclEventId::WindowKeyInput: { if ( mpImpl->getKeyListeners().getLength() ) { @@ -647,7 +647,7 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) } } break; - case VCLEVENT_WINDOW_KEYUP: + case VclEventId::WindowKeyUp: { if ( mpImpl->getKeyListeners().getLength() ) { @@ -658,7 +658,7 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) } } break; - case VCLEVENT_WINDOW_COMMAND: + case VclEventId::WindowCommand: { CommandEvent* pCmdEvt = static_cast<CommandEvent*>(rVclWindowEvent.GetData()); if ( mpImpl->getMouseListeners().getLength() && ( pCmdEvt->GetCommand() == CommandEventId::ContextMenu ) ) @@ -684,7 +684,7 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) } } break; - case VCLEVENT_WINDOW_MOUSEMOVE: + case VclEventId::WindowMouseMove: { MouseEvent* pMouseEvt = static_cast<MouseEvent*>(rVclWindowEvent.GetData()); if ( mpImpl->getMouseListeners().getLength() && ( pMouseEvt->IsEnterWindow() || pMouseEvt->IsLeaveWindow() ) ) @@ -711,7 +711,7 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) } } break; - case VCLEVENT_WINDOW_MOUSEBUTTONDOWN: + case VclEventId::WindowMouseButtonDown: { if ( mpImpl->getMouseListeners().getLength() ) { @@ -722,7 +722,7 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) } } break; - case VCLEVENT_WINDOW_MOUSEBUTTONUP: + case VclEventId::WindowMouseButtonUp: { if ( mpImpl->getMouseListeners().getLength() ) { @@ -734,7 +734,7 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) } } break; - case VCLEVENT_WINDOW_STARTDOCKING: + case VclEventId::WindowStartDocking: { if ( mpImpl->getDockableWindowListeners().getLength() ) { @@ -755,7 +755,7 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) } } break; - case VCLEVENT_WINDOW_DOCKING: + case VclEventId::WindowDocking: { if ( mpImpl->getDockableWindowListeners().getLength() ) { @@ -786,7 +786,7 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) } } break; - case VCLEVENT_WINDOW_ENDDOCKING: + case VclEventId::WindowEndDocking: { if ( mpImpl->getDockableWindowListeners().getLength() ) { @@ -804,7 +804,7 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) } } break; - case VCLEVENT_WINDOW_PREPARETOGGLEFLOATING: + case VclEventId::WindowPrepareToggleFloating: { if ( mpImpl->getDockableWindowListeners().getLength() ) { @@ -824,7 +824,7 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) } } break; - case VCLEVENT_WINDOW_TOGGLEFLOATING: + case VclEventId::WindowToggleFloating: { if ( mpImpl->getDockableWindowListeners().getLength() ) { @@ -834,7 +834,7 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) } } break; - case VCLEVENT_WINDOW_ENDPOPUPMODE: + case VclEventId::WindowEndPopupMode: { if ( mpImpl->getDockableWindowListeners().getLength() ) { @@ -852,7 +852,7 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) } } break; - + default: break; } } @@ -935,7 +935,7 @@ void VCLXWindow::dispose( ) throw(css::uno::RuntimeException, std::exception) // #i14103# dispose the accessible context after the window has been destroyed, // otherwise the old value in the child event fired in VCLXAccessibleComponent::ProcessWindowEvent() - // for VCLEVENT_WINDOW_CHILDDESTROYED contains a reference to an already disposed accessible object + // for VclEventId::WindowChildDestroyed contains a reference to an already disposed accessible object try { css::uno::Reference< css::lang::XComponent > xComponent( mpImpl->mxAccessibleContext, css::uno::UNO_QUERY ); diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx index 4c3b6041c9c7..1acff4ecfd33 100644 --- a/toolkit/source/awt/vclxwindows.cxx +++ b/toolkit/source/awt/vclxwindows.cxx @@ -572,7 +572,7 @@ void VCLXButton::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) { switch ( rVclWindowEvent.GetId() ) { - case VCLEVENT_BUTTON_CLICK: + case VclEventId::ButtonClick: { css::uno::Reference< css::awt::XWindow > xKeepAlive( this ); // since we call listeners below, there is a potential that we will be destroyed @@ -593,7 +593,7 @@ void VCLXButton::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) } break; - case VCLEVENT_PUSHBUTTON_TOGGLE: + case VclEventId::PushbuttonToggle: { PushButton& rButton = dynamic_cast< PushButton& >( *rVclWindowEvent.GetWindow() ); @@ -1011,7 +1011,7 @@ void VCLXCheckBox::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) { switch ( rVclWindowEvent.GetId() ) { - case VCLEVENT_CHECKBOX_TOGGLE: + case VclEventId::CheckboxToggle: { css::uno::Reference< css::awt::XWindow > xKeepAlive( this ); // since we call listeners below, there is a potential that we will be destroyed @@ -1293,7 +1293,7 @@ void VCLXRadioButton::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent switch ( rVclWindowEvent.GetId() ) { - case VCLEVENT_BUTTON_CLICK: + case VclEventId::ButtonClick: if ( !IsSynthesizingVCLEvent() && maActionListeners.getLength() ) { css::awt::ActionEvent aEvent; @@ -1304,7 +1304,7 @@ void VCLXRadioButton::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ImplClickedOrToggled( false ); break; - case VCLEVENT_RADIOBUTTON_TOGGLE: + case VclEventId::RadiobuttonToggle: ImplClickedOrToggled( true ); break; @@ -1426,10 +1426,10 @@ void VCLXSpinField::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) { switch ( rVclWindowEvent.GetId() ) { - case VCLEVENT_SPINFIELD_UP: - case VCLEVENT_SPINFIELD_DOWN: - case VCLEVENT_SPINFIELD_FIRST: - case VCLEVENT_SPINFIELD_LAST: + case VclEventId::SpinfieldUp: + case VclEventId::SpinfieldDown: + case VclEventId::SpinfieldFirst: + case VclEventId::SpinfieldLast: { css::uno::Reference< css::awt::XWindow > xKeepAlive( this ); // since we call listeners below, there is a potential that we will be destroyed @@ -1442,14 +1442,15 @@ void VCLXSpinField::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) aEvent.Source = static_cast<cppu::OWeakObject*>(this); switch ( rVclWindowEvent.GetId() ) { - case VCLEVENT_SPINFIELD_UP: maSpinListeners.up( aEvent ); + case VclEventId::SpinfieldUp: maSpinListeners.up( aEvent ); break; - case VCLEVENT_SPINFIELD_DOWN: maSpinListeners.down( aEvent ); + case VclEventId::SpinfieldDown: maSpinListeners.down( aEvent ); break; - case VCLEVENT_SPINFIELD_FIRST: maSpinListeners.first( aEvent ); + case VclEventId::SpinfieldFirst: maSpinListeners.first( aEvent ); break; - case VCLEVENT_SPINFIELD_LAST: maSpinListeners.last( aEvent ); + case VclEventId::SpinfieldLast: maSpinListeners.last( aEvent ); break; + default: break; } } @@ -1783,7 +1784,7 @@ void VCLXListBox::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) switch ( rVclWindowEvent.GetId() ) { - case VCLEVENT_LISTBOX_SELECT: + case VclEventId::ListboxSelect: { VclPtr< ListBox > pListBox = GetAs< ListBox >(); if( pListBox ) @@ -1806,7 +1807,7 @@ void VCLXListBox::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) } break; - case VCLEVENT_LISTBOX_DOUBLECLICK: + case VclEventId::ListboxDoubleClick: if ( GetWindow() && maActionListeners.getLength() ) { css::awt::ActionEvent aEvent; @@ -2676,14 +2677,14 @@ void VCLXMultiPage::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) css::uno::Reference< css::awt::XWindow > xKeepAlive( this ); switch ( rVclWindowEvent.GetId() ) { - case VCLEVENT_TABPAGE_DEACTIVATE: + case VclEventId::TabpageDeactivate: { sal_uLong nPageID = reinterpret_cast<sal_uLong>( rVclWindowEvent.GetData() ); maTabListeners.deactivated( nPageID ); break; } - case VCLEVENT_TABPAGE_ACTIVATE: + case VclEventId::TabpageActivate: { sal_uLong nPageID = reinterpret_cast<sal_uLong>( rVclWindowEvent.GetData() ); maTabListeners.activated( nPageID ); @@ -2865,7 +2866,7 @@ void VCLXFixedHyperlink::ProcessWindowEvent( const VclWindowEvent& rVclWindowEve { switch ( rVclWindowEvent.GetId() ) { - case VCLEVENT_BUTTON_CLICK: + case VclEventId::ButtonClick: { if ( maActionListeners.getLength() ) { @@ -3674,7 +3675,7 @@ void VCLXScrollBar::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) { switch ( rVclWindowEvent.GetId() ) { - case VCLEVENT_SCROLLBAR_SCROLL: + case VclEventId::ScrollbarScroll: { css::uno::Reference< css::awt::XWindow > xKeepAlive( this ); // since we call listeners below, there is a potential that we will be destroyed @@ -4085,7 +4086,7 @@ void VCLXEdit::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) { switch ( rVclWindowEvent.GetId() ) { - case VCLEVENT_EDIT_MODIFY: + case VclEventId::EditModify: { css::uno::Reference< css::awt::XWindow > xKeepAlive( this ); // since we call listeners below, there is a potential that we will be destroyed @@ -4404,7 +4405,7 @@ void VCLXComboBox::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) switch ( rVclWindowEvent.GetId() ) { - case VCLEVENT_COMBOBOX_SELECT: + case VclEventId::ComboboxSelect: if ( maItemListeners.getLength() ) { VclPtr< ComboBox > pComboBox = GetAs< ComboBox >(); @@ -4425,7 +4426,7 @@ void VCLXComboBox::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) } break; - case VCLEVENT_COMBOBOX_DOUBLECLICK: + case VclEventId::ComboboxDoubleClick: if ( maActionListeners.getLength() ) { css::awt::ActionEvent aEvent; |