diff options
author | Mathias Bauer <mba@openoffice.org> | 2009-10-12 11:49:13 +0200 |
---|---|---|
committer | Mathias Bauer <mba@openoffice.org> | 2009-10-12 11:49:13 +0200 |
commit | 9a4d0581c72653e60562d1b8e2121772d21f8a9e (patch) | |
tree | c6c31d21be1d0489ecec6d49496d45cc4ebdfb50 /unotools/source/config/options.cxx | |
parent | e0cea8e136b36724c6b1298e6546a4dbb8f09d00 (diff) |
#i103496#: move SysLocale stuff to unotools
Diffstat (limited to 'unotools/source/config/options.cxx')
-rw-r--r-- | unotools/source/config/options.cxx | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/unotools/source/config/options.cxx b/unotools/source/config/options.cxx index eba75b347edf..b4e9aec8c6dd 100644 --- a/unotools/source/config/options.cxx +++ b/unotools/source/config/options.cxx @@ -45,6 +45,7 @@ using utl::ConfigurationBroadcaster; ConfigurationBroadcaster::ConfigurationBroadcaster() : mpList(0) +, m_nBroadcastBlocked( 0 ) { } @@ -68,9 +69,15 @@ void ConfigurationBroadcaster::RemoveListener( utl::ConfigurationListener* pList void ConfigurationBroadcaster::NotifyListeners() { - if ( mpList ) - for ( sal_uInt32 n=0; n<mpList->Count(); n++ ) - mpList->GetObject(n)->ConfigurationChanged(this); +// if ( m_nBroadcastBlocked ) +// m_nBlockedHint |= nHint; +// else + if (!m_nBroadcastBlocked) + { + if ( mpList ) + for ( sal_uInt32 n=0; n<mpList->Count(); n++ ) + mpList->GetObject(n)->ConfigurationChanged(this); + } } Options::Options() @@ -86,3 +93,13 @@ void Options::ConfigurationChanged( utl::ConfigurationBroadcaster* ) NotifyListeners(); } +void ConfigurationBroadcaster::BlockBroadcasts( bool bBlock ) +{ + if ( bBlock ) + ++m_nBroadcastBlocked; + else if ( m_nBroadcastBlocked ) + { + if ( --m_nBroadcastBlocked == 0 ) + NotifyListeners(); + } +} |