ImplCallEventListeners and FireVclEvent can take references
Change-Id: Ibfb5ae40edd0db1f6b99bd5178d4d871ede37d7d
diff --git a/include/vcl/svapp.hxx b/include/vcl/svapp.hxx
index bdfa88d..1721012 100644
--- a/include/vcl/svapp.hxx
+++ b/include/vcl/svapp.hxx
@@ -804,7 +804,7 @@ public:
@see ImplCallEventListeners(sal_uLong nEvent, Windows* pWin, void* pData);
*/
static void ImplCallEventListeners( VclSimpleEvent* pEvent );
static void ImplCallEventListeners( VclSimpleEvent& rEvent );
/** Handle keypress event
diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index 63be0ac..13eb1db 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -800,7 +800,7 @@ protected:
void SetCompoundControl( bool bCompound );
void CallEventListeners( sal_uLong nEvent, void* pData = NULL );
static void FireVclEvent( VclSimpleEvent* pEvent );
static void FireVclEvent( VclSimpleEvent& rEvent );
virtual bool AcquireGraphics() const SAL_OVERRIDE;
virtual void ReleaseGraphics( bool bRelease = true ) SAL_OVERRIDE;
diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx
index b917770..4fae698 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -779,7 +779,7 @@ void ScMenuFloatingWindow::fireMenuHighlightedEvent()
return;
VclAccessibleEvent aEvent(VCLEVENT_MENU_HIGHLIGHT, xAccMenu);
FireVclEvent(&aEvent);
FireVclEvent(aEvent);
}
void ScMenuFloatingWindow::setSubMenuFocused(ScMenuFloatingWindow* pSubMenu)
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index 8f56172..0295b915 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -665,12 +665,12 @@ void Application::ImplCallEventListeners( sal_uLong nEvent, vcl::Window *pWin, v
pSVData->maAppData.mpEventListeners->Call( &aEvent );
}
void Application::ImplCallEventListeners( VclSimpleEvent* pEvent )
void Application::ImplCallEventListeners( VclSimpleEvent& rEvent )
{
ImplSVData* pSVData = ImplGetSVData();
if ( pSVData->maAppData.mpEventListeners )
pSVData->maAppData.mpEventListeners->Call( pEvent );
pSVData->maAppData.mpEventListeners->Call( &rEvent );
}
void Application::AddEventListener( const Link<>& rEventListener )
diff --git a/vcl/source/window/event.cxx b/vcl/source/window/event.cxx
index 8fcc65b..d2ac5b7 100644
--- a/vcl/source/window/event.cxx
+++ b/vcl/source/window/event.cxx
@@ -206,7 +206,7 @@ void Window::CallEventListeners( sal_uLong nEvent, void* pData )
ImplDelData aDelData;
ImplAddDel( &aDelData );
Application::ImplCallEventListeners( &aEvent );
Application::ImplCallEventListeners( aEvent );
if ( aDelData.IsDead() )
return;
@@ -237,9 +237,9 @@ void Window::CallEventListeners( sal_uLong nEvent, void* pData )
}
}
void Window::FireVclEvent( VclSimpleEvent* pEvent )
void Window::FireVclEvent( VclSimpleEvent& rEvent )
{
Application::ImplCallEventListeners(pEvent);
Application::ImplCallEventListeners(rEvent);
}
void Window::AddEventListener( const Link<>& rEventListener )
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 98d9740..e627377 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -336,7 +336,7 @@ void Menu::ImplCallEventListeners( sal_uLong nEvent, sal_uInt16 nPos )
// This is needed by atk accessibility bridge
if ( nEvent == VCLEVENT_MENU_HIGHLIGHT )
{
Application::ImplCallEventListeners( &aEvent );
Application::ImplCallEventListeners( aEvent );
}
if ( !aDelData.isDeleted() )