diff options
author | Noel Grandin <noel@peralex.com> | 2015-09-21 08:03:25 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-09-21 08:03:52 +0200 |
commit | 1e67e94f1a308ca60d4934e9fe9d5c048225ebe8 (patch) | |
tree | c3bdf0fcec6912bc84e835fe48a80ee9f9391106 /vcl/unx | |
parent | c916152d8562cab868d4c522748ac30029fad179 (diff) |
convert Link<> to typed
Change-Id: If3e2b00092440ebd42ae5b73ae2b0e44c3702683
Diffstat (limited to 'vcl/unx')
-rw-r--r-- | vcl/unx/gtk/a11y/atkutil.cxx | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/vcl/unx/gtk/a11y/atkutil.cxx b/vcl/unx/gtk/a11y/atkutil.cxx index c3eb4a50485a..d77b4a913189 100644 --- a/vcl/unx/gtk/a11y/atkutil.cxx +++ b/vcl/unx/gtk/a11y/atkutil.cxx @@ -577,12 +577,11 @@ static void handle_menu_highlighted(::VclMenuEvent const * pEvent) /*****************************************************************************/ -sal_IntPtr WindowEventHandler(void *, void * p) +void WindowEventHandler(void *, VclSimpleEvent& rEvent) { - VclSimpleEvent * pEvent = static_cast<VclSimpleEvent *>(p); try { - switch (pEvent->GetId()) + switch (rEvent.GetId()) { case VCLEVENT_WINDOW_SHOW: break; @@ -591,7 +590,7 @@ sal_IntPtr WindowEventHandler(void *, void * p) case VCLEVENT_WINDOW_CLOSE: break; case VCLEVENT_WINDOW_GETFOCUS: - handle_get_focus(static_cast< ::VclWindowEvent const * >(pEvent)); + handle_get_focus(static_cast< ::VclWindowEvent const * >(&rEvent)); break; case VCLEVENT_WINDOW_LOSEFOCUS: break; @@ -606,11 +605,11 @@ sal_IntPtr WindowEventHandler(void *, void * p) break; case VCLEVENT_MENU_HIGHLIGHT: - if (const VclMenuEvent* pMenuEvent = dynamic_cast<const VclMenuEvent*>(pEvent)) + if (const VclMenuEvent* pMenuEvent = dynamic_cast<const VclMenuEvent*>(&rEvent)) { handle_menu_highlighted(pMenuEvent); } - else if (const VclAccessibleEvent* pAccEvent = dynamic_cast<const VclAccessibleEvent*>(pEvent)) + else if (const VclAccessibleEvent* pAccEvent = dynamic_cast<const VclAccessibleEvent*>(&rEvent)) { uno::Reference< accessibility::XAccessible > xAccessible = pAccEvent->GetAccessible(); if (xAccessible.is()) @@ -619,22 +618,22 @@ sal_IntPtr WindowEventHandler(void *, void * p) break; case VCLEVENT_TOOLBOX_HIGHLIGHT: - handle_toolbox_highlight(static_cast< ::VclWindowEvent const * >(pEvent)->GetWindow()); + handle_toolbox_highlight(static_cast< ::VclWindowEvent const * >(&rEvent)->GetWindow()); break; case VCLEVENT_TOOLBOX_BUTTONSTATECHANGED: - handle_toolbox_buttonchange(static_cast< ::VclWindowEvent const * >(pEvent)); + handle_toolbox_buttonchange(static_cast< ::VclWindowEvent const * >(&rEvent)); break; case VCLEVENT_OBJECT_DYING: - g_aWindowList.erase( static_cast< ::VclWindowEvent const * >(pEvent)->GetWindow() ); + g_aWindowList.erase( static_cast< ::VclWindowEvent const * >(&rEvent)->GetWindow() ); // fallthrough intentional ! case VCLEVENT_TOOLBOX_HIGHLIGHTOFF: - handle_toolbox_highlightoff(static_cast< ::VclWindowEvent const * >(pEvent)->GetWindow()); + handle_toolbox_highlightoff(static_cast< ::VclWindowEvent const * >(&rEvent)->GetWindow()); break; case VCLEVENT_TABPAGE_ACTIVATE: - handle_tabpage_activated(static_cast< ::VclWindowEvent const * >(pEvent)->GetWindow()); + handle_tabpage_activated(static_cast< ::VclWindowEvent const * >(&rEvent)->GetWindow()); break; case VCLEVENT_COMBOBOX_SETTEXT: @@ -653,10 +652,9 @@ sal_IntPtr WindowEventHandler(void *, void * p) { g_warning("Focused object has invalid index in parent"); } - return 0; } -static Link<> g_aEventListenerLink( NULL, WindowEventHandler ); +static Link<VclSimpleEvent&,void> g_aEventListenerLink( NULL, WindowEventHandler ); /*****************************************************************************/ |