diff options
author | Noel Grandin <noel@peralex.com> | 2015-09-17 14:10:46 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-09-17 14:41:59 +0200 |
commit | cdadaa55569dbd1ea0fce3fa89f8b5f16f817438 (patch) | |
tree | fe668b614b9f49a34cabc61913a0eb8bf1914e01 /sd | |
parent | d360dd359936f79046193c9ea25dd0e165e1b7bf (diff) |
convert Link<> to typed
Change-Id: Ifdcd9121b16b7f33632cf6671449152ebee8beef
Diffstat (limited to 'sd')
3 files changed, 10 insertions, 11 deletions
diff --git a/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx b/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx index fff57c22442f..d8dc832fe1d5 100644 --- a/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx +++ b/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx @@ -83,7 +83,7 @@ public: DECL_LINK(WindowEventListener, VclWindowEvent*); DECL_LINK(SelectionChangeListener, void*); DECL_LINK_TYPED(BroadcastSelectionChange, void*, void); - DECL_LINK(FocusChangeListener, void*); + DECL_LINK_TYPED(FocusChangeListener, LinkParamNone*, void); DECL_LINK_TYPED(VisibilityChangeListener, LinkParamNone*, void); DECL_LINK_TYPED(UpdateChildrenCallback, void*, void); @@ -937,7 +937,7 @@ IMPL_LINK_NOARG_TYPED(AccessibleSlideSorterView::Implementation, BroadcastSelect Any()); } -IMPL_LINK_NOARG(AccessibleSlideSorterView::Implementation, FocusChangeListener) +IMPL_LINK_NOARG_TYPED(AccessibleSlideSorterView::Implementation, FocusChangeListener, LinkParamNone*, void) { sal_Int32 nNewFocusedIndex ( mrSlideSorter.GetController().GetFocusManager().GetFocusedPageIndex()); @@ -977,7 +977,6 @@ IMPL_LINK_NOARG(AccessibleSlideSorterView::Implementation, FocusChangeListener) if (bSentFocus) mnFocusedIndex = nNewFocusedIndex; } - return 1; } IMPL_LINK_NOARG_TYPED(AccessibleSlideSorterView::Implementation, UpdateChildrenCallback, void*, void) diff --git a/sd/source/ui/slidesorter/controller/SlsFocusManager.cxx b/sd/source/ui/slidesorter/controller/SlsFocusManager.cxx index aff6a5e1727c..94ac7d76c3a0 100644 --- a/sd/source/ui/slidesorter/controller/SlsFocusManager.cxx +++ b/sd/source/ui/slidesorter/controller/SlsFocusManager.cxx @@ -243,7 +243,7 @@ void FocusManager::ShowFocusIndicator ( } } -void FocusManager::AddFocusChangeListener (const Link<>& rListener) +void FocusManager::AddFocusChangeListener (const Link<LinkParamNone*,void>& rListener) { if (::std::find (maFocusChangeListeners.begin(), maFocusChangeListeners.end(), rListener) == maFocusChangeListeners.end()) @@ -252,7 +252,7 @@ void FocusManager::AddFocusChangeListener (const Link<>& rListener) } } -void FocusManager::RemoveFocusChangeListener (const Link<>& rListener) +void FocusManager::RemoveFocusChangeListener (const Link<LinkParamNone*,void>& rListener) { maFocusChangeListeners.erase ( ::std::find (maFocusChangeListeners.begin(), maFocusChangeListeners.end(), rListener)); @@ -261,11 +261,11 @@ void FocusManager::RemoveFocusChangeListener (const Link<>& rListener) void FocusManager::NotifyFocusChangeListeners() const { // Create a copy of the listener list to be safe when that is modified. - ::std::vector<Link<>> aListeners (maFocusChangeListeners); + ::std::vector<Link<LinkParamNone*,void>> aListeners (maFocusChangeListeners); // Tell the selection change listeners that the selection has changed. - ::std::vector<Link<>>::iterator iListener (aListeners.begin()); - ::std::vector<Link<>>::iterator iEnd (aListeners.end()); + ::std::vector<Link<LinkParamNone*,void>>::iterator iListener (aListeners.begin()); + ::std::vector<Link<LinkParamNone*,void>>::iterator iEnd (aListeners.end()); for (; iListener!=iEnd; ++iListener) { iListener->Call(NULL); diff --git a/sd/source/ui/slidesorter/inc/controller/SlsFocusManager.hxx b/sd/source/ui/slidesorter/inc/controller/SlsFocusManager.hxx index e6bdfffa8a34..dd022e92d3cb 100644 --- a/sd/source/ui/slidesorter/inc/controller/SlsFocusManager.hxx +++ b/sd/source/ui/slidesorter/inc/controller/SlsFocusManager.hxx @@ -143,14 +143,14 @@ public: the second and all following calls are ignored. Each listener is added only once. */ - void AddFocusChangeListener (const Link<>& rListener); + void AddFocusChangeListener (const Link<LinkParamNone*,void>& rListener); /** Remove a focus change listener. @param rListener It is save to pass a listener that was not added are has been removed previously. Such calls are ignored. */ - void RemoveFocusChangeListener (const Link<>& rListener); + void RemoveFocusChangeListener (const Link<LinkParamNone*,void>& rListener); /** Create an instance of this class to temporarily hide the focus indicator. It is restored to its former visibility state when the @@ -179,7 +179,7 @@ private: */ bool mbPageIsFocused; - ::std::vector<Link<>> maFocusChangeListeners; + ::std::vector<Link<LinkParamNone*,void>> maFocusChangeListeners; /** When vertical wrap is active then pressing UP in the top row moves the focus to the bottom row, DOWN in the bottom row moves the focus |