diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2012-10-29 16:22:02 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-10-29 17:32:57 +0100 |
commit | d29818290376f10f318ba805a79643384b34986e (patch) | |
tree | 67ab94575c8bb775abe6ef08392085cd541450aa /sfx2/source/notify | |
parent | eebcaa02585bda0656ca1032082c4dd676de732d (diff) |
fdo#46808: Fix previous commit
Removing the xJobExecutor.is() check from
SfxGlobalEvents_Impl::implts_notifyJobExecution was wrong, as
m_xJobExecutorListener was a WeakReference. However, it appears there is no
good reason for the latter, so the situation can be corrected by turning it into
a plain Reference.
Change-Id: I5690d226b3e8fdd97f75a37502e600b460ec674c
Diffstat (limited to 'sfx2/source/notify')
-rw-r--r-- | sfx2/source/notify/eventsupplier.cxx | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/sfx2/source/notify/eventsupplier.cxx b/sfx2/source/notify/eventsupplier.cxx index 625fedbd5cfa..21b578b7146a 100644 --- a/sfx2/source/notify/eventsupplier.cxx +++ b/sfx2/source/notify/eventsupplier.cxx @@ -551,6 +551,7 @@ SFX_IMPL_ONEINSTANCEFACTORY( SfxGlobalEvents_Impl ); //----------------------------------------------------------------------------- SfxGlobalEvents_Impl::SfxGlobalEvents_Impl( const css::uno::Reference < css::uno::XComponentContext >& rxContext) : ModelCollectionMutexBase( ) + , m_xJobExecutorListener( css::task::JobExecutor::create( rxContext ), css::uno::UNO_QUERY_THROW ) , m_aLegacyListeners (m_aLock) , m_aDocumentListeners (m_aLock) , pImp (0 ) @@ -559,7 +560,6 @@ SfxGlobalEvents_Impl::SfxGlobalEvents_Impl( const css::uno::Reference < css::uno SFX_APP(); pImp = new GlobalEventConfig(); m_xEvents = pImp; - m_xJobExecutorListener = css::uno::Reference< css::document::XEventListener >( css::task::JobExecutor::create( rxContext ), css::uno::UNO_QUERY_THROW ); m_refCount--; } @@ -784,12 +784,7 @@ void SfxGlobalEvents_Impl::implts_notifyJobExecution(const css::document::EventO { try { - // SAFE -> - ::osl::ResettableMutexGuard aLock(m_aLock); - css::uno::Reference< css::document::XEventListener > xJobExecutor(m_xJobExecutorListener); - aLock.clear(); - // <- SAFE - xJobExecutor->notifyEvent(aEvent); + m_xJobExecutorListener->notifyEvent(aEvent); } catch(const css::uno::RuntimeException&) { throw; } |