comphelper/source/misc/accessiblecomponenthelper.cxx |    5 ----
 include/comphelper/accessiblecomponenthelper.hxx     |   22 +++++++------------
 2 files changed, 9 insertions(+), 18 deletions(-)

New commits:
commit bb0192b332d02dc6a94963992cf65cb5cfdb517b
Author:     Stephan Bergmann <sberg...@redhat.com>
AuthorDate: Mon Jan 23 16:48:51 2023 +0100
Commit:     Stephan Bergmann <sberg...@redhat.com>
CommitDate: Tue Jan 24 09:57:18 2023 +0000

    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<comphelper::OCommonAccessibleComponent,com::sun::star::accessibility::XAccessibleComponent>::ImplInheritanceHelper<cppu::ImplInheritanceHelper<comphelper::OCommonAccessibleComponent,com::sun::star::accessibility::XAccessibleComponent>>(cppu::ImplInheritanceHelper<comphelper::OCommonAccessibleComponent,com::sun::star::accessibility::XAccessibleComponent>
 &&)' being compiled
    > include\comphelper/accessiblecomponenthelper.hxx(200): note: see 
reference to function template instantiation 
'cppu::ImplInheritanceHelper<comphelper::OCommonAccessibleComponent,com::sun::star::accessibility::XAccessibleComponent>::ImplInheritanceHelper<cppu::ImplInheritanceHelper<comphelper::OCommonAccessibleComponent,com::sun::star::accessibility::XAccessibleComponent>>(cppu::ImplInheritanceHelper<comphelper::OCommonAccessibleComponent,com::sun::star::accessibility::XAccessibleComponent>
 &&)' being compiled
    
    )
    
    Change-Id: Ide07c6a7c3660e469f16973d866c949d17fdf419
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146010
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>

diff --git a/comphelper/source/misc/accessiblecomponenthelper.cxx 
b/comphelper/source/misc/accessiblecomponenthelper.cxx
index b5ca0bbd9af1..cb49bdb52199 100644
--- a/comphelper/source/misc/accessiblecomponenthelper.cxx
+++ b/comphelper/source/misc/accessiblecomponenthelper.cxx
@@ -303,11 +303,6 @@ namespace comphelper
     }
 
 
-    IMPLEMENT_FORWARD_XINTERFACE2( OAccessibleComponentHelper, 
OCommonAccessibleComponent, OAccessibleComponentHelper_Base )
-    IMPLEMENT_FORWARD_XTYPEPROVIDER2( OAccessibleComponentHelper, 
OCommonAccessibleComponent, OAccessibleComponentHelper_Base )
-        // (order matters: the first is the class name, the second is the 
class doing the ref counting)
-
-
     sal_Bool SAL_CALL OAccessibleComponentHelper::containsPoint( const 
awt::Point& _rPoint )
     {
         return OCommonAccessibleComponent::containsPoint( _rPoint );
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 <comphelper/accessibleeventnotifier.hxx>
 #include <cppuhelper/basemutex.hxx>
 #include <cppuhelper/compbase.hxx>
+#include <cppuhelper/implbase.hxx>
 #include <cppuhelper/implbase1.hxx>
 #include <comphelper/uno3.hxx>
 #include <comphelper/comphelperdllapi.h>
@@ -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;

Reply via email to