summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2021-12-18 22:08:16 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-12-20 20:08:49 +0100
commita65d126a2f68c1a157d4eee1090620b82da6e575 (patch)
tree25ededb37762e62ba1c405f19b2416fa0373c8f2 /include
parent0aca74c0acc3e1c3f6099f47bfe9bfedfa7bf86d (diff)
use cppu::BaseMutex in TransportAsXWindow
because passing a ref of a local member to a parent class means passing uninitialised data Change-Id: Iec76a614d99f16b34f0fd5208a7f074153d57003 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127120 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include')
-rw-r--r--include/vcl/weldutils.hxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/include/vcl/weldutils.hxx b/include/vcl/weldutils.hxx
index a9dfa3624f7b..a11ab6c9f283 100644
--- a/include/vcl/weldutils.hxx
+++ b/include/vcl/weldutils.hxx
@@ -16,6 +16,7 @@
#include <com/sun/star/frame/XStatusListener.hpp>
#include <com/sun/star/uno/Reference.hxx>
#include <comphelper/interfacecontainer2.hxx>
+#include <cppuhelper/basemutex.hxx>
#include <cppuhelper/compbase.hxx>
#include <tools/time.hxx>
#include <vcl/dllapi.h>
@@ -35,10 +36,9 @@ namespace weld
{
typedef cppu::WeakComponentImplHelper<css::awt::XWindow> TransportAsXWindow_Base;
-class VCL_DLLPUBLIC TransportAsXWindow : public TransportAsXWindow_Base
+class VCL_DLLPUBLIC TransportAsXWindow : public cppu::BaseMutex, public TransportAsXWindow_Base
{
private:
- osl::Mutex m_aHelperMtx;
weld::Widget* m_pWeldWidget;
weld::Builder* m_pWeldWidgetBuilder;
@@ -51,15 +51,15 @@ private:
public:
TransportAsXWindow(weld::Widget* pWeldWidget, weld::Builder* pWeldWidgetBuilder = nullptr)
- : TransportAsXWindow_Base(m_aHelperMtx)
+ : TransportAsXWindow_Base(m_aMutex)
, m_pWeldWidget(pWeldWidget)
, m_pWeldWidgetBuilder(pWeldWidgetBuilder)
- , m_aWindowListeners(m_aHelperMtx)
- , m_aKeyListeners(m_aHelperMtx)
- , m_aFocusListeners(m_aHelperMtx)
- , m_aMouseListeners(m_aHelperMtx)
- , m_aMotionListeners(m_aHelperMtx)
- , m_aPaintListeners(m_aHelperMtx)
+ , m_aWindowListeners(m_aMutex)
+ , m_aKeyListeners(m_aMutex)
+ , m_aFocusListeners(m_aMutex)
+ , m_aMouseListeners(m_aMutex)
+ , m_aMotionListeners(m_aMutex)
+ , m_aPaintListeners(m_aMutex)
{
}