slideshow/source/engine/eventmultiplexer.cxx | 22 +++++++++------------- svx/inc/AccessibleTableShape.hxx | 3 +-- 2 files changed, 10 insertions(+), 15 deletions(-)
New commits: commit afdee56418182b7250eb61269dd26cbacc56f87f Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Thu Feb 23 15:44:16 2023 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Fri Feb 24 07:13:01 2023 +0000 BaseMutex in AccessibleTableHeaderShape is unused Change-Id: I1ec01aa72446891aaacd9309ea6c67cc323b0d32 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147588 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/svx/inc/AccessibleTableShape.hxx b/svx/inc/AccessibleTableShape.hxx index 12d7756e924b..1a13ec36e610 100644 --- a/svx/inc/AccessibleTableShape.hxx +++ b/svx/inc/AccessibleTableShape.hxx @@ -142,8 +142,7 @@ typedef ::cppu::WeakImplHelper< css::accessibility::XAccessibleTableSelection > AccessibleTableHeaderShape_BASE; -class AccessibleTableHeaderShape final : public cppu::BaseMutex, - public AccessibleTableHeaderShape_BASE +class AccessibleTableHeaderShape final : public AccessibleTableHeaderShape_BASE { public: // bRow, true means rowheader, false means columnheader commit 336cebd61de9d2b0f07d246a772098d01c305c60 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Thu Feb 23 11:08:36 2023 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Fri Feb 24 07:12:50 2023 +0000 BaseMutex->std::mutex in slideshow::EventMultiplexerListener Change-Id: Icdb38eb85a93cc285489372bbd80605bfcd36249 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147582 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/slideshow/source/engine/eventmultiplexer.cxx b/slideshow/source/engine/eventmultiplexer.cxx index 022db58f8d3c..4921f6aff8fb 100644 --- a/slideshow/source/engine/eventmultiplexer.cxx +++ b/slideshow/source/engine/eventmultiplexer.cxx @@ -21,8 +21,7 @@ #include <comphelper/diagnose_ex.hxx> #include <rtl/ref.hxx> -#include <cppuhelper/compbase.hxx> -#include <cppuhelper/basemutex.hxx> +#include <comphelper/compbase.hxx> #include <com/sun/star/awt/XMouseListener.hpp> #include <com/sun/star/awt/XMouseMotionListener.hpp> @@ -161,7 +160,7 @@ public: } -typedef cppu::WeakComponentImplHelper< +typedef comphelper::WeakComponentImplHelper< awt::XMouseListener, awt::XMouseMotionListener > Listener_UnoBase; @@ -173,13 +172,11 @@ namespace { XSlideViews, and passes on the events to the EventMultiplexer (via EventQueue indirection, to force the events into the main thread) */ -class EventMultiplexerListener : private cppu::BaseMutex, - public Listener_UnoBase +class EventMultiplexerListener : public Listener_UnoBase { public: EventMultiplexerListener( EventQueue& rEventQueue, EventMultiplexerImpl& rEventMultiplexer ) : - Listener_UnoBase( m_aMutex ), mpEventQueue( &rEventQueue ), mpEventMultiplexer( &rEventMultiplexer ) { @@ -189,7 +186,7 @@ public: EventMultiplexerListener& operator=( const EventMultiplexerListener& ) = delete; // WeakComponentImplHelperBase::disposing - virtual void SAL_CALL disposing() override; + virtual void disposing(std::unique_lock<std::mutex>& rGuard) override; private: virtual void SAL_CALL disposing( const lang::EventObject& Source ) override; @@ -362,9 +359,8 @@ struct EventMultiplexerImpl }; -void SAL_CALL EventMultiplexerListener::disposing() +void EventMultiplexerListener::disposing(std::unique_lock<std::mutex>& /*rGuard*/) { - osl::MutexGuard const guard( m_aMutex ); mpEventQueue = nullptr; mpEventMultiplexer = nullptr; } @@ -384,7 +380,7 @@ void SAL_CALL EventMultiplexerListener::disposing( void SAL_CALL EventMultiplexerListener::mousePressed( const awt::MouseEvent& e ) { - osl::MutexGuard const guard( m_aMutex ); + std::unique_lock const guard( m_aMutex ); // notify mouse press. Don't call handlers directly, this // might not be the main thread! @@ -399,7 +395,7 @@ void SAL_CALL EventMultiplexerListener::mousePressed( void SAL_CALL EventMultiplexerListener::mouseReleased( const awt::MouseEvent& e ) { - osl::MutexGuard const guard( m_aMutex ); + std::unique_lock const guard( m_aMutex ); // notify mouse release. Don't call handlers directly, // this might not be the main thread! @@ -427,7 +423,7 @@ void SAL_CALL EventMultiplexerListener::mouseExited( void SAL_CALL EventMultiplexerListener::mouseDragged( const awt::MouseEvent& e ) { - osl::MutexGuard const guard( m_aMutex ); + std::unique_lock const guard( m_aMutex ); // notify mouse drag. Don't call handlers directly, this // might not be the main thread! @@ -442,7 +438,7 @@ void SAL_CALL EventMultiplexerListener::mouseDragged( void SAL_CALL EventMultiplexerListener::mouseMoved( const awt::MouseEvent& e ) { - osl::MutexGuard const guard( m_aMutex ); + std::unique_lock const guard( m_aMutex ); // notify mouse move. Don't call handlers directly, this // might not be the main thread!