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

convert Link<> to typed

Change-Id: Id5c1ef7e094ab3796a09f3f451903fff525aaf97
üst 277b9950
...@@ -86,10 +86,9 @@ void RecentMasterPagesSelector::LateInit() ...@@ -86,10 +86,9 @@ void RecentMasterPagesSelector::LateInit()
LINK(this,RecentMasterPagesSelector,MasterPageListListener)); LINK(this,RecentMasterPagesSelector,MasterPageListListener));
} }
IMPL_LINK_NOARG(RecentMasterPagesSelector, MasterPageListListener) IMPL_LINK_NOARG_TYPED(RecentMasterPagesSelector, MasterPageListListener, LinkParamNone*, void)
{ {
MasterPagesSelector::Fill(); MasterPagesSelector::Fill();
return 0;
} }
void RecentMasterPagesSelector::Fill (ItemList& rItemList) void RecentMasterPagesSelector::Fill (ItemList& rItemList)
......
...@@ -37,7 +37,7 @@ public: ...@@ -37,7 +37,7 @@ public:
const css::uno::Reference<css::ui::XSidebar>& rxSidebar); const css::uno::Reference<css::ui::XSidebar>& rxSidebar);
protected: protected:
DECL_LINK(MasterPageListListener, void*); DECL_LINK_TYPED(MasterPageListListener, LinkParamNone*, void);
virtual void Fill (ItemList& rItemList) SAL_OVERRIDE; virtual void Fill (ItemList& rItemList) SAL_OVERRIDE;
using sd::sidebar::MasterPagesSelector::Fill; using sd::sidebar::MasterPagesSelector::Fill;
......
...@@ -237,7 +237,7 @@ void RecentlyUsedMasterPages::SavePersistentValues() ...@@ -237,7 +237,7 @@ void RecentlyUsedMasterPages::SavePersistentValues()
} }
} }
void RecentlyUsedMasterPages::AddEventListener (const Link<>& rEventListener) void RecentlyUsedMasterPages::AddEventListener (const Link<LinkParamNone*,void>& rEventListener)
{ {
if (::std::find ( if (::std::find (
maListeners.begin(), maListeners.begin(),
...@@ -248,7 +248,7 @@ void RecentlyUsedMasterPages::AddEventListener (const Link<>& rEventListener) ...@@ -248,7 +248,7 @@ void RecentlyUsedMasterPages::AddEventListener (const Link<>& rEventListener)
} }
} }
void RecentlyUsedMasterPages::RemoveEventListener (const Link<>& rEventListener) void RecentlyUsedMasterPages::RemoveEventListener (const Link<LinkParamNone*,void>& rEventListener)
{ {
maListeners.erase ( maListeners.erase (
::std::find ( ::std::find (
...@@ -272,12 +272,9 @@ MasterPageContainer::Token RecentlyUsedMasterPages::GetTokenForIndex (sal_uInt32 ...@@ -272,12 +272,9 @@ MasterPageContainer::Token RecentlyUsedMasterPages::GetTokenForIndex (sal_uInt32
void RecentlyUsedMasterPages::SendEvent() void RecentlyUsedMasterPages::SendEvent()
{ {
::std::vector<Link<>>::iterator aLink (maListeners.begin()); for (auto& aLink : maListeners)
::std::vector<Link<>>::iterator aEnd (maListeners.end());
while (aLink!=aEnd)
{ {
aLink->Call (NULL); aLink.Call(nullptr);
++aLink;
} }
} }
......
...@@ -46,8 +46,8 @@ public: ...@@ -46,8 +46,8 @@ public:
*/ */
static RecentlyUsedMasterPages& Instance(); static RecentlyUsedMasterPages& Instance();
void AddEventListener (const Link<>& rEventListener); void AddEventListener (const Link<LinkParamNone*,void>& rEventListener);
void RemoveEventListener (const Link<>& rEventListener); void RemoveEventListener (const Link<LinkParamNone*,void>& rEventListener);
int GetMasterPageCount() const; int GetMasterPageCount() const;
MasterPageContainer::Token GetTokenForIndex (sal_uInt32 nIndex) const; MasterPageContainer::Token GetTokenForIndex (sal_uInt32 nIndex) const;
...@@ -84,7 +84,7 @@ private: ...@@ -84,7 +84,7 @@ private:
*/ */
static RecentlyUsedMasterPages* mpInstance; static RecentlyUsedMasterPages* mpInstance;
::std::vector<Link<>> maListeners; ::std::vector<Link<LinkParamNone*,void>> maListeners;
typedef ::std::vector<Descriptor> MasterPageList; typedef ::std::vector<Descriptor> MasterPageList;
MasterPageList mvMasterPages; MasterPageList mvMasterPages;
......
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