From bb0192b332d02dc6a94963992cf65cb5cfdb517b Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Mon, 23 Jan 2023 16:48:51 +0100 Subject: Use ImplInheritanceHelper in OAccessibleComponentHelper (Explicitly deleting the special member functions is needed to avoid MSVC > include\cppuhelper/implbase.hxx(152): error C2280: 'comphelper::OCommonAccessibleComponent::OCommonAccessibleComponent(const comphelper::OCommonAccessibleComponent &)': attempting to reference a deleted function > include\comphelper/accessiblecomponenthelper.hxx(177): note: compiler has generated 'comphelper::OCommonAccessibleComponent::OCommonAccessibleComponent' here > include\comphelper/accessiblecomponenthelper.hxx(177): note: 'comphelper::OCommonAccessibleComponent::OCommonAccessibleComponent(const comphelper::OCommonAccessibleComponent &)': function was implicitly deleted because a base class invokes a deleted or inaccessible function 'cppu::BaseMutex::BaseMutex(const cppu::BaseMutex &)' > include\cppuhelper/basemutex.hxx(43): note: 'cppu::BaseMutex::BaseMutex(const cppu::BaseMutex &)': function was implicitly deleted because a data member invokes a deleted or inaccessible function 'osl::Mutex::Mutex(const osl::Mutex &)' > include\osl/mutex.hxx(107): note: 'osl::Mutex::Mutex(const osl::Mutex &)': function was explicitly deleted > include\comphelper/accessiblecomponenthelper.hxx(200): note: see reference to function template instantiation 'cppu::ImplInheritanceHelper::ImplInheritanceHelper>(cppu::ImplInheritanceHelper &&)' being compiled > include\comphelper/accessiblecomponenthelper.hxx(200): note: see reference to function template instantiation 'cppu::ImplInheritanceHelper::ImplInheritanceHelper>(cppu::ImplInheritanceHelper &&)' being compiled ) Change-Id: Ide07c6a7c3660e469f16973d866c949d17fdf419 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146010 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- include/comphelper/accessiblecomponenthelper.hxx | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) (limited to 'include/comphelper/accessiblecomponenthelper.hxx') diff --git a/include/comphelper/accessiblecomponenthelper.hxx b/include/comphelper/accessiblecomponenthelper.hxx index 8743b322a4d8..def0b9e2fecb 100644 --- a/include/comphelper/accessiblecomponenthelper.hxx +++ b/include/comphelper/accessiblecomponenthelper.hxx @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -179,28 +180,23 @@ namespace comphelper //= OAccessibleComponentHelper - struct OAccessibleComponentHelper_Base : - public ::cppu::ImplHelper1< css::accessibility::XAccessibleComponent > - { - protected: - ~OAccessibleComponentHelper_Base() {} - }; - /** a helper class for implementing an AccessibleContext which at the same time supports an XAccessibleComponent interface. */ class COMPHELPER_DLLPUBLIC OAccessibleComponentHelper - :public OCommonAccessibleComponent - ,public OAccessibleComponentHelper_Base + :public cppu::ImplInheritanceHelper< + OCommonAccessibleComponent, css::accessibility::XAccessibleComponent> { + private: + OAccessibleComponentHelper(OAccessibleComponentHelper const &) = delete; + OAccessibleComponentHelper(OAccessibleComponentHelper &&) = delete; + void operator =(OAccessibleComponentHelper const &) = delete; + void operator =(OAccessibleComponentHelper &&) = delete; + protected: OAccessibleComponentHelper(); public: - // XInterface - DECLARE_XINTERFACE( ) - DECLARE_XTYPEPROVIDER( ) - // XAccessibleComponent - default implementations virtual sal_Bool SAL_CALL containsPoint( const css::awt::Point& aPoint ) override; virtual css::awt::Point SAL_CALL getLocation( ) override; -- cgit