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

convert Link<> to typed

Change-Id: I5c4021c9cb3fdeace7f7d99d580dc7fe2f7c354a
üst 662084d5
...@@ -186,7 +186,7 @@ void SAL_CALL CloseDispatcher::dispatchWithNotification(const css::util::URL& ...@@ -186,7 +186,7 @@ void SAL_CALL CloseDispatcher::dispatchWithNotification(const css::util::URL&
if (m_pSysWindow && m_pSysWindow->GetCloseHdl().IsSet()) if (m_pSysWindow && m_pSysWindow->GetCloseHdl().IsSet())
{ {
// The closing frame has its own close handler. Call it instead. // The closing frame has its own close handler. Call it instead.
m_pSysWindow->GetCloseHdl().Call(m_pSysWindow); m_pSysWindow->GetCloseHdl().Call(*m_pSysWindow);
return; return;
} }
......
...@@ -279,8 +279,8 @@ public: ...@@ -279,8 +279,8 @@ public:
void SetApplicationID( const OUString &rApplicationID ); void SetApplicationID( const OUString &rApplicationID );
void SetCloseHdl(const Link<>& rLink); void SetCloseHdl(const Link<SystemWindow&,void>& rLink);
const Link<>& GetCloseHdl() const; const Link<SystemWindow&,void>& GetCloseHdl() const;
SAL_DLLPRIVATE bool hasPendingLayout() const { return maLayoutIdle.IsActive(); } SAL_DLLPRIVATE bool hasPendingLayout() const { return maLayoutIdle.IsActive(); }
......
...@@ -56,7 +56,7 @@ class ScPreviewShell: public SfxViewShell ...@@ -56,7 +56,7 @@ class ScPreviewShell: public SfxViewShell
private: private:
void Construct( vcl::Window* pParent ); void Construct( vcl::Window* pParent );
DECL_LINK_TYPED( ScrollHandler, ScrollBar*, void ); DECL_LINK_TYPED( ScrollHandler, ScrollBar*, void );
DECL_LINK(CloseHdl, SystemWindow*); DECL_LINK_TYPED( CloseHdl, SystemWindow&, void);
void DoScroll( sal_uInt16 nMode ); void DoScroll( sal_uInt16 nMode );
void ExitPreview(); void ExitPreview();
......
...@@ -184,7 +184,7 @@ ScPreviewShell::ScPreviewShell( SfxViewFrame* pViewFrame, ...@@ -184,7 +184,7 @@ ScPreviewShell::ScPreviewShell( SfxViewFrame* pViewFrame,
ScPreviewShell::~ScPreviewShell() ScPreviewShell::~ScPreviewShell()
{ {
if (mpFrameWindow) if (mpFrameWindow)
mpFrameWindow->SetCloseHdl(Link<>()); // Remove close handler. mpFrameWindow->SetCloseHdl(Link<SystemWindow&,void>()); // Remove close handler.
// #108333#; notify Accessibility that Shell is dying and before destroy all // #108333#; notify Accessibility that Shell is dying and before destroy all
BroadcastAccessibility( SfxSimpleHint( SFX_HINT_DYING ) ); BroadcastAccessibility( SfxSimpleHint( SFX_HINT_DYING ) );
...@@ -480,10 +480,9 @@ IMPL_LINK_TYPED( ScPreviewShell, ScrollHandler, ScrollBar*, pScroll, void ) ...@@ -480,10 +480,9 @@ IMPL_LINK_TYPED( ScPreviewShell, ScrollHandler, ScrollBar*, pScroll, void )
} }
} }
IMPL_LINK (ScPreviewShell, CloseHdl, SystemWindow*,) IMPL_LINK_NOARG_TYPED(ScPreviewShell, CloseHdl, SystemWindow&, void)
{ {
ExitPreview(); ExitPreview();
return 0;
} }
bool ScPreviewShell::ScrollCommand( const CommandEvent& rCEvt ) bool ScPreviewShell::ScrollCommand( const CommandEvent& rCEvt )
......
...@@ -55,22 +55,21 @@ IMPL_LINK_NOARG_TYPED(RemoteDialog, HandleConnectButton, Button*, void) ...@@ -55,22 +55,21 @@ IMPL_LINK_NOARG_TYPED(RemoteDialog, HandleConnectButton, Button*, void)
OUString aPin ( m_pClientBox->getPin() ); OUString aPin ( m_pClientBox->getPin() );
if ( RemoteServer::connectClient( aEntry->m_pClientInfo, aPin ) ) if ( RemoteServer::connectClient( aEntry->m_pClientInfo, aPin ) )
{ {
CloseHdl( 0 ); CloseHdl( *this );
} }
#endif #endif
} }
IMPL_LINK_NOARG_TYPED( RemoteDialog, CloseClickHdl, Button*, void ) IMPL_LINK_NOARG_TYPED( RemoteDialog, CloseClickHdl, Button*, void )
{ {
CloseHdl(NULL); CloseHdl(*this);
} }
IMPL_LINK_NOARG( RemoteDialog, CloseHdl ) IMPL_LINK_NOARG_TYPED( RemoteDialog, CloseHdl, SystemWindow&, void )
{ {
#ifdef ENABLE_SDREMOTE #ifdef ENABLE_SDREMOTE
RemoteServer::restoreDiscoverable(); RemoteServer::restoreDiscoverable();
#endif #endif
Close(); Close();
return 0;
} }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -29,7 +29,7 @@ private: ...@@ -29,7 +29,7 @@ private:
VclPtr<ClientBox> m_pClientBox; VclPtr<ClientBox> m_pClientBox;
DECL_DLLPRIVATE_LINK_TYPED( HandleConnectButton, Button*, void ); DECL_DLLPRIVATE_LINK_TYPED( HandleConnectButton, Button*, void );
DECL_LINK( CloseHdl, void* ); DECL_LINK_TYPED( CloseHdl, SystemWindow&, void );
DECL_LINK_TYPED( CloseClickHdl, Button*, void ); DECL_LINK_TYPED( CloseClickHdl, Button*, void );
public: public:
RemoteDialog( vcl::Window* pWindow ); RemoteDialog( vcl::Window* pWindow );
......
...@@ -50,8 +50,8 @@ public: ...@@ -50,8 +50,8 @@ public:
TaskPaneList* mpTaskPaneList; TaskPaneList* mpTaskPaneList;
Size maMaxOutSize; Size maMaxOutSize;
OUString maRepresentedURL; OUString maRepresentedURL;
Link<> maCloseHdl; Link<SystemWindow&,void> maCloseHdl;
}; };
SystemWindow::ImplData::ImplData() SystemWindow::ImplData::ImplData()
...@@ -1001,12 +1001,12 @@ void SystemWindow::SetApplicationID(const OUString &rApplicationID) ...@@ -1001,12 +1001,12 @@ void SystemWindow::SetApplicationID(const OUString &rApplicationID)
mpWindowImpl->mpFrame->SetApplicationID( rApplicationID ); mpWindowImpl->mpFrame->SetApplicationID( rApplicationID );
} }
void SystemWindow::SetCloseHdl(const Link<>& rLink) void SystemWindow::SetCloseHdl(const Link<SystemWindow&,void>& rLink)
{ {
mpImplData->maCloseHdl = rLink; mpImplData->maCloseHdl = rLink;
} }
const Link<>& SystemWindow::GetCloseHdl() const const Link<SystemWindow&,void>& SystemWindow::GetCloseHdl() const
{ {
return mpImplData->maCloseHdl; return mpImplData->maCloseHdl;
} }
......
...@@ -1981,10 +1981,10 @@ void ImplHandleClose( vcl::Window* pWindow ) ...@@ -1981,10 +1981,10 @@ void ImplHandleClose( vcl::Window* pWindow )
if (pSysWin) if (pSysWin)
{ {
// See if the custom close handler is set. // See if the custom close handler is set.
const Link<>& rLink = pSysWin->GetCloseHdl(); const Link<SystemWindow&,void>& rLink = pSysWin->GetCloseHdl();
if (rLink.IsSet()) if (rLink.IsSet())
{ {
rLink.Call(pSysWin); rLink.Call(*pSysWin);
return; return;
} }
} }
......
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