summaryrefslogtreecommitdiff
path: root/unotools/source/config/options.cxx
diff options
context:
space:
mode:
authorMathias Bauer <mba@openoffice.org>2009-10-16 00:05:16 +0200
committerMathias Bauer <mba@openoffice.org>2009-10-16 00:05:16 +0200
commitad482351a6c12cddb06575f6a9a00ec1b72d92fb (patch)
treee97f35e966aef21423e70f325a66943664ed62a9 /unotools/source/config/options.cxx
parent9a4d0581c72653e60562d1b8e2121772d21f8a9e (diff)
#i103496#: split svtools; improve ConfitItems
Diffstat (limited to 'unotools/source/config/options.cxx')
-rw-r--r--unotools/source/config/options.cxx40
1 files changed, 22 insertions, 18 deletions
diff --git a/unotools/source/config/options.cxx b/unotools/source/config/options.cxx
index b4e9aec8c6dd..5bd2ed46f7ec 100644
--- a/unotools/source/config/options.cxx
+++ b/unotools/source/config/options.cxx
@@ -46,6 +46,7 @@ using utl::ConfigurationBroadcaster;
ConfigurationBroadcaster::ConfigurationBroadcaster()
: mpList(0)
, m_nBroadcastBlocked( 0 )
+, m_nBlockedHint( 0 )
{
}
@@ -67,39 +68,42 @@ void ConfigurationBroadcaster::RemoveListener( utl::ConfigurationListener* pList
mpList->Remove( pListener );
}
-void ConfigurationBroadcaster::NotifyListeners()
+void ConfigurationBroadcaster::NotifyListeners( sal_uInt32 nHint )
{
-// if ( m_nBroadcastBlocked )
-// m_nBlockedHint |= nHint;
-// else
- if (!m_nBroadcastBlocked)
+ if ( m_nBroadcastBlocked )
+ m_nBlockedHint |= nHint;
+ else
{
+ nHint |= m_nBlockedHint;
+ m_nBlockedHint = 0;
if ( mpList )
for ( sal_uInt32 n=0; n<mpList->Count(); n++ )
- mpList->GetObject(n)->ConfigurationChanged(this);
+ mpList->GetObject(n)->ConfigurationChanged( this, nHint );
}
}
-Options::Options()
+void ConfigurationBroadcaster::BlockBroadcasts( bool bBlock )
{
+ if ( bBlock )
+ ++m_nBroadcastBlocked;
+ else if ( m_nBroadcastBlocked )
+ {
+ if ( --m_nBroadcastBlocked == 0 )
+ NotifyListeners( 0 );
+ }
}
-Options::~Options()
+Options::Options()
{
}
-void Options::ConfigurationChanged( utl::ConfigurationBroadcaster* )
+Options::~Options()
{
- NotifyListeners();
}
-void ConfigurationBroadcaster::BlockBroadcasts( bool bBlock )
+void Options::ConfigurationChanged( ConfigurationBroadcaster* p, sal_uInt32 nHint )
{
- if ( bBlock )
- ++m_nBroadcastBlocked;
- else if ( m_nBroadcastBlocked )
- {
- if ( --m_nBroadcastBlocked == 0 )
- NotifyListeners();
- }
+ NotifyListeners( nHint );
}
+
+