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

convert Link<> to typed

Change-Id: Ia647a53efa7bd8d0e0fe6937709b92c85a2e67a6
Reviewed-on: https://gerrit.libreoffice.org/18808Reviewed-by: 's avatarNoel Grandin <noelgrandin@gmail.com>
Tested-by: 's avatarNoel Grandin <noelgrandin@gmail.com>
üst 9d55221f
......@@ -162,8 +162,8 @@ class ScSimpleRefDlgWrapper: public SfxChildWindow
static void SetDefaultPosSize(Point aPos, Size aSize, bool bSet = true);
void SetRefString(const OUString& rStr);
void SetCloseHdl( const Link<const OUString*,void>& rLink );
void SetUnoLinks( const Link<>& rDone, const Link<>& rAbort,
const Link<>& rChange );
void SetUnoLinks( const Link<const OUString&,void>& rDone, const Link<const OUString&,void>& rAbort,
const Link<const OUString&,void>& rChange );
void SetFlags( bool bCloseOnButtonUp, bool bSingleCell, bool bMultiSelection );
static void SetAutoReOpen(bool bFlag);
......
......@@ -36,9 +36,9 @@ class ScSimpleRefDlg: public ScAnyRefDlg
{
private:
Link<const OUString*,void> aCloseHdl;
Link<> aDoneHdl;
Link<> aAbortedHdl;
Link<> aChangeHdl;
Link<const OUString&,void> aDoneHdl;
Link<const OUString&,void> aAbortedHdl;
Link<const OUString&,void> aChangeHdl;
VclPtr<FixedText> m_pFtAssign;
VclPtr<formula::RefEdit> m_pEdAssign;
......@@ -80,8 +80,8 @@ public:
virtual void FillInfo(SfxChildWinInfo&) const SAL_OVERRIDE;
void SetCloseHdl( const Link<const OUString*,void>& rLink );
void SetUnoLinks( const Link<>& rDone, const Link<>& rAbort,
const Link<>& rChange );
void SetUnoLinks( const Link<const OUString&,void>& rDone, const Link<const OUString&,void>& rAbort,
const Link<const OUString&,void>& rChange );
void SetFlags( bool bSetCloseOnButtonUp, bool bSetSingleCell, bool bSetMultiSelection );
};
......
......@@ -184,9 +184,9 @@ private:
::com::sun::star::beans::PropertyValue >& rSettings );
DECL_LINK_TYPED( SimpleRefClose, const OUString*, void );
DECL_LINK( SimpleRefDone, OUString* );
DECL_LINK( SimpleRefAborted, OUString* );
DECL_LINK( SimpleRefChange, OUString* );
DECL_LINK_TYPED( SimpleRefDone, const OUString&, void );
DECL_LINK_TYPED( SimpleRefAborted, const OUString&, void );
DECL_LINK_TYPED( SimpleRefChange, const OUString&, void );
DECL_LINK_TYPED( FormControlActivated, LinkParamNone*, void );
protected:
......
......@@ -123,7 +123,7 @@ void ScSimpleRefDlg::SetReference( const ScRange& rRef, ScDocument* pDocP )
else
m_pEdAssign->SetRefString( aRefStr );
aChangeHdl.Call( &aRefStr );
aChangeHdl.Call( aRefStr );
}
}
......@@ -154,8 +154,9 @@ void ScSimpleRefDlg::SetCloseHdl( const Link<const OUString*,void>& rLink )
aCloseHdl=rLink;
}
void ScSimpleRefDlg::SetUnoLinks( const Link<>& rDone, const Link<>& rAbort,
const Link<>& rChange )
void ScSimpleRefDlg::SetUnoLinks( const Link<const OUString&,void>& rDone,
const Link<const OUString&,void>& rAbort,
const Link<const OUString&,void>& rChange )
{
aDoneHdl = rDone;
aAbortedHdl = rAbort;
......@@ -195,9 +196,9 @@ IMPL_LINK_NOARG_TYPED(ScSimpleRefDlg, OkBtnHdl, Button*, void)
bAutoReOpen=false;
OUString aResult=m_pEdAssign->GetText();
aCloseHdl.Call(&aResult);
Link<> aUnoLink = aDoneHdl; // stack var because this is deleted in DoClose
Link<const OUString&,void> aUnoLink = aDoneHdl; // stack var because this is deleted in DoClose
DoClose( ScSimpleRefDlgWrapper::GetChildWindowId() );
aUnoLink.Call( &aResult );
aUnoLink.Call( aResult );
}
IMPL_LINK_NOARG_TYPED(ScSimpleRefDlg, CancelBtnHdl, Button*, void)
......@@ -205,9 +206,9 @@ IMPL_LINK_NOARG_TYPED(ScSimpleRefDlg, CancelBtnHdl, Button*, void)
bAutoReOpen=false;
OUString aResult=m_pEdAssign->GetText();
aCloseHdl.Call(NULL);
Link<> aUnoLink = aAbortedHdl; // stack var because this is deleted in DoClose
Link<const OUString&,void> aUnoLink = aAbortedHdl; // stack var because this is deleted in DoClose
DoClose( ScSimpleRefDlgWrapper::GetChildWindowId() );
aUnoLink.Call( &aResult );
aUnoLink.Call( aResult );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -202,8 +202,8 @@ void ScSimpleRefDlgWrapper::SetCloseHdl( const Link<const OUString*,void>& rLink
}
}
void ScSimpleRefDlgWrapper::SetUnoLinks( const Link<>& rDone,
const Link<>& rAbort, const Link<>& rChange )
void ScSimpleRefDlgWrapper::SetUnoLinks( const Link<const OUString&,void>& rDone,
const Link<const OUString&,void>& rAbort, const Link<const OUString&,void>& rChange )
{
if(GetWindow())
{
......
......@@ -1104,28 +1104,25 @@ static ScTabViewObj* lcl_GetViewObj( ScTabViewShell& rShell )
return pRet;
}
IMPL_LINK( ScTabViewShell, SimpleRefDone, OUString*, pResult )
IMPL_LINK_TYPED( ScTabViewShell, SimpleRefDone, const OUString&, aResult, void )
{
ScTabViewObj* pImpObj = lcl_GetViewObj( *this );
if ( pImpObj && pResult )
pImpObj->RangeSelDone( *pResult );
return 0;
if ( pImpObj )
pImpObj->RangeSelDone( aResult );
}
IMPL_LINK( ScTabViewShell, SimpleRefAborted, OUString*, pResult )
IMPL_LINK_TYPED( ScTabViewShell, SimpleRefAborted, const OUString&, rResult, void )
{
ScTabViewObj* pImpObj = lcl_GetViewObj( *this );
if ( pImpObj && pResult )
pImpObj->RangeSelAborted( *pResult );
return 0;
if ( pImpObj )
pImpObj->RangeSelAborted( rResult );
}
IMPL_LINK( ScTabViewShell, SimpleRefChange, OUString*, pResult )
IMPL_LINK_TYPED( ScTabViewShell, SimpleRefChange, const OUString&, rResult, void )
{
ScTabViewObj* pImpObj = lcl_GetViewObj( *this );
if ( pImpObj && pResult )
pImpObj->RangeSelChanged( *pResult );
return 0;
if ( pImpObj )
pImpObj->RangeSelChanged( rResult );
}
void ScTabViewShell::StartSimpleRefDialog(
......
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