[Libreoffice-commits] core.git: sc/inc sc/source
Noel Grandin
noelgrandin at gmail.com
Tue Sep 22 12:00:32 PDT 2015
sc/inc/chgtrack.hxx | 4 ++--
sc/source/core/tool/chgtrack.cxx | 2 +-
sc/source/ui/inc/acredlin.hxx | 2 +-
sc/source/ui/miscdlgs/acredlin.cxx | 12 +++++-------
sc/source/ui/view/tabvwsh4.cxx | 2 +-
5 files changed, 10 insertions(+), 12 deletions(-)
New commits:
commit 3d9dd244ce272e2bedc751c5dd250d15b06459e7
Author: Noel Grandin <noelgrandin at gmail.com>
Date: Tue Sep 22 17:24:46 2015 +0200
convert Link<> to typed
Change-Id: Iea94d9bc388b439328eb9d61a30565107da112d6
Reviewed-on: https://gerrit.libreoffice.org/18783
Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
Tested-by: Noel Grandin <noelgrandin at gmail.com>
diff --git a/sc/inc/chgtrack.hxx b/sc/inc/chgtrack.hxx
index 3f7bb8c..cda2d93 100644
--- a/sc/inc/chgtrack.hxx
+++ b/sc/inc/chgtrack.hxx
@@ -892,7 +892,7 @@ class ScChangeTrack : public utl::ConfigurationListener
ScChangeTrackMsgStack aMsgStackFinal;
std::set<OUString> maUserCollection;
OUString maUser;
- Link<> aModifiedLink;
+ Link<ScChangeTrack&,void> aModifiedLink;
ScRange aInDeleteRange;
DateTime aFixDateTime;
ScChangeAction* pFirst;
@@ -1178,7 +1178,7 @@ public:
// If ModifiedLink is set, changes go to
// ScChangeTrackMsgQueue
- void SetModifiedLink( const Link<>& r )
+ void SetModifiedLink( const Link<ScChangeTrack&,void>& r )
{ aModifiedLink = r; ClearMsgQueue(); }
ScChangeTrackMsgQueue& GetMsgQueue();
diff --git a/sc/source/core/tool/chgtrack.cxx b/sc/source/core/tool/chgtrack.cxx
index c5a4b08..5a705cc 100644
--- a/sc/source/core/tool/chgtrack.cxx
+++ b/sc/source/core/tool/chgtrack.cxx
@@ -2328,7 +2328,7 @@ void ScChangeTrack::EndBlockModify( sal_uLong nEndAction )
bNew = true;
}
if ( bNew )
- aModifiedLink.Call( this );
+ aModifiedLink.Call( *this );
}
}
}
diff --git a/sc/source/ui/inc/acredlin.hxx b/sc/source/ui/inc/acredlin.hxx
index 7397a20..9ee1f8c 100644
--- a/sc/source/ui/inc/acredlin.hxx
+++ b/sc/source/ui/inc/acredlin.hxx
@@ -108,7 +108,7 @@ private:
DECL_LINK( RefInfoHandle, OUString*);
DECL_LINK_TYPED( UpdateSelectionHdl, Idle*, void );
- DECL_LINK( ChgTrackModHdl, ScChangeTrack*);
+ DECL_LINK_TYPED( ChgTrackModHdl, ScChangeTrack&, void);
DECL_LINK_TYPED( CommandHdl, SvSimpleTable*, void);
DECL_LINK_TYPED( ReOpenTimerHdl, Idle*, void );
DECL_LINK_TYPED( ColCompareHdl, const SvSortData*, sal_Int32);
diff --git a/sc/source/ui/miscdlgs/acredlin.cxx b/sc/source/ui/miscdlgs/acredlin.cxx
index 42e636a..676bad7 100644
--- a/sc/source/ui/miscdlgs/acredlin.cxx
+++ b/sc/source/ui/miscdlgs/acredlin.cxx
@@ -163,7 +163,7 @@ void ScAcceptChgDlg::dispose()
if(pChanges!=NULL)
{
- Link<> aLink;
+ Link<ScChangeTrack&,void> aLink;
pChanges->SetModifiedLink(aLink);
}
@@ -1586,10 +1586,10 @@ void ScAcceptChgDlg::UpdateEntrys(ScChangeTrack* pChgTrack, sal_uLong nStartActi
}
-IMPL_LINK( ScAcceptChgDlg, ChgTrackModHdl, ScChangeTrack*, pChgTrack)
+IMPL_LINK_TYPED( ScAcceptChgDlg, ChgTrackModHdl, ScChangeTrack&, rChgTrack, void)
{
ScChangeTrackMsgQueue::iterator iter;
- ScChangeTrackMsgQueue& aMsgQueue= pChgTrack->GetMsgQueue();
+ ScChangeTrackMsgQueue& aMsgQueue= rChgTrack.GetMsgQueue();
sal_uLong nStartAction;
sal_uLong nEndAction;
@@ -1605,13 +1605,13 @@ IMPL_LINK( ScAcceptChgDlg, ChgTrackModHdl, ScChangeTrack*, pChgTrack)
switch((*iter)->eMsgType)
{
- case SC_CTM_APPEND: AppendChanges(pChgTrack,nStartAction,nEndAction);
+ case SC_CTM_APPEND: AppendChanges(&rChgTrack,nStartAction,nEndAction);
break;
case SC_CTM_REMOVE: RemoveEntrys(nStartAction,nEndAction);
break;
case SC_CTM_PARENT:
case SC_CTM_CHANGE: //bNeedsUpdate=true;
- UpdateEntrys(pChgTrack,nStartAction,nEndAction);
+ UpdateEntrys(&rChgTrack,nStartAction,nEndAction);
break;
default:
{
@@ -1623,8 +1623,6 @@ IMPL_LINK( ScAcceptChgDlg, ChgTrackModHdl, ScChangeTrack*, pChgTrack)
}
aMsgQueue.clear();
-
- return 0;
}
IMPL_LINK_NOARG_TYPED(ScAcceptChgDlg, ReOpenTimerHdl, Idle *, void)
{
diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx
index 33a556a..e8857c7 100644
--- a/sc/source/ui/view/tabvwsh4.cxx
+++ b/sc/source/ui/view/tabvwsh4.cxx
@@ -233,7 +233,7 @@ void ScTabViewShell::Deactivate(bool bMDI)
if(pChanges!=NULL)
{
- Link<> aLink;
+ Link<ScChangeTrack&,void> aLink;
pChanges->SetModifiedLink(aLink);
}
More information about the Libreoffice-commits
mailing list