summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-12-06 13:26:09 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-12-07 07:10:39 +0000
commit2d48f5fc0a4f7b5b8c9d3a4f4cc85d5f3a7e5053 (patch)
treec2e18df7dd44255e98c91f242194fd9bb66f3f3e /sd
parented80d28d9f019a1afa2edd66e115eae26ea19963 (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 'sd')
-rw-r--r--sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx8
-rw-r--r--sd/source/ui/accessibility/AccessibleSlideSorterView.cxx8
-rw-r--r--sd/source/ui/annotations/annotationtag.cxx9
-rw-r--r--sd/source/ui/app/sdmod1.cxx2
-rw-r--r--sd/source/ui/dlg/LayerTabBar.cxx4
-rw-r--r--sd/source/ui/framework/factories/FullScreenPane.cxx6
-rw-r--r--sd/source/ui/sidebar/LayoutMenu.cxx4
-rw-r--r--sd/source/ui/slideshow/showwin.cxx2
-rw-r--r--sd/source/ui/slideshow/slideshowimpl.cxx2
-rw-r--r--sd/source/ui/slidesorter/controller/SlideSorterController.cxx12
-rw-r--r--sd/source/ui/slidesorter/inc/controller/SlsProperties.hxx2
-rw-r--r--sd/source/ui/view/FormShellManager.cxx8
-rw-r--r--sd/source/ui/view/ViewShellManager.cxx8
-rw-r--r--sd/source/ui/view/tabcontr.cxx4
14 files changed, 44 insertions, 35 deletions
diff --git a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
index d629c384a768..8b2197c65af0 100644
--- a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
+++ b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
@@ -165,7 +165,7 @@ IMPL_LINK(AccessibleDocumentViewBase, WindowChildEventListener,
// DBG_ASSERT( pVclEvent->GetWindow(), "Window???" );
switch (rEvent.GetId())
{
- case VCLEVENT_OBJECT_DYING:
+ case VclEventId::ObjectDying:
{
// Window is dying. Unregister from VCL Window.
// This is also attempted in the disposing() method.
@@ -179,7 +179,7 @@ IMPL_LINK(AccessibleDocumentViewBase, WindowChildEventListener,
}
break;
- case VCLEVENT_WINDOW_SHOW:
+ case VclEventId::WindowShow:
{
// A new window has been created. Is it an OLE object?
vcl::Window* pChildWindow = static_cast<vcl::Window*>(
@@ -193,7 +193,7 @@ IMPL_LINK(AccessibleDocumentViewBase, WindowChildEventListener,
}
break;
- case VCLEVENT_WINDOW_HIDE:
+ case VclEventId::WindowHide:
{
// A window has been destroyed. Has that been an OLE
// object?
@@ -207,6 +207,8 @@ IMPL_LINK(AccessibleDocumentViewBase, WindowChildEventListener,
}
}
break;
+
+ default: break;
}
}
diff --git a/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx b/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx
index 63436bec0352..3a1a49cf7c0a 100644
--- a/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx
+++ b/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx
@@ -894,13 +894,13 @@ IMPL_LINK(AccessibleSlideSorterView::Implementation, WindowEventListener, VclWin
{
switch (rEvent.GetId())
{
- case VCLEVENT_WINDOW_MOVE:
- case VCLEVENT_WINDOW_RESIZE:
+ case VclEventId::WindowMove:
+ case VclEventId::WindowResize:
RequestUpdateChildren();
break;
- case VCLEVENT_WINDOW_GETFOCUS:
- case VCLEVENT_WINDOW_LOSEFOCUS:
+ case VclEventId::WindowGetFocus:
+ case VclEventId::WindowLoseFocus:
mrAccessibleSlideSorter.FireAccessibleEvent(
AccessibleEventId::SELECTION_CHANGED,
Any(),
diff --git a/sd/source/ui/annotations/annotationtag.cxx b/sd/source/ui/annotations/annotationtag.cxx
index 771cd5964d5e..fe740b524273 100644
--- a/sd/source/ui/annotations/annotationtag.cxx
+++ b/sd/source/ui/annotations/annotationtag.cxx
@@ -614,7 +614,7 @@ IMPL_LINK(AnnotationTag, WindowEventHandler, VclWindowEvent&, rEvent, void)
{
if( pWindow == mpAnnotationWindow.get() )
{
- if( rEvent.GetId() == VCLEVENT_WINDOW_DEACTIVATE )
+ if( rEvent.GetId() == VclEventId::WindowDeactivate )
{
// tdf#99388 and tdf#99712 if PopupMenu is active, suppress
// deletion of the AnnotationWindow which is triggered by
@@ -632,7 +632,7 @@ IMPL_LINK(AnnotationTag, WindowEventHandler, VclWindowEvent&, rEvent, void)
{
switch( rEvent.GetId() )
{
- case VCLEVENT_WINDOW_MOUSEBUTTONUP:
+ case VclEventId::WindowMouseButtonUp:
{
// if we stop pressing the button without a mouse move we open the popup
mpListenWindow->RemoveEventListener( LINK(this, AnnotationTag, WindowEventHandler));
@@ -641,7 +641,7 @@ IMPL_LINK(AnnotationTag, WindowEventHandler, VclWindowEvent&, rEvent, void)
OpenPopup(false);
}
break;
- case VCLEVENT_WINDOW_MOUSEMOVE:
+ case VclEventId::WindowMouseMove:
{
// if we move the mouse after a button down we wan't to start draging
mpListenWindow->RemoveEventListener( LINK(this, AnnotationTag, WindowEventHandler));
@@ -660,9 +660,10 @@ IMPL_LINK(AnnotationTag, WindowEventHandler, VclWindowEvent&, rEvent, void)
}
}
break;
- case VCLEVENT_OBJECT_DYING:
+ case VclEventId::ObjectDying:
mpListenWindow = nullptr;
break;
+ default: break;
}
}
}
diff --git a/sd/source/ui/app/sdmod1.cxx b/sd/source/ui/app/sdmod1.cxx
index 7dc6dad1bc5f..1f0fcde5a590 100644
--- a/sd/source/ui/app/sdmod1.cxx
+++ b/sd/source/ui/app/sdmod1.cxx
@@ -392,7 +392,7 @@ void SdModule::GetState(SfxItemSet& rItemSet)
IMPL_STATIC_LINK( SdModule, EventListenerHdl, VclSimpleEvent&, rSimpleEvent, void )
{
- if( (rSimpleEvent.GetId() == VCLEVENT_WINDOW_COMMAND) && static_cast<VclWindowEvent*>(&rSimpleEvent)->GetData() )
+ if( (rSimpleEvent.GetId() == VclEventId::WindowCommand) && static_cast<VclWindowEvent*>(&rSimpleEvent)->GetData() )
{
const CommandEvent& rEvent = *static_cast<const CommandEvent*>(static_cast<VclWindowEvent*>(&rSimpleEvent)->GetData());
diff --git a/sd/source/ui/dlg/LayerTabBar.cxx b/sd/source/ui/dlg/LayerTabBar.cxx
index 0ab57a7ed5c5..eeeb24cd42d4 100644
--- a/sd/source/ui/dlg/LayerTabBar.cxx
+++ b/sd/source/ui/dlg/LayerTabBar.cxx
@@ -297,13 +297,13 @@ void LayerTabBar::ActivatePage()
void LayerTabBar::SendActivatePageEvent()
{
- CallEventListeners (VCLEVENT_TABBAR_PAGEACTIVATED,
+ CallEventListeners (VclEventId::TabbarPageActivated,
reinterpret_cast<void*>(GetCurPageId()));
}
void LayerTabBar::SendDeactivatePageEvent()
{
- CallEventListeners (VCLEVENT_TABBAR_PAGEDEACTIVATED,
+ CallEventListeners (VclEventId::TabbarPageDeactivated,
reinterpret_cast<void*>(GetCurPageId()));
}
diff --git a/sd/source/ui/framework/factories/FullScreenPane.cxx b/sd/source/ui/framework/factories/FullScreenPane.cxx
index 4181ba3c7b84..86ffbb2d0c1b 100644
--- a/sd/source/ui/framework/factories/FullScreenPane.cxx
+++ b/sd/source/ui/framework/factories/FullScreenPane.cxx
@@ -177,16 +177,18 @@ IMPL_LINK(FullScreenPane, WindowEventHandler, VclWindowEvent&, rEvent, void)
{
switch (rEvent.GetId())
{
- case VCLEVENT_WINDOW_RESIZE:
+ case VclEventId::WindowResize:
GetWindow()->SetPosPixel(Point(0,0));
GetWindow()->SetSizePixel(Size(
mpWorkWindow->GetSizePixel().Width(),
mpWorkWindow->GetSizePixel().Height()));
break;
- case VCLEVENT_OBJECT_DYING:
+ case VclEventId::ObjectDying:
mpWorkWindow.disposeAndClear();
break;
+
+ default: break;
}
}
diff --git a/sd/source/ui/sidebar/LayoutMenu.cxx b/sd/source/ui/sidebar/LayoutMenu.cxx
index b9b99ba5564d..a8a21b0e5a0a 100644
--- a/sd/source/ui/sidebar/LayoutMenu.cxx
+++ b/sd/source/ui/sidebar/LayoutMenu.cxx
@@ -737,8 +737,8 @@ IMPL_LINK(LayoutMenu, WindowEventHandler, VclWindowEvent&, rEvent, void)
{
switch (rEvent.GetId())
{
- case VCLEVENT_WINDOW_SHOW:
- case VCLEVENT_WINDOW_RESIZE:
+ case VclEventId::WindowShow:
+ case VclEventId::WindowResize:
SetSizePixel(GetParent()->GetSizePixel());
break;
diff --git a/sd/source/ui/slideshow/showwin.cxx b/sd/source/ui/slideshow/showwin.cxx
index 6c52336aa896..389551093fc6 100644
--- a/sd/source/ui/slideshow/showwin.cxx
+++ b/sd/source/ui/slideshow/showwin.cxx
@@ -568,7 +568,7 @@ IMPL_LINK( ShowWindow, EventHdl, VclWindowEvent&, rEvent, void )
{
if( mbMouseAutoHide )
{
- if (rEvent.GetId() == VCLEVENT_WINDOW_SHOW)
+ if (rEvent.GetId() == VclEventId::WindowShow)
{
maMouseTimer.SetTimeout( HIDE_MOUSE_TIMEOUT );
maMouseTimer.Start();
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx
index 140f0ac73cd0..f7402f58bf8f 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -1893,7 +1893,7 @@ IMPL_LINK( SlideshowImpl, EventListenerHdl, VclSimpleEvent&, rSimpleEvent, void
if( !mxShow.is() || mbInputFreeze )
return;
- if( (rSimpleEvent.GetId() == VCLEVENT_WINDOW_COMMAND) && static_cast<VclWindowEvent*>(&rSimpleEvent)->GetData() )
+ if( (rSimpleEvent.GetId() == VclEventId::WindowCommand) && static_cast<VclWindowEvent*>(&rSimpleEvent)->GetData() )
{
const CommandEvent& rEvent = *static_cast<const CommandEvent*>(static_cast<VclWindowEvent*>(&rSimpleEvent)->GetData());
diff --git a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
index 1fa0e030875c..a6486df3524f 100644
--- a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
+++ b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
@@ -530,24 +530,24 @@ IMPL_LINK(SlideSorterController, WindowEventHandler, VclWindowEvent&, rEvent, vo
sd::Window *pActiveWindow (mrSlideSorter.GetContentWindow().get());
switch (rEvent.GetId())
{
- case VCLEVENT_WINDOW_ACTIVATE:
- case VCLEVENT_WINDOW_SHOW:
+ case VclEventId::WindowActivate:
+ case VclEventId::WindowShow:
if (pActiveWindow && pWindow == pActiveWindow->GetParent())
mrView.RequestRepaint();
break;
- case VCLEVENT_WINDOW_HIDE:
+ case VclEventId::WindowHide:
if (pActiveWindow && pWindow == pActiveWindow->GetParent())
mrView.SetPageUnderMouse(SharedPageDescriptor());
break;
- case VCLEVENT_WINDOW_GETFOCUS:
+ case VclEventId::WindowGetFocus:
if (pActiveWindow)
if (pWindow == pActiveWindow)
GetFocusManager().ShowFocus(false);
break;
- case VCLEVENT_WINDOW_LOSEFOCUS:
+ case VclEventId::WindowLoseFocus:
if (pActiveWindow && pWindow == pActiveWindow)
{
GetFocusManager().HideFocus();
@@ -559,7 +559,7 @@ IMPL_LINK(SlideSorterController, WindowEventHandler, VclWindowEvent&, rEvent, vo
}
break;
- case VCLEVENT_APPLICATION_DATACHANGED:
+ case VclEventId::ApplicationDataChanged:
{
// Invalidate the preview cache.
cache::PageCacheManager::Instance()->InvalidateAllCaches();
diff --git a/sd/source/ui/slidesorter/inc/controller/SlsProperties.hxx b/sd/source/ui/slidesorter/inc/controller/SlsProperties.hxx
index 136d7fd5dfd2..36721db11049 100644
--- a/sd/source/ui/slidesorter/inc/controller/SlsProperties.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlsProperties.hxx
@@ -32,7 +32,7 @@ public:
Properties();
~Properties();
- /** Call this method after receiving a VCLEVENT_APPLICATION_DATACHANGED
+ /** Call this method after receiving a VclEventId::ApplicationDataChanged
event.
*/
void HandleDataChangeEvent();
diff --git a/sd/source/ui/view/FormShellManager.cxx b/sd/source/ui/view/FormShellManager.cxx
index fc57bec856a1..41b567fb9107 100644
--- a/sd/source/ui/view/FormShellManager.cxx
+++ b/sd/source/ui/view/FormShellManager.cxx
@@ -227,7 +227,7 @@ IMPL_LINK(FormShellManager, WindowEventHandler, VclWindowEvent&, rEvent, void)
{
switch (rEvent.GetId())
{
- case VCLEVENT_WINDOW_GETFOCUS:
+ case VclEventId::WindowGetFocus:
{
// The window of the center pane got the focus. Therefore
// the form shell is moved to the bottom of the object bar
@@ -245,7 +245,7 @@ IMPL_LINK(FormShellManager, WindowEventHandler, VclWindowEvent&, rEvent, void)
}
break;
- case VCLEVENT_WINDOW_LOSEFOCUS:
+ case VclEventId::WindowLoseFocus:
// We follow the sloppy focus policy. Losing the focus is
// ignored. We wait for the focus to be placed either in
// the window or the form shell. The later, however, is
@@ -253,9 +253,11 @@ IMPL_LINK(FormShellManager, WindowEventHandler, VclWindowEvent&, rEvent, void)
// one.
break;
- case VCLEVENT_OBJECT_DYING:
+ case VclEventId::ObjectDying:
mpMainViewShellWindow = nullptr;
break;
+
+ default: break;
}
}
diff --git a/sd/source/ui/view/ViewShellManager.cxx b/sd/source/ui/view/ViewShellManager.cxx
index 1d11b149f705..1bb198618fdc 100644
--- a/sd/source/ui/view/ViewShellManager.cxx
+++ b/sd/source/ui/view/ViewShellManager.cxx
@@ -988,7 +988,7 @@ IMPL_LINK(ViewShellManager::Implementation, WindowEventHandler, VclWindowEvent&,
switch (rEvent.GetId())
{
- case VCLEVENT_WINDOW_GETFOCUS:
+ case VclEventId::WindowGetFocus:
{
for (ActiveShellList::iterator aI(maActiveViewShells.begin());
aI!=maActiveViewShells.end();
@@ -1003,10 +1003,10 @@ IMPL_LINK(ViewShellManager::Implementation, WindowEventHandler, VclWindowEvent&,
}
break;
- case VCLEVENT_WINDOW_LOSEFOCUS:
+ case VclEventId::WindowLoseFocus:
break;
- case VCLEVENT_OBJECT_DYING:
+ case VclEventId::ObjectDying:
// Remember that we do not have to remove the window
// listener for this window.
for (ActiveShellList::iterator
@@ -1022,6 +1022,8 @@ IMPL_LINK(ViewShellManager::Implementation, WindowEventHandler, VclWindowEvent&,
}
}
break;
+
+ default: break;
}
}
diff --git a/sd/source/ui/view/tabcontr.cxx b/sd/source/ui/view/tabcontr.cxx
index 4b9bebd7039f..bbb7598bba31 100644
--- a/sd/source/ui/view/tabcontr.cxx
+++ b/sd/source/ui/view/tabcontr.cxx
@@ -355,13 +355,13 @@ bool TabControl::DeactivatePage()
void TabControl::SendActivatePageEvent()
{
- CallEventListeners (VCLEVENT_TABBAR_PAGEACTIVATED,
+ CallEventListeners (VclEventId::TabbarPageActivated,
reinterpret_cast<void*>(GetCurPageId()));
}
void TabControl::SendDeactivatePageEvent()
{
- CallEventListeners (VCLEVENT_TABBAR_PAGEDEACTIVATED,
+ CallEventListeners (VclEventId::TabbarPageDeactivated,
reinterpret_cast<void*>(GetCurPageId()));
}