Kaydet (Commit) 6532cb0e authored tarafından Noel Grandin's avatar Noel Grandin

ImplCallEventListeners and FireVclEvent can take references

Change-Id: Ibfb5ae40edd0db1f6b99bd5178d4d871ede37d7d
üst bcb5756c
...@@ -804,7 +804,7 @@ public: ...@@ -804,7 +804,7 @@ public:
@see ImplCallEventListeners(sal_uLong nEvent, Windows* pWin, void* pData); @see ImplCallEventListeners(sal_uLong nEvent, Windows* pWin, void* pData);
*/ */
static void ImplCallEventListeners( VclSimpleEvent* pEvent ); static void ImplCallEventListeners( VclSimpleEvent& rEvent );
/** Handle keypress event /** Handle keypress event
......
...@@ -800,7 +800,7 @@ protected: ...@@ -800,7 +800,7 @@ protected:
void SetCompoundControl( bool bCompound ); void SetCompoundControl( bool bCompound );
void CallEventListeners( sal_uLong nEvent, void* pData = NULL ); 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 bool AcquireGraphics() const SAL_OVERRIDE;
virtual void ReleaseGraphics( bool bRelease = true ) SAL_OVERRIDE; virtual void ReleaseGraphics( bool bRelease = true ) SAL_OVERRIDE;
......
...@@ -779,7 +779,7 @@ void ScMenuFloatingWindow::fireMenuHighlightedEvent() ...@@ -779,7 +779,7 @@ void ScMenuFloatingWindow::fireMenuHighlightedEvent()
return; return;
VclAccessibleEvent aEvent(VCLEVENT_MENU_HIGHLIGHT, xAccMenu); VclAccessibleEvent aEvent(VCLEVENT_MENU_HIGHLIGHT, xAccMenu);
FireVclEvent(&aEvent); FireVclEvent(aEvent);
} }
void ScMenuFloatingWindow::setSubMenuFocused(ScMenuFloatingWindow* pSubMenu) void ScMenuFloatingWindow::setSubMenuFocused(ScMenuFloatingWindow* pSubMenu)
......
...@@ -665,12 +665,12 @@ void Application::ImplCallEventListeners( sal_uLong nEvent, vcl::Window *pWin, v ...@@ -665,12 +665,12 @@ void Application::ImplCallEventListeners( sal_uLong nEvent, vcl::Window *pWin, v
pSVData->maAppData.mpEventListeners->Call( &aEvent ); pSVData->maAppData.mpEventListeners->Call( &aEvent );
} }
void Application::ImplCallEventListeners( VclSimpleEvent* pEvent ) void Application::ImplCallEventListeners( VclSimpleEvent& rEvent )
{ {
ImplSVData* pSVData = ImplGetSVData(); ImplSVData* pSVData = ImplGetSVData();
if ( pSVData->maAppData.mpEventListeners ) if ( pSVData->maAppData.mpEventListeners )
pSVData->maAppData.mpEventListeners->Call( pEvent ); pSVData->maAppData.mpEventListeners->Call( &rEvent );
} }
void Application::AddEventListener( const Link<>& rEventListener ) void Application::AddEventListener( const Link<>& rEventListener )
......
...@@ -206,7 +206,7 @@ void Window::CallEventListeners( sal_uLong nEvent, void* pData ) ...@@ -206,7 +206,7 @@ void Window::CallEventListeners( sal_uLong nEvent, void* pData )
ImplDelData aDelData; ImplDelData aDelData;
ImplAddDel( &aDelData ); ImplAddDel( &aDelData );
Application::ImplCallEventListeners( &aEvent ); Application::ImplCallEventListeners( aEvent );
if ( aDelData.IsDead() ) if ( aDelData.IsDead() )
return; return;
...@@ -237,9 +237,9 @@ void Window::CallEventListeners( sal_uLong nEvent, void* pData ) ...@@ -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 ) void Window::AddEventListener( const Link<>& rEventListener )
......
...@@ -336,7 +336,7 @@ void Menu::ImplCallEventListeners( sal_uLong nEvent, sal_uInt16 nPos ) ...@@ -336,7 +336,7 @@ void Menu::ImplCallEventListeners( sal_uLong nEvent, sal_uInt16 nPos )
// This is needed by atk accessibility bridge // This is needed by atk accessibility bridge
if ( nEvent == VCLEVENT_MENU_HIGHLIGHT ) if ( nEvent == VCLEVENT_MENU_HIGHLIGHT )
{ {
Application::ImplCallEventListeners( &aEvent ); Application::ImplCallEventListeners( aEvent );
} }
if ( !aDelData.isDeleted() ) if ( !aDelData.isDeleted() )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment