comphelper/source/misc/accessiblecomponenthelper.cxx |    5 -----
 include/comphelper/accessiblecomponenthelper.hxx     |   18 ++++++++----------
 toolkit/inc/controls/accessiblecontrolcontext.hxx    |    1 +
 3 files changed, 9 insertions(+), 15 deletions(-)

New commits:
commit 5747634948fcb0f3430a2ce7647e128712cbba66
Author:     Stephan Bergmann <sberg...@redhat.com>
AuthorDate: Mon Jan 23 17:09:52 2023 +0100
Commit:     Stephan Bergmann <sberg...@redhat.com>
CommitDate: Tue Jan 24 19:57:25 2023 +0000

    Use ImplInheritanceHelper in OAccessibleExtendedComponentHelper
    
    (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(176): note: compiler has 
generated 'comphelper::OCommonAccessibleComponent::OCommonAccessibleComponent' 
here
    > include\comphelper/accessiblecomponenthelper.hxx(176): 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(228): note: see 
reference to function template instantiation 
'cppu::ImplInheritanceHelper<comphelper::OCommonAccessibleComponent,com::sun::star::accessibility::XAccessibleExtendedComponent>::ImplInheritanceHelper<cppu::ImplInheritanceHelper<comphelper::OCommonAccessibleComponent,com::sun::star::accessibility::XAccessibleExtendedComponent>>(cppu::ImplInheritanceHelper<comphelper::OCommonAccessibleComponent,com::sun::star::accessibility::XAccessibleExtendedComponent>
 &&)' being compiled
    > include\comphelper/accessiblecomponenthelper.hxx(228): note: see 
reference to function template instantiation 
'cppu::ImplInheritanceHelper<comphelper::OCommonAccessibleComponent,com::sun::star::accessibility::XAccessibleExtendedComponent>::ImplInheritanceHelper<cppu::ImplInheritanceHelper<comphelper::OCommonAccessibleComponent,com::sun::star::accessibility::XAccessibleExtendedComponent>>(cppu::ImplInheritanceHelper<comphelper::OCommonAccessibleComponent,com::sun::star::accessibility::XAccessibleExtendedComponent>
 &&)' being compiled
    
    )
    
    Change-Id: Ia5a7b244dd018c1a63cc2940dba197c43827d563
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146062
    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 cb49bdb52199..816b3b69ee0c 100644
--- a/comphelper/source/misc/accessiblecomponenthelper.cxx
+++ b/comphelper/source/misc/accessiblecomponenthelper.cxx
@@ -337,11 +337,6 @@ namespace comphelper
     }
 
 
-    IMPLEMENT_FORWARD_XINTERFACE2( OAccessibleExtendedComponentHelper, 
OCommonAccessibleComponent, OAccessibleExtendedComponentHelper_Base )
-    IMPLEMENT_FORWARD_XTYPEPROVIDER2( OAccessibleExtendedComponentHelper, 
OCommonAccessibleComponent, OAccessibleExtendedComponentHelper_Base )
-        // (order matters: the first is the class name, the second is the 
class doing the ref counting)
-
-
     sal_Bool SAL_CALL OAccessibleExtendedComponentHelper::containsPoint( const 
awt::Point& _rPoint )
     {
         return OCommonAccessibleComponent::containsPoint( _rPoint );
diff --git a/include/comphelper/accessiblecomponenthelper.hxx 
b/include/comphelper/accessiblecomponenthelper.hxx
index def0b9e2fecb..2a840ea9e36e 100644
--- a/include/comphelper/accessiblecomponenthelper.hxx
+++ b/include/comphelper/accessiblecomponenthelper.hxx
@@ -28,7 +28,6 @@
 #include <cppuhelper/basemutex.hxx>
 #include <cppuhelper/compbase.hxx>
 #include <cppuhelper/implbase.hxx>
-#include <cppuhelper/implbase1.hxx>
 #include <comphelper/uno3.hxx>
 #include <comphelper/comphelperdllapi.h>
 
@@ -209,24 +208,23 @@ namespace comphelper
     //= OAccessibleExtendedComponentHelper
 
 
-    typedef ::cppu::ImplHelper1 <   
css::accessibility::XAccessibleExtendedComponent
-                                >   OAccessibleExtendedComponentHelper_Base;
-
     /** a helper class for implementing an AccessibleContext which at the same 
time
         supports an XAccessibleExtendedComponent interface.
     */
     class COMPHELPER_DLLPUBLIC OAccessibleExtendedComponentHelper
-            :public OCommonAccessibleComponent
-            ,public OAccessibleExtendedComponentHelper_Base
+            :public cppu::ImplInheritanceHelper<
+                 OCommonAccessibleComponent, 
css::accessibility::XAccessibleExtendedComponent>
     {
+    private:
+        OAccessibleExtendedComponentHelper(OAccessibleExtendedComponentHelper 
const &) = delete;
+        OAccessibleExtendedComponentHelper(OAccessibleExtendedComponentHelper 
&&) = delete;
+        void operator =(OAccessibleExtendedComponentHelper const &) = delete;
+        void operator =(OAccessibleExtendedComponentHelper &&) = delete;
+
     protected:
         OAccessibleExtendedComponentHelper( );
 
     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;
diff --git a/toolkit/inc/controls/accessiblecontrolcontext.hxx 
b/toolkit/inc/controls/accessiblecontrolcontext.hxx
index 8cb168071fcc..e0c2f1a11cc9 100644
--- a/toolkit/inc/controls/accessiblecontrolcontext.hxx
+++ b/toolkit/inc/controls/accessiblecontrolcontext.hxx
@@ -22,6 +22,7 @@
 #include <comphelper/accessiblecomponenthelper.hxx>
 #include <comphelper/uno3.hxx>
 #include <com/sun/star/lang/XEventListener.hpp>
+#include <cppuhelper/implbase1.hxx>
 #include <rtl/ref.hxx>
 
 namespace vcl { class Window; }

Reply via email to