summaryrefslogtreecommitdiff
path: root/UnoControls
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 /UnoControls
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 'UnoControls')
-rw-r--r--UnoControls/inc/basecontrol.hxx9
-rw-r--r--UnoControls/source/base/basecontrol.cxx3
2 files changed, 3 insertions, 9 deletions
diff --git a/UnoControls/inc/basecontrol.hxx b/UnoControls/inc/basecontrol.hxx
index cba7eed36c38..a45f0ed6856f 100644
--- a/UnoControls/inc/basecontrol.hxx
+++ b/UnoControls/inc/basecontrol.hxx
@@ -27,6 +27,7 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <osl/mutex.hxx>
#include <cppuhelper/component.hxx>
+#include <cppuhelper/basemutex.hxx>
#include <rtl/ref.hxx>
namespace com::sun::star::uno { class XComponentContext; }
@@ -39,19 +40,13 @@ namespace unocontrols { class OMRCListenerMultiplexerHelper; }
namespace unocontrols {
-struct IMPL_MutexContainer
-{
- // Is necessary to initialize "BaseControl" and make this class thread-safe.
- ::osl::Mutex m_aMutex;
-};
-
class BaseControl : public css::lang::XServiceInfo
, public css::awt::XPaintListener
, public css::awt::XWindowListener
, public css::awt::XView
, public css::awt::XWindow
, public css::awt::XControl
- , public IMPL_MutexContainer
+ , public cppu::BaseMutex
, public ::cppu::OComponentHelper
{
public:
diff --git a/UnoControls/source/base/basecontrol.cxx b/UnoControls/source/base/basecontrol.cxx
index f76b605202ab..da80678307b7 100644
--- a/UnoControls/source/base/basecontrol.cxx
+++ b/UnoControls/source/base/basecontrol.cxx
@@ -49,8 +49,7 @@ namespace unocontrols {
// construct/destruct
BaseControl::BaseControl( const Reference< XComponentContext >& rxContext )
- : IMPL_MutexContainer ( )
- , OComponentHelper ( m_aMutex )
+ : OComponentHelper ( m_aMutex )
, m_xComponentContext ( rxContext )
, m_nX ( DEFAULT_X )
, m_nY ( DEFAULT_Y )