summaryrefslogtreecommitdiff
path: root/forms/source
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2006-03-14 09:58:21 +0000
committerVladimir Glazounov <vg@openoffice.org>2006-03-14 09:58:21 +0000
commit668da511e188fe9fe4dfef5abd7c3aa4567fd71f (patch)
tree681858d6c7d3f579f37aa53a070a45e1e012a68a /forms/source
parent8baf41bf15fb3c94bcbc89f78e3b47568171a055 (diff)
INTEGRATION: CWS pbrwuno (1.40.14); FILE MERGED
2006/02/09 15:45:29 fs 1.40.14.4: RESYNC: (1.40-1.41); FILE MERGED 2005/10/19 08:26:24 fs 1.40.14.3: make IEventProcessor ref-counted 2005/10/17 12:20:14 fs 1.40.14.2: removed some obsolete includes 2005/10/07 12:21:39 fs 1.40.14.1: AsyncEventNotifier was reworked in the course of #i53095#, adjusted the usage
Diffstat (limited to 'forms/source')
-rw-r--r--forms/source/component/ListBox.cxx34
1 files changed, 15 insertions, 19 deletions
diff --git a/forms/source/component/ListBox.cxx b/forms/source/component/ListBox.cxx
index 7a383e172c4d..0983653756a7 100644
--- a/forms/source/component/ListBox.cxx
+++ b/forms/source/component/ListBox.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: ListBox.cxx,v $
*
- * $Revision: 1.41 $
+ * $Revision: 1.42 $
*
- * last change: $Author: obo $ $Date: 2005-12-21 13:22:29 $
+ * last change: $Author: vg $ $Date: 2006-03-14 10:58:21 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -68,9 +68,6 @@
#ifndef _COMPHELPER_CONTAINER_HXX_
#include <comphelper/container.hxx>
#endif
-#ifndef _COMPHELPER_DATETIME_HXX_
-#include <comphelper/datetime.hxx>
-#endif
#ifndef _COMPHELPER_NUMBERS_HXX_
#include <comphelper/numbers.hxx>
#endif
@@ -226,7 +223,7 @@ namespace frm
//==================================================================
//= ItemEvent
//==================================================================
- typedef ::comphelper::EventObjectHolder< ItemEvent > ItemEventDescription;
+ typedef ::comphelper::EventHolder< ItemEvent > ItemEventDescription;
//==================================================================
//= OListBoxModel
@@ -1675,13 +1672,12 @@ namespace frm
::osl::MutexGuard aGuard( m_aMutex );
if ( !m_pItemListeners->empty() )
{
- if ( !m_pItemBroadcaster )
+ if ( !m_pItemBroadcaster.is() )
{
- m_pItemBroadcaster = new ::comphelper::AsyncEventNotifier( this );
- m_pItemBroadcaster->acquire();
+ m_pItemBroadcaster.set( new ::comphelper::AsyncEventNotifier );
m_pItemBroadcaster->create();
}
- m_pItemBroadcaster->addEvent( new ItemEventDescription( _rEvent, 0 ) );
+ m_pItemBroadcaster->addEvent( new ItemEventDescription( _rEvent ), this );
}
}
@@ -1764,9 +1760,9 @@ namespace frm
{
::osl::MutexGuard aGuard( m_aMutex );
- if ( m_pItemBroadcaster )
+ if ( m_pItemBroadcaster.is() )
{
- m_pItemBroadcaster->release();
+ m_pItemBroadcaster->removeEventsForProcessor( this );
m_pItemBroadcaster = NULL;
}
}
@@ -1775,19 +1771,19 @@ namespace frm
}
//------------------------------------------------------------------------------
- void OListBoxControl::processEvent( const EventDescription& _rEvent )
+ void OListBoxControl::processEvent( const AnyEvent& _rEvent )
{
+ Reference< XListBox > xKeepAlive( this );
+ {
+ ::osl::MutexGuard aGuard( m_aMutex );
+ if ( OComponentHelper::rBHelper.bDisposed )
+ return;
+ }
const ItemEventDescription& rItemEvent = static_cast< const ItemEventDescription& >( _rEvent );
m_pItemListeners->itemStateChanged( rItemEvent.getEventObject() );
}
//------------------------------------------------------------------------------
- Reference< XComponent > OListBoxControl::getComponent()
- {
- return Reference< XComponent >( queryInterface( XComponent::static_type() ), UNO_QUERY );
- }
-
- //------------------------------------------------------------------------------
IMPL_LINK(OListBoxControl, OnTimeout, void*, EMPTYTAG)
{
return m_pChangeListeners->notify();