summaryrefslogtreecommitdiff
path: root/UnoControls/inc/basecontrol.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'UnoControls/inc/basecontrol.hxx')
-rw-r--r--UnoControls/inc/basecontrol.hxx29
1 files changed, 5 insertions, 24 deletions
diff --git a/UnoControls/inc/basecontrol.hxx b/UnoControls/inc/basecontrol.hxx
index cba7eed36c38..9f60537bb7cb 100644
--- a/UnoControls/inc/basecontrol.hxx
+++ b/UnoControls/inc/basecontrol.hxx
@@ -25,8 +25,8 @@
#include <com/sun/star/awt/XWindow.hpp>
#include <com/sun/star/awt/XView.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <osl/mutex.hxx>
-#include <cppuhelper/component.hxx>
+#include <cppuhelper/compbase.hxx>
+#include <cppuhelper/basemutex.hxx>
#include <rtl/ref.hxx>
namespace com::sun::star::uno { class XComponentContext; }
@@ -39,20 +39,14 @@ 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::OComponentHelper
+ , public cppu::BaseMutex
+ , public ::cppu::WeakComponentImplHelper<>
{
public:
BaseControl( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
@@ -121,16 +115,6 @@ public:
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
- // XAggregation
-
- virtual void SAL_CALL setDelegator(
- const css::uno::Reference< css::uno::XInterface >& xDelegator
- ) override;
-
- virtual css::uno::Any SAL_CALL queryAggregation(
- const css::uno::Type& aType
- ) override;
-
// XServiceInfo
virtual sal_Bool SAL_CALL supportsService(
@@ -281,7 +265,7 @@ public:
virtual void SAL_CALL windowHidden( const css::lang::EventObject& aEvent ) override;
protected:
- using OComponentHelper::disposing;
+ using WeakComponentImplHelper::disposing;
const css::uno::Reference< css::uno::XComponentContext >& impl_getComponentContext() const { return m_xComponentContext;}
@@ -303,13 +287,10 @@ protected:
virtual void impl_recalcLayout( const css::awt::WindowEvent& aEvent );
- const css::uno::Reference< css::uno::XInterface >& impl_getDelegator() const { return m_xDelegator;}
-
private:
OMRCListenerMultiplexerHelper* impl_getMultiplexer();
css::uno::Reference< css::uno::XComponentContext > m_xComponentContext;
- css::uno::Reference< css::uno::XInterface > m_xDelegator;
rtl::Reference<OMRCListenerMultiplexerHelper> m_xMultiplexer; // multiplex events
css::uno::Reference< css::uno::XInterface > m_xContext;
css::uno::Reference< css::awt::XWindowPeer > m_xPeer;