diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2012-02-23 10:37:09 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-02-23 10:47:37 +0100 |
commit | 2eaa1422a032d6a7ffc72a2abeb3dd3e6248a263 (patch) | |
tree | a8a618394c09b21cd189a4f9f221557dc5fc628a /forms | |
parent | 40d21ab3c75a7c18de940162563015ae80136709 (diff) |
Adapted AsyncEventNotifier to safer-to-use salhelper::Thread
Diffstat (limited to 'forms')
-rw-r--r-- | forms/Library_frm.mk | 1 | ||||
-rw-r--r-- | forms/prj/build.lst | 2 | ||||
-rw-r--r-- | forms/source/component/ListBox.cxx | 11 |
3 files changed, 10 insertions, 4 deletions
diff --git a/forms/Library_frm.mk b/forms/Library_frm.mk index f6558ef2f9a0..f38dd3bd2701 100644 --- a/forms/Library_frm.mk +++ b/forms/Library_frm.mk @@ -47,6 +47,7 @@ $(eval $(call gb_Library_add_linked_libs,frm,\ editeng \ i18nisolang1 \ sal \ + salhelper \ sfx \ svl \ svt \ diff --git a/forms/prj/build.lst b/forms/prj/build.lst index 131e8e406034..599b6c7de5e7 100644 --- a/forms/prj/build.lst +++ b/forms/prj/build.lst @@ -1,4 +1,4 @@ -fm forms : TRANSLATIONS:translations oovbaapi svx sfx2 QADEVOOO:qadevOOo LIBXSLT:libxslt NULL +fm forms : TRANSLATIONS:translations oovbaapi salhelper svx sfx2 QADEVOOO:qadevOOo LIBXSLT:libxslt NULL fm forms usr1 - all fm_mkofrm NULL fm forms\prj nmake - all fm_prj NULL diff --git a/forms/source/component/ListBox.cxx b/forms/source/component/ListBox.cxx index eb8c6c9b037b..5dbf8a857f56 100644 --- a/forms/source/component/ListBox.cxx +++ b/forms/source/component/ListBox.cxx @@ -1528,7 +1528,6 @@ namespace frm :OBoundControl( _rxFactory, VCL_CONTROL_LISTBOX, sal_False ) ,m_aChangeListeners( m_aMutex ) ,m_aItemListeners( m_aMutex ) - ,m_pItemBroadcaster( NULL ) { DBG_CTOR(OListBoxControl,NULL); @@ -1614,8 +1613,9 @@ namespace frm { if ( !m_pItemBroadcaster.is() ) { - m_pItemBroadcaster.set( new ::comphelper::AsyncEventNotifier ); - m_pItemBroadcaster->create(); + m_pItemBroadcaster.set( + new ::comphelper::AsyncEventNotifier("ListBox")); + m_pItemBroadcaster->launch(); } m_pItemBroadcaster->addEvent( new ItemEventDescription( _rEvent ), this ); } @@ -1701,15 +1701,20 @@ namespace frm m_aChangeListeners.disposeAndClear( aEvent ); m_aItemListeners.disposeAndClear( aEvent ); + rtl::Reference< comphelper::AsyncEventNotifier > t; { ::osl::MutexGuard aGuard( m_aMutex ); if ( m_pItemBroadcaster.is() ) { + t = m_pItemBroadcaster; m_pItemBroadcaster->removeEventsForProcessor( this ); m_pItemBroadcaster->terminate(); m_pItemBroadcaster = NULL; } } + if (t.is()) { + t->join(); + } OBoundControl::disposing(); } |