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&
if (m_pSysWindow && m_pSysWindow->GetCloseHdl().IsSet())
{
// The closing frame has its own close handler. Call it instead.
m_pSysWindow->GetCloseHdl().Call(m_pSysWindow);
m_pSysWindow->GetCloseHdl().Call(*m_pSysWindow);
return;
}
......
......@@ -279,8 +279,8 @@ public:
void SetApplicationID( const OUString &rApplicationID );
void SetCloseHdl(const Link<>& rLink);
const Link<>& GetCloseHdl() const;
void SetCloseHdl(const Link<SystemWindow&,void>& rLink);
const Link<SystemWindow&,void>& GetCloseHdl() const;
SAL_DLLPRIVATE bool hasPendingLayout() const { return maLayoutIdle.IsActive(); }
......
......@@ -56,7 +56,7 @@ class ScPreviewShell: public SfxViewShell
private:
void Construct( vcl::Window* pParent );
DECL_LINK_TYPED( ScrollHandler, ScrollBar*, void );
DECL_LINK(CloseHdl, SystemWindow*);
DECL_LINK_TYPED( CloseHdl, SystemWindow&, void);
void DoScroll( sal_uInt16 nMode );
void ExitPreview();
......
......@@ -184,7 +184,7 @@ ScPreviewShell::ScPreviewShell( SfxViewFrame* pViewFrame,
ScPreviewShell::~ScPreviewShell()
{
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
BroadcastAccessibility( SfxSimpleHint( SFX_HINT_DYING ) );
......@@ -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();
return 0;
}
bool ScPreviewShell::ScrollCommand( const CommandEvent& rCEvt )
......
......@@ -55,22 +55,21 @@ IMPL_LINK_NOARG_TYPED(RemoteDialog, HandleConnectButton, Button*, void)
OUString aPin ( m_pClientBox->getPin() );
if ( RemoteServer::connectClient( aEntry->m_pClientInfo, aPin ) )
{
CloseHdl( 0 );
CloseHdl( *this );
}
#endif
}
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
RemoteServer::restoreDiscoverable();
#endif
Close();
return 0;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -29,7 +29,7 @@ private:
VclPtr<ClientBox> m_pClientBox;
DECL_DLLPRIVATE_LINK_TYPED( HandleConnectButton, Button*, void );
DECL_LINK( CloseHdl, void* );
DECL_LINK_TYPED( CloseHdl, SystemWindow&, void );
DECL_LINK_TYPED( CloseClickHdl, Button*, void );
public:
RemoteDialog( vcl::Window* pWindow );
......
......@@ -50,8 +50,8 @@ public:
TaskPaneList* mpTaskPaneList;
Size maMaxOutSize;
OUString maRepresentedURL;
Link<> maCloseHdl;
OUString maRepresentedURL;
Link<SystemWindow&,void> maCloseHdl;
};
SystemWindow::ImplData::ImplData()
......@@ -1001,12 +1001,12 @@ void SystemWindow::SetApplicationID(const OUString &rApplicationID)
mpWindowImpl->mpFrame->SetApplicationID( rApplicationID );
}
void SystemWindow::SetCloseHdl(const Link<>& rLink)
void SystemWindow::SetCloseHdl(const Link<SystemWindow&,void>& rLink)
{
mpImplData->maCloseHdl = rLink;
}
const Link<>& SystemWindow::GetCloseHdl() const
const Link<SystemWindow&,void>& SystemWindow::GetCloseHdl() const
{
return mpImplData->maCloseHdl;
}
......
......@@ -1981,10 +1981,10 @@ void ImplHandleClose( vcl::Window* pWindow )
if (pSysWin)
{
// See if the custom close handler is set.
const Link<>& rLink = pSysWin->GetCloseHdl();
const Link<SystemWindow&,void>& rLink = pSysWin->GetCloseHdl();
if (rLink.IsSet())
{
rLink.Call(pSysWin);
rLink.Call(*pSysWin);
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