diff options
author | Joseph Powers <jpowers27@cox.net> | 2011-02-16 07:15:00 -0800 |
---|---|---|
committer | Joseph Powers <jpowers27@cox.net> | 2011-02-16 07:15:00 -0800 |
commit | 58522fa86275ab2671314464d18bf706b9ee1797 (patch) | |
tree | d90ef496b68c61e5e432d6369d109818a4e955f5 /unotools/source/config/options.cxx | |
parent | cfbd6e5967bf502e368c80c36be9af0a922c4786 (diff) |
Remove DECLARE_LIST( IMPL_ConfigurationListenerList, ConfigurationListener* )
Diffstat (limited to 'unotools/source/config/options.cxx')
-rw-r--r-- | unotools/source/config/options.cxx | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/unotools/source/config/options.cxx b/unotools/source/config/options.cxx index e8b5ad40bebd..5eee90dd28d9 100644 --- a/unotools/source/config/options.cxx +++ b/unotools/source/config/options.cxx @@ -30,14 +30,8 @@ #include "precompiled_unotools.hxx" #include "sal/config.h" -#include <tools/list.hxx> #include <unotools/options.hxx> -namespace utl -{ - DECLARE_LIST( IMPL_ConfigurationListenerList, ConfigurationListener* ) -} - using utl::detail::Options; using utl::ConfigurationBroadcaster; @@ -57,13 +51,22 @@ void ConfigurationBroadcaster::AddListener( utl::ConfigurationListener* pListene { if ( !mpList ) mpList = new IMPL_ConfigurationListenerList; - mpList->Insert( pListener ); + mpList->push_back( pListener ); } void ConfigurationBroadcaster::RemoveListener( utl::ConfigurationListener* pListener ) { - if ( mpList ) - mpList->Remove( pListener ); + if ( mpList ) { + for ( IMPL_ConfigurationListenerList::iterator it = mpList->begin(); + it < mpList->end(); + ++it + ) { + if ( *it == pListener ) { + mpList->erase( it ); + break; + } + } + } } void ConfigurationBroadcaster::NotifyListeners( sal_uInt32 nHint ) @@ -74,9 +77,11 @@ void ConfigurationBroadcaster::NotifyListeners( sal_uInt32 nHint ) { nHint |= m_nBlockedHint; m_nBlockedHint = 0; - if ( mpList ) - for ( sal_uInt32 n=0; n<mpList->Count(); n++ ) - mpList->GetObject(n)->ConfigurationChanged( this, nHint ); + if ( mpList ) { + for ( size_t n = 0; n < mpList->size(); n++ ) { + (*mpList)[ n ]->ConfigurationChanged( this, nHint ); + } + } } } |