diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2017-12-04 21:57:42 +0100 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2017-12-05 07:01:53 +0100 |
commit | 102f257ee007aecaccbf1370a3c89104d87fe43f (patch) | |
tree | 630b4e47837575ee65be3a1ac9e1fcf514a04798 /sw/source/uibase/dbui/maildispatcher.cxx | |
parent | 1c893292849bf699f3c9411461248f67fa35d027 (diff) |
Replace list by vector for MailDispatcherListenerContainer_t (sw)
Change-Id: Iac66ae6cb9f95133ef705850c246309db41872dc
Reviewed-on: https://gerrit.libreoffice.org/45826
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'sw/source/uibase/dbui/maildispatcher.cxx')
-rw-r--r-- | sw/source/uibase/dbui/maildispatcher.cxx | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/sw/source/uibase/dbui/maildispatcher.cxx b/sw/source/uibase/dbui/maildispatcher.cxx index 89678bc34529..ae789beb30c5 100644 --- a/sw/source/uibase/dbui/maildispatcher.cxx +++ b/sw/source/uibase/dbui/maildispatcher.cxx @@ -27,7 +27,7 @@ using namespace ::com::sun::star; -typedef std::list< ::rtl::Reference<IMailDispatcherListener> > MailDispatcherListenerContainer_t; +typedef std::vector< ::rtl::Reference<IMailDispatcherListener> > MailDispatcherListenerContainer_t; namespace /* private */ { @@ -153,8 +153,8 @@ void MailDispatcher::start() m_aWakeupCondition.set(); thread_status_guard.clear(); - MailDispatcherListenerContainer_t aClonedListenerList(cloneListener()); - std::for_each( aClonedListenerList.begin(), aClonedListenerList.end(), + MailDispatcherListenerContainer_t aClonedListenerVector(cloneListener()); + std::for_each( aClonedListenerVector.begin(), aClonedListenerVector.end(), GenericEventNotifier(&IMailDispatcherListener::started, this) ); } } @@ -173,8 +173,8 @@ void MailDispatcher::stop() m_aWakeupCondition.reset(); thread_status_guard.clear(); - MailDispatcherListenerContainer_t aClonedListenerList(cloneListener()); - std::for_each( aClonedListenerList.begin(), aClonedListenerList.end(), + MailDispatcherListenerContainer_t aClonedListenerVector(cloneListener()); + std::for_each( aClonedListenerVector.begin(), aClonedListenerVector.end(), GenericEventNotifier(&IMailDispatcherListener::stopped, this) ); } } @@ -195,13 +195,13 @@ void MailDispatcher::addListener(::rtl::Reference<IMailDispatcherListener> const OSL_PRECOND(!m_bShutdownRequested, "MailDispatcher thread is shuting down already"); ::osl::MutexGuard guard( m_aListenerContainerMutex ); - m_aListenerList.push_back( listener ); + m_aListenerVector.push_back( listener ); } -std::list< ::rtl::Reference<IMailDispatcherListener> > MailDispatcher::cloneListener() +std::vector< ::rtl::Reference<IMailDispatcherListener> > MailDispatcher::cloneListener() { ::osl::MutexGuard guard( m_aListenerContainerMutex ); - return m_aListenerList; + return m_aListenerVector; } void MailDispatcher::sendMailMessageNotifyListener(uno::Reference<mail::XMailMessage> const & message) @@ -209,20 +209,20 @@ void MailDispatcher::sendMailMessageNotifyListener(uno::Reference<mail::XMailMes try { m_xMailserver->sendMailMessage( message ); - MailDispatcherListenerContainer_t aClonedListenerList(cloneListener()); - std::for_each( aClonedListenerList.begin(), aClonedListenerList.end(), + MailDispatcherListenerContainer_t aClonedListenerVector(cloneListener()); + std::for_each( aClonedListenerVector.begin(), aClonedListenerVector.end(), MailDeliveryNotifier(this, message) ); } catch (const mail::MailException& ex) { - MailDispatcherListenerContainer_t aClonedListenerList(cloneListener()); - std::for_each( aClonedListenerList.begin(), aClonedListenerList.end(), + MailDispatcherListenerContainer_t aClonedListenerVector(cloneListener()); + std::for_each( aClonedListenerVector.begin(), aClonedListenerVector.end(), MailDeliveryErrorNotifier(this, message, ex.Message) ); } catch (const uno::RuntimeException& ex) { - MailDispatcherListenerContainer_t aClonedListenerList(cloneListener()); - std::for_each( aClonedListenerList.begin(), aClonedListenerList.end(), + MailDispatcherListenerContainer_t aClonedListenerVector(cloneListener()); + std::for_each( aClonedListenerVector.begin(), aClonedListenerVector.end(), MailDeliveryErrorNotifier(this, message, ex.Message) ); } } |