summaryrefslogtreecommitdiff
path: root/vcl/win
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2021-12-17 22:42:53 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-12-19 11:19:12 +0100
commit3152f5a33e787e33ec0dfef8c75d7bbf95194c00 (patch)
treecc1049cdf9424a5891ca5e255374ef9ca0ff57f5 /vcl/win
parent729834abac1618aa2f0dcc6d774deb74f7c42bb3 (diff)
use more cppu::BaseMutex
Change-Id: Iddd7438161ead93b27cf8e8058ca5b1eae3d8001 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127075 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/win')
-rw-r--r--vcl/win/dtrans/globals.hxx5
-rw-r--r--vcl/win/dtrans/source.cxx2
-rw-r--r--vcl/win/dtrans/source.hxx3
-rw-r--r--vcl/win/dtrans/sourcecontext.cxx2
-rw-r--r--vcl/win/dtrans/sourcecontext.hxx3
-rw-r--r--vcl/win/dtrans/target.cxx4
-rw-r--r--vcl/win/dtrans/target.hxx3
7 files changed, 10 insertions, 12 deletions
diff --git a/vcl/win/dtrans/globals.hxx b/vcl/win/dtrans/globals.hxx
index 69e9f2d15597..9bb174d0b6b8 100644
--- a/vcl/win/dtrans/globals.hxx
+++ b/vcl/win/dtrans/globals.hxx
@@ -65,11 +65,6 @@ DWORD dndActionsToDropEffects(sal_Int8 actions);
// or Alt).
DWORD dndActionsToSingleDropEffect(sal_Int8 actions);
-struct MutexDummy
-{
- osl::Mutex m_mutex;
-};
-
extern css::uno::Reference<css::datatransfer::XTransferable> g_XTransferable;
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/win/dtrans/source.cxx b/vcl/win/dtrans/source.cxx
index fdbb295e33da..d8143a3791c9 100644
--- a/vcl/win/dtrans/source.cxx
+++ b/vcl/win/dtrans/source.cxx
@@ -51,7 +51,7 @@ using namespace com::sun::star::lang;
static unsigned __stdcall DndOleSTAFunc(LPVOID pParams);
DragSource::DragSource( const Reference<XComponentContext>& rxContext):
- WeakComponentImplHelper< XDragSource, XInitialization, XServiceInfo >(m_mutex),
+ WeakComponentImplHelper< XDragSource, XInitialization, XServiceInfo >(m_aMutex),
m_xContext( rxContext ),
// m_pcurrentContext_impl(0),
m_hAppWindow(nullptr),
diff --git a/vcl/win/dtrans/source.hxx b/vcl/win/dtrans/source.hxx
index 44244839869f..f2124932be79 100644
--- a/vcl/win/dtrans/source.hxx
+++ b/vcl/win/dtrans/source.hxx
@@ -23,6 +23,7 @@
#include <com/sun/star/datatransfer/dnd/XDragSourceContext.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
#include <osl/mutex.hxx>
+#include <cppuhelper/basemutex.hxx>
#include <cppuhelper/compbase.hxx>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include "globals.hxx"
@@ -43,7 +44,7 @@ class SourceContext;
// RIGHT MOUSE BUTTON drag and drop not supported currently.
// ALT modifier is considered to effect a user selection of effects
class DragSource:
- public MutexDummy,
+ public cppu::BaseMutex,
public WeakComponentImplHelper<XDragSource, XInitialization, XServiceInfo>,
public IDropSource
diff --git a/vcl/win/dtrans/sourcecontext.cxx b/vcl/win/dtrans/sourcecontext.cxx
index 8531fd8a1184..c0e6371c5b41 100644
--- a/vcl/win/dtrans/sourcecontext.cxx
+++ b/vcl/win/dtrans/sourcecontext.cxx
@@ -26,7 +26,7 @@ using namespace com::sun::star::datatransfer::dnd::DNDConstants;
SourceContext::SourceContext( DragSource* pSource,
const Reference<XDragSourceListener>& listener):
- WeakComponentImplHelper<XDragSourceContext>(m_mutex),
+ WeakComponentImplHelper<XDragSourceContext>(m_aMutex),
m_pDragSource( pSource),
m_dragSource( static_cast<XDragSource*>( m_pDragSource) )
{
diff --git a/vcl/win/dtrans/sourcecontext.hxx b/vcl/win/dtrans/sourcecontext.hxx
index 9bc9e273cc7f..b6ed4a90c906 100644
--- a/vcl/win/dtrans/sourcecontext.hxx
+++ b/vcl/win/dtrans/sourcecontext.hxx
@@ -20,6 +20,7 @@
#include <com/sun/star/datatransfer/dnd/XDragSourceContext.hpp>
#include <cppuhelper/compbase.hxx>
+#include <cppuhelper/basemutex.hxx>
#include "source.hxx"
@@ -35,7 +36,7 @@ using namespace ::com::sun::star::lang;
// currently.
// An instance of SourceContext only lives as long as the drag and drop
// operation lasts.
-class SourceContext : public MutexDummy, public WeakComponentImplHelper<XDragSourceContext>
+class SourceContext : public cppu::BaseMutex, public WeakComponentImplHelper<XDragSourceContext>
{
DragSource* m_pDragSource;
Reference<XDragSource> m_dragSource;
diff --git a/vcl/win/dtrans/target.cxx b/vcl/win/dtrans/target.cxx
index 8f48cd2d2bec..a4ad523e34ee 100644
--- a/vcl/win/dtrans/target.cxx
+++ b/vcl/win/dtrans/target.cxx
@@ -47,7 +47,7 @@ using namespace com::sun::star::datatransfer::dnd::DNDConstants;
DWORD WINAPI DndTargetOleSTAFunc(LPVOID pParams);
DropTarget::DropTarget( const Reference<XComponentContext>& rxContext):
- WeakComponentImplHelper<XInitialization,XDropTarget, XServiceInfo>(m_mutex),
+ WeakComponentImplHelper<XInitialization,XDropTarget, XServiceInfo>(m_aMutex),
m_hWnd( nullptr),
m_threadIdWindow(0),
m_threadIdTarget(0),
@@ -291,7 +291,7 @@ sal_Bool SAL_CALL DropTarget::isActive( )
void SAL_CALL DropTarget::setActive( sal_Bool _b )
{
- MutexGuard g(m_mutex);
+ MutexGuard g(m_aMutex);
m_bActive= _b;
}
diff --git a/vcl/win/dtrans/target.hxx b/vcl/win/dtrans/target.hxx
index 0e3da70d7e5c..36dcbc8c1141 100644
--- a/vcl/win/dtrans/target.hxx
+++ b/vcl/win/dtrans/target.hxx
@@ -23,6 +23,7 @@
#include <com/sun/star/datatransfer/dnd/DropTargetDragEnterEvent.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <cppuhelper/basemutex.hxx>
#include <cppuhelper/compbase.hxx>
#include <cppuhelper/interfacecontainer.hxx>
#include <osl/mutex.hxx>
@@ -49,7 +50,7 @@ using namespace ::com::sun::star::datatransfer::dnd;
// If the service calls OleInitialize then it also calls OleUnitialize when
// it is destroyed. Therefore no second instance may exist which was
// created in the same thread and still needs OLE.
-class DropTarget : public MutexDummy,
+class DropTarget : public cppu::BaseMutex,
public WeakComponentImplHelper<XInitialization, XDropTarget, XServiceInfo>
{