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 /sfx2 | |
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 'sfx2')
-rw-r--r-- | sfx2/source/notebookbar/PriorityHBox.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/sidebar/FocusManager.cxx | 12 | ||||
-rw-r--r-- | sfx2/source/sidebar/SidebarController.cxx | 18 | ||||
-rw-r--r-- | sfx2/source/toolbox/imgmgr.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/toolbox/tbxitem.cxx | 4 |
5 files changed, 21 insertions, 19 deletions
diff --git a/sfx2/source/notebookbar/PriorityHBox.cxx b/sfx2/source/notebookbar/PriorityHBox.cxx index fd8243f3f4ea..13ff34fd983a 100644 --- a/sfx2/source/notebookbar/PriorityHBox.cxx +++ b/sfx2/source/notebookbar/PriorityHBox.cxx @@ -141,7 +141,7 @@ private: IMPL_LINK( PriorityHBox, WindowEventListener, VclWindowEvent&, rEvent, void ) { - if (rEvent.GetId() == VCLEVENT_WINDOW_RESIZE) + if (rEvent.GetId() == VclEventId::WindowResize) { vcl::Window* pEventWindow = rEvent.GetWindow(); diff --git a/sfx2/source/sidebar/FocusManager.cxx b/sfx2/source/sidebar/FocusManager.cxx index 2b02b96f6fef..8603aec81a04 100644 --- a/sfx2/source/sidebar/FocusManager.cxx +++ b/sfx2/source/sidebar/FocusManager.cxx @@ -514,19 +514,19 @@ IMPL_LINK(FocusManager, WindowEventListener, VclWindowEvent&, rWindowEvent, void switch (rWindowEvent.GetId()) { - case VCLEVENT_WINDOW_KEYINPUT: + case VclEventId::WindowKeyInput: { KeyEvent* pKeyEvent = static_cast<KeyEvent*>(rWindowEvent.GetData()); HandleKeyEvent(pKeyEvent->GetKeyCode(), *pSource); break; } - case VCLEVENT_OBJECT_DYING: + case VclEventId::ObjectDying: RemoveWindow(*pSource); break; - case VCLEVENT_WINDOW_GETFOCUS: - case VCLEVENT_WINDOW_LOSEFOCUS: + case VclEventId::WindowGetFocus: + case VclEventId::WindowLoseFocus: pSource->Invalidate(); break; @@ -543,7 +543,7 @@ IMPL_LINK(FocusManager, ChildEventListener, VclWindowEvent&, rEvent, void) switch (rEvent.GetId()) { - case VCLEVENT_WINDOW_KEYINPUT: + case VclEventId::WindowKeyInput: { KeyEvent* pKeyEvent = static_cast<KeyEvent*>(rEvent.GetData()); @@ -587,7 +587,7 @@ IMPL_LINK(FocusManager, ChildEventListener, VclWindowEvent&, rEvent, void) return; } - case VCLEVENT_WINDOW_GETFOCUS: + case VclEventId::WindowGetFocus: // Keep track of focused controls in panel content. // Remember the first focused control. When it is later // focused again due to pressing the TAB key then the diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx index 98112eb0028e..cc11f07c3104 100644 --- a/sfx2/source/sidebar/SidebarController.cxx +++ b/sfx2/source/sidebar/SidebarController.cxx @@ -864,12 +864,12 @@ IMPL_LINK(SidebarController, WindowEventHandler, VclWindowEvent&, rEvent, void) { switch (rEvent.GetId()) { - case VCLEVENT_WINDOW_SHOW: - case VCLEVENT_WINDOW_RESIZE: + case VclEventId::WindowShow: + case VclEventId::WindowResize: NotifyResize(); break; - case VCLEVENT_WINDOW_DATACHANGED: + case VclEventId::WindowDataChanged: // Force an update of deck and tab bar to reflect // changes in theme (high contrast mode). Theme::HandleDataChange(); @@ -880,11 +880,11 @@ IMPL_LINK(SidebarController, WindowEventHandler, VclWindowEvent&, rEvent, void) maContextChangeUpdate.RequestCall(); break; - case SFX_HINT_DYING: + case VclEventId::ObjectDying: dispose(); break; - case VCLEVENT_WINDOW_PAINT: + case VclEventId::WindowPaint: OSL_TRACE("Paint"); break; @@ -896,20 +896,22 @@ IMPL_LINK(SidebarController, WindowEventHandler, VclWindowEvent&, rEvent, void) { switch (rEvent.GetId()) { - case VCLEVENT_WINDOW_MOUSEBUTTONDOWN: + case VclEventId::WindowMouseButtonDown: mnWidthOnSplitterButtonDown = mpParentWindow->GetSizePixel().Width(); break; - case VCLEVENT_WINDOW_MOUSEBUTTONUP: + case VclEventId::WindowMouseButtonUp: { ProcessNewWidth(mpParentWindow->GetSizePixel().Width()); mnWidthOnSplitterButtonDown = 0; break; } - case SFX_HINT_DYING: + case VclEventId::ObjectDying: dispose(); break; + + default: break; } } } diff --git a/sfx2/source/toolbox/imgmgr.cxx b/sfx2/source/toolbox/imgmgr.cxx index 79386a821884..8b3d40113711 100644 --- a/sfx2/source/toolbox/imgmgr.cxx +++ b/sfx2/source/toolbox/imgmgr.cxx @@ -204,14 +204,14 @@ IMPL_LINK( SfxImageManager_Impl, SettingsChanged_Impl, VclSimpleEvent&, rEvent, { switch (rEvent.GetId()) { - case VCLEVENT_OBJECT_DYING: + case VclEventId::ObjectDying: if (m_bAppEventListener) { Application::RemoveEventListener( LINK( this, SfxImageManager_Impl, SettingsChanged_Impl ) ); m_bAppEventListener = false; } break; - case VCLEVENT_APPLICATION_DATACHANGED: + case VclEventId::ApplicationDataChanged: // Check if toolbar button size have changed and we have to use system settings { sal_Int16 nSymbolsSize = m_aOpt.GetCurrentSymbolsSize(); diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx index a30596213cd2..be206c88de7c 100644 --- a/sfx2/source/toolbox/tbxitem.cxx +++ b/sfx2/source/toolbox/tbxitem.cxx @@ -194,8 +194,8 @@ struct SfxToolBoxControl_Impl IMPL_LINK( SfxToolBoxControl_Impl, WindowEventListener, VclWindowEvent&, rEvent, void ) { - if ( ( rEvent.GetId() == VCLEVENT_WINDOW_MOVE ) || - ( rEvent.GetId() == VCLEVENT_WINDOW_ACTIVATE )) + if ( ( rEvent.GetId() == VclEventId::WindowMove ) || + ( rEvent.GetId() == VclEventId::WindowActivate )) { vcl::Window* pWindow( rEvent.GetWindow() ); if (( pWindow == mpFloatingWindow ) && |