summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-01-21 09:10:08 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-01-21 13:44:57 +0100
commit4304947164bbcd3fea758df491a730b01d578be2 (patch)
tree996401cf2095022d79e2459fdc0cfc9168c674dd
parent47f21d290087638b1986c291c969bf2997574ddd (diff)
fix opengl slide transition
regression from commit 62efb188668a3296591dcfa3658185e2f982e356 use comphelper::WeakComponentImplHelper in SlideShowVie Switch notifyEach to leave the mutex locked after being called, because that seems to compose better - because after a call it is in the same state that was when we entered the call. Change-Id: I42e80cc7be1b65ed8cab24ab7c11210e056d916d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128723 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--comphelper/source/misc/instancelocker.cxx1
-rw-r--r--include/comphelper/interfacecontainer4.hxx2
-rw-r--r--sfx2/source/notify/globalevents.cxx2
-rw-r--r--svl/source/fsstor/oinputstreamcontainer.cxx1
-rw-r--r--svl/source/fsstor/ostreamcontainer.cxx1
-rw-r--r--svx/source/dialog/ctredlin.cxx2
-rw-r--r--sw/source/core/unocore/unochart.cxx2
-rw-r--r--sw/source/core/unocore/unotbl.cxx1
-rw-r--r--ucbhelper/source/provider/resultset.cxx2
9 files changed, 3 insertions, 11 deletions
diff --git a/comphelper/source/misc/instancelocker.cxx b/comphelper/source/misc/instancelocker.cxx
index 347ff513cb6e..2b1e89604e6a 100644
--- a/comphelper/source/misc/instancelocker.cxx
+++ b/comphelper/source/misc/instancelocker.cxx
@@ -72,7 +72,6 @@ void SAL_CALL OInstanceLocker::dispose()
lang::EventObject aSource( static_cast< ::cppu::OWeakObject* >(this) );
m_aListenersContainer.disposeAndClear( aGuard, aSource );
- aGuard.lock();
if ( m_xLockListener.is() )
{
auto tmp = std::move(m_xLockListener);
diff --git a/include/comphelper/interfacecontainer4.hxx b/include/comphelper/interfacecontainer4.hxx
index 1df8f47776eb..04b949575e7a 100644
--- a/include/comphelper/interfacecontainer4.hxx
+++ b/include/comphelper/interfacecontainer4.hxx
@@ -272,7 +272,6 @@ inline void OInterfaceContainerHelper4<T>::forEach(std::unique_lock<std::mutex>&
{
if (std::as_const(maData)->size() == 0)
{
- rGuard.unlock(); // code depends on the guard being unlocked after return
return;
}
maData.make_unique(); // so we can iterate over the data without holding the lock
@@ -374,6 +373,7 @@ void OInterfaceContainerHelper4<ListenerT>::disposeAndClear(std::unique_lock<std
// there is no way to delegate the error to the caller :o(.
}
}
+ rGuard.lock();
}
template <class ListenerT>
diff --git a/sfx2/source/notify/globalevents.cxx b/sfx2/source/notify/globalevents.cxx
index 17719f992341..75ae422747b1 100644
--- a/sfx2/source/notify/globalevents.cxx
+++ b/sfx2/source/notify/globalevents.cxx
@@ -257,7 +257,6 @@ void SfxGlobalEvents_Impl::dispose() {
tmpModels.clear();
g.lock();
m_aLegacyListeners.disposeAndClear(g, {static_cast<OWeakObject *>(this)});
- g.lock(); // because disposeAndClear is going to want to unlock()
m_aDocumentListeners.disposeAndClear(g, {static_cast<OWeakObject *>(this)});
}
for (auto const & i: listeners) {
@@ -487,7 +486,6 @@ void SfxGlobalEvents_Impl::implts_notifyListener(const document::DocumentEvent&
xListener->notifyEvent(aLegacyEvent);
}
);
- g.lock();
m_aDocumentListeners.forEach(g,
[&aEvent](const css::uno::Reference<document::XDocumentEventListener>& xListener)
{
diff --git a/svl/source/fsstor/oinputstreamcontainer.cxx b/svl/source/fsstor/oinputstreamcontainer.cxx
index a2dc0456a84c..f6481b76ff28 100644
--- a/svl/source/fsstor/oinputstreamcontainer.cxx
+++ b/svl/source/fsstor/oinputstreamcontainer.cxx
@@ -232,7 +232,6 @@ void SAL_CALL OFSInputStreamContainer::dispose( )
lang::EventObject aSource( static_cast< ::cppu::OWeakObject*>( this ) );
m_aListenersContainer.disposeAndClear( aGuard, aSource );
- aGuard.lock();
m_bDisposed = true;
}
diff --git a/svl/source/fsstor/ostreamcontainer.cxx b/svl/source/fsstor/ostreamcontainer.cxx
index d8ef930f7e98..e02ce1383df9 100644
--- a/svl/source/fsstor/ostreamcontainer.cxx
+++ b/svl/source/fsstor/ostreamcontainer.cxx
@@ -227,7 +227,6 @@ void SAL_CALL OFSStreamContainer::dispose()
lang::EventObject aSource( static_cast< ::cppu::OWeakObject*>( this ) );
m_aListenersContainer.disposeAndClear( aGuard, aSource );
- aGuard.lock();
m_bDisposed = true;
}
diff --git a/svx/source/dialog/ctredlin.cxx b/svx/source/dialog/ctredlin.cxx
index 78b9974ec05d..02046957ae5b 100644
--- a/svx/source/dialog/ctredlin.cxx
+++ b/svx/source/dialog/ctredlin.cxx
@@ -1007,6 +1007,8 @@ SvxAcceptChgCtr::SvxAcceptChgCtr(weld::Container* pParent, weld::Window* pDialog
SvxAcceptChgCtr::~SvxAcceptChgCtr()
{
+ m_xTPFilter.reset();
+ m_xTPView.reset();
}
void SvxAcceptChgCtr::ShowFilterPage()
diff --git a/sw/source/core/unocore/unochart.cxx b/sw/source/core/unocore/unochart.cxx
index 02984b804866..fed1706cad5e 100644
--- a/sw/source/core/unocore/unochart.cxx
+++ b/sw/source/core/unocore/unochart.cxx
@@ -2270,7 +2270,6 @@ void SAL_CALL SwChartDataSequence::dispose( )
lang::EventObject aEvtObj( static_cast< chart2::data::XDataSequence * >(this) );
std::unique_lock aGuard( GetChartMutex() );
m_aModifyListeners.disposeAndClear( aGuard, aEvtObj );
- aGuard.lock();
m_aEvtListeners.disposeAndClear( aGuard, aEvtObj );
}
@@ -2685,7 +2684,6 @@ void SAL_CALL SwChartLabeledDataSequence::dispose( )
lang::EventObject aEvtObj( static_cast< chart2::data::XLabeledDataSequence * >(this) );
std::unique_lock aGuard( GetChartMutex() );
m_aModifyListeners.disposeAndClear( aGuard, aEvtObj );
- aGuard.lock();
m_aEventListeners.disposeAndClear( aGuard, aEvtObj );
}
}
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx
index 7680b458176d..4723379f0024 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -3080,7 +3080,6 @@ void SwXTextTable::Impl::Notify(const SfxHint& rHint)
lang::EventObject const ev(xThis);
std::unique_lock aGuard(m_Mutex);
m_EventListeners.disposeAndClear(aGuard, ev);
- aGuard.lock();
m_ChartListeners.disposeAndClear(aGuard, ev);
}
else
diff --git a/ucbhelper/source/provider/resultset.cxx b/ucbhelper/source/provider/resultset.cxx
index c3565b1179f0..bd253295cfda 100644
--- a/ucbhelper/source/provider/resultset.cxx
+++ b/ucbhelper/source/provider/resultset.cxx
@@ -241,7 +241,6 @@ void SAL_CALL ResultSet::dispose()
lang::EventObject aEvt;
aEvt.Source = static_cast< lang::XComponent * >( this );
m_pImpl->m_aDisposeEventListeners.disposeAndClear( aGuard, aEvt );
- aGuard.lock();
}
if ( m_pImpl->m_pPropertyChangeListeners )
@@ -249,7 +248,6 @@ void SAL_CALL ResultSet::dispose()
lang::EventObject aEvt;
aEvt.Source = static_cast< beans::XPropertySet * >( this );
m_pImpl->m_pPropertyChangeListeners->disposeAndClear( aGuard, aEvt );
- aGuard.lock();
}
m_pImpl->m_xDataSupplier->close();