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