summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2015-09-23 12:57:27 +0200
committerNoel Grandin <noelgrandin@gmail.com>2015-09-23 13:09:36 +0000
commitdf9dbfc1b187c6acdf864f8a169e5782aac61285 (patch)
treeb6af12127cd1c0fed641737aeedf2738e407123d
parent9d55221ffeb4ca408e34a7cc129fa2dfa0b9149a (diff)
convert Link<> to typed
Change-Id: Ia647a53efa7bd8d0e0fe6937709b92c85a2e67a6 Reviewed-on: https://gerrit.libreoffice.org/18808 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
-rw-r--r--sc/source/ui/inc/reffact.hxx4
-rw-r--r--sc/source/ui/inc/simpref.hxx10
-rw-r--r--sc/source/ui/inc/tabvwsh.hxx6
-rw-r--r--sc/source/ui/miscdlgs/simpref.cxx15
-rw-r--r--sc/source/ui/view/reffact.cxx4
-rw-r--r--sc/source/ui/view/tabvwsh4.cxx21
6 files changed, 29 insertions, 31 deletions
diff --git a/sc/source/ui/inc/reffact.hxx b/sc/source/ui/inc/reffact.hxx
index e3e8bccad264..ae843fc95f7d 100644
--- a/sc/source/ui/inc/reffact.hxx
+++ b/sc/source/ui/inc/reffact.hxx
@@ -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);
diff --git a/sc/source/ui/inc/simpref.hxx b/sc/source/ui/inc/simpref.hxx
index d02a4f120c22..bca6c9c0e4a0 100644
--- a/sc/source/ui/inc/simpref.hxx
+++ b/sc/source/ui/inc/simpref.hxx
@@ -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 );
};
diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx
index 521f2faea648..9a0bf9f20437 100644
--- a/sc/source/ui/inc/tabvwsh.hxx
+++ b/sc/source/ui/inc/tabvwsh.hxx
@@ -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:
diff --git a/sc/source/ui/miscdlgs/simpref.cxx b/sc/source/ui/miscdlgs/simpref.cxx
index 9fe9592da97d..50309ea5e219 100644
--- a/sc/source/ui/miscdlgs/simpref.cxx
+++ b/sc/source/ui/miscdlgs/simpref.cxx
@@ -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: */
diff --git a/sc/source/ui/view/reffact.cxx b/sc/source/ui/view/reffact.cxx
index 11f3a90ac21c..b08af0ae9931 100644
--- a/sc/source/ui/view/reffact.cxx
+++ b/sc/source/ui/view/reffact.cxx
@@ -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())
{
diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx
index 40b01331354e..11a6d05ec143 100644
--- a/sc/source/ui/view/tabvwsh4.cxx
+++ b/sc/source/ui/view/tabvwsh4.cxx
@@ -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(