diff options
author | Noel Grandin <noel@peralex.com> | 2015-09-14 11:04:47 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-09-15 09:37:31 +0200 |
commit | 30350f72d8ce9d60ae6c47d602eff90f34bf71a9 (patch) | |
tree | ce47b62618d93ce59bd527320e6c37a345afd473 /svtools/source/config/menuoptions.cxx | |
parent | dccd68adba8affbac7080cfe7ac97451037b79a0 (diff) |
convert Link<> to typed
Change-Id: I99ae0ff43a25dbaf8f6f5f03ec0f8751f0893ccb
Diffstat (limited to 'svtools/source/config/menuoptions.cxx')
-rw-r--r-- | svtools/source/config/menuoptions.cxx | 31 |
1 files changed, 12 insertions, 19 deletions
diff --git a/svtools/source/config/menuoptions.cxx b/svtools/source/config/menuoptions.cxx index 32d54b2f175c..2f9626a4c10b 100644 --- a/svtools/source/config/menuoptions.cxx +++ b/svtools/source/config/menuoptions.cxx @@ -69,7 +69,7 @@ class SvtMenuOptions_Impl : public ConfigItem private: - ::std::list<Link<>> aList; + ::std::list<Link<LinkParamNone*,void>> aList; bool m_bDontHideDisabledEntries ; /// cache "DontHideDisabledEntries" of Menu section bool m_bFollowMouse ; /// cache "FollowMouse" of Menu section TriState m_eMenuIcons ; /// cache "MenuIcons" of Menu section @@ -87,8 +87,8 @@ class SvtMenuOptions_Impl : public ConfigItem SvtMenuOptions_Impl(); virtual ~SvtMenuOptions_Impl(); - void AddListenerLink( const Link<>& rLink ); - void RemoveListenerLink( const Link<>& rLink ); + void AddListenerLink( const Link<LinkParamNone*,void>& rLink ); + void RemoveListenerLink( const Link<LinkParamNone*,void>& rLink ); // override methods of baseclass @@ -126,8 +126,8 @@ class SvtMenuOptions_Impl : public ConfigItem { m_eMenuIcons = eState; SetModified(); - for ( ::std::list<Link<>>::const_iterator iter = aList.begin(); iter != aList.end(); ++iter ) - iter->Call( this ); + for ( ::std::list<Link<LinkParamNone*,void>>::const_iterator iter = aList.begin(); iter != aList.end(); ++iter ) + iter->Call( nullptr ); // tdf#93451: don't Commit() here, it's too early } @@ -285,8 +285,8 @@ void SvtMenuOptions_Impl::Notify( const Sequence< OUString >& seqPropertyNames ) if ( bMenuSettingsChanged ) m_eMenuIcons = bSystemMenuIcons ? TRISTATE_INDET : static_cast<TriState>(bMenuIcons); - for ( ::std::list<Link<>>::const_iterator iter = aList.begin(); iter != aList.end(); ++iter ) - iter->Call( this ); + for ( ::std::list<Link<LinkParamNone*,void>>::const_iterator iter = aList.begin(); iter != aList.end(); ++iter ) + iter->Call( nullptr ); } @@ -347,21 +347,14 @@ Sequence< OUString > SvtMenuOptions_Impl::impl_GetPropertyNames() return seqPropertyNames; } -void SvtMenuOptions_Impl::AddListenerLink( const Link<>& rLink ) +void SvtMenuOptions_Impl::AddListenerLink( const Link<LinkParamNone*,void>& rLink ) { aList.push_back( rLink ); } -void SvtMenuOptions_Impl::RemoveListenerLink( const Link<>& rLink ) +void SvtMenuOptions_Impl::RemoveListenerLink( const Link<LinkParamNone*,void>& rLink ) { - for ( ::std::list<Link<>>::iterator iter = aList.begin(); iter != aList.end(); ++iter ) - { - if ( *iter == rLink ) - { - aList.erase(iter); - break; - } - } + aList.erase(std::remove(aList.begin(), aList.end(), rLink), aList.end()); } @@ -460,12 +453,12 @@ Mutex& SvtMenuOptions::GetOwnStaticMutex() return *pMutex; } -void SvtMenuOptions::AddListenerLink( const Link<>& rLink ) +void SvtMenuOptions::AddListenerLink( const Link<LinkParamNone*,void>& rLink ) { m_pDataContainer->AddListenerLink( rLink ); } -void SvtMenuOptions::RemoveListenerLink( const Link<>& rLink ) +void SvtMenuOptions::RemoveListenerLink( const Link<LinkParamNone*,void>& rLink ) { m_pDataContainer->RemoveListenerLink( rLink ); } |