summaryrefslogtreecommitdiff
path: root/slideshow
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-02-23 11:08:36 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-02-24 07:12:50 +0000
commit336cebd61de9d2b0f07d246a772098d01c305c60 (patch)
treee2c57c9a0b4ffb90294c703b50475b1012b0df47 /slideshow
parent8b31341d9382b62d99a4c1f801d63d031a47ffc3 (diff)
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.grandin@collabora.co.uk>
Diffstat (limited to 'slideshow')
-rw-r--r--slideshow/source/engine/eventmultiplexer.cxx22
1 files changed, 9 insertions, 13 deletions
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!