dbaccess/source/ui/inc/ConnectionLineAccess.hxx         |   25 +++-------------
 dbaccess/source/ui/inc/JAccess.hxx                      |   10 +-----
 dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx |   12 -------
 dbaccess/source/ui/querydesign/JAccess.cxx              |    6 ---
 4 files changed, 9 insertions(+), 44 deletions(-)

New commits:
commit 8bf1ba09408d42dbc0798aedb96ab387353f9eed
Author:     Stephan Bergmann <sberg...@redhat.com>
AuthorDate: Fri Jan 27 13:42:45 2023 +0100
Commit:     Stephan Bergmann <sberg...@redhat.com>
CommitDate: Sat Jan 28 17:42:50 2023 +0000

    Use ImplInheritanceHelper in OJoinDesignViewAccess
    
    Change-Id: Ib67e03aeea4df67fc7a7b5db5d8cfdd9e57f87f1
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146271
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>

diff --git a/dbaccess/source/ui/inc/JAccess.hxx 
b/dbaccess/source/ui/inc/JAccess.hxx
index 4416f42d6292..6d0d52ec0233 100644
--- a/dbaccess/source/ui/inc/JAccess.hxx
+++ b/dbaccess/source/ui/inc/JAccess.hxx
@@ -20,18 +20,16 @@
 
 #include "JoinTableView.hxx"
 #include <toolkit/awt/vclxaccessiblecomponent.hxx>
-#include <cppuhelper/implbase1.hxx>
+#include <cppuhelper/implbase.hxx>
 #include <vcl/vclptr.hxx>
 
 namespace dbaui
 {
     class OJoinTableView;
-    typedef ::cppu::ImplHelper1< css::accessibility::XAccessible
-                                            > OJoinDesignViewAccess_BASE;
     /** the class OJoinDesignViewAccess represents the accessible object for 
join views
         like the QueryDesign and the RelationDesign
     */
-    class OJoinDesignViewAccess     :   public VCLXAccessibleComponent, public 
OJoinDesignViewAccess_BASE
+    class OJoinDesignViewAccess     :   public 
cppu::ImplInheritanceHelper<VCLXAccessibleComponent, 
css::accessibility::XAccessible>
     {
         VclPtr<OJoinTableView> m_pTableView; // the window which I should give 
accessibility to
 
@@ -40,10 +38,6 @@ namespace dbaui
         */
         OJoinDesignViewAccess(  OJoinTableView* _pTableView);
 
-        // XInterface
-        DECLARE_XINTERFACE( )
-        DECLARE_XTYPEPROVIDER( )
-
         virtual OUString SAL_CALL getImplementationName() override;
 
         // XAccessible
diff --git a/dbaccess/source/ui/querydesign/JAccess.cxx 
b/dbaccess/source/ui/querydesign/JAccess.cxx
index 277a6f9c3426..b67d31c30982 100644
--- a/dbaccess/source/ui/querydesign/JAccess.cxx
+++ b/dbaccess/source/ui/querydesign/JAccess.cxx
@@ -33,7 +33,7 @@ namespace dbaui
     using namespace ::com::sun::star::lang;
 
     OJoinDesignViewAccess::OJoinDesignViewAccess(OJoinTableView* _pTableView)
-        :VCLXAccessibleComponent(_pTableView->GetComponentInterface().is() ? 
_pTableView->GetWindowPeer() : nullptr)
+        :ImplInheritanceHelper(_pTableView->GetComponentInterface().is() ? 
_pTableView->GetWindowPeer() : nullptr)
         ,m_pTableView(_pTableView)
     {
     }
@@ -82,10 +82,6 @@ namespace dbaui
     {
         return this;
     }
-    // XInterface
-    IMPLEMENT_FORWARD_XINTERFACE2( OJoinDesignViewAccess, 
VCLXAccessibleComponent, OJoinDesignViewAccess_BASE )
-    // XTypeProvider
-    IMPLEMENT_FORWARD_XTYPEPROVIDER2( OJoinDesignViewAccess, 
VCLXAccessibleComponent, OJoinDesignViewAccess_BASE )
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 03ac752ca513305cb7504f5bfda701d93e2179f0
Author:     Stephan Bergmann <sberg...@redhat.com>
AuthorDate: Fri Jan 27 13:40:38 2023 +0100
Commit:     Stephan Bergmann <sberg...@redhat.com>
CommitDate: Sat Jan 28 17:42:40 2023 +0000

    Use ImplInheritanceHelper in OConnectionLineAccess
    
    Change-Id: Ib9b1f2c4dc9a8b6190ccfcffbf25e270d5322050
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146270
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>

diff --git a/dbaccess/source/ui/inc/ConnectionLineAccess.hxx 
b/dbaccess/source/ui/inc/ConnectionLineAccess.hxx
index ebbfee97d435..5e14186b0765 100644
--- a/dbaccess/source/ui/inc/ConnectionLineAccess.hxx
+++ b/dbaccess/source/ui/inc/ConnectionLineAccess.hxx
@@ -20,21 +20,20 @@
 
 #include "TableConnection.hxx"
 #include <com/sun/star/accessibility/XAccessibleRelationSet.hpp>
-#include <cppuhelper/implbase2.hxx>
+#include <cppuhelper/implbase.hxx>
 #include <toolkit/awt/vclxaccessiblecomponent.hxx>
 #include <vcl/vclptr.hxx>
 
 namespace dbaui
 {
-    typedef ::cppu::ImplHelper2< css::accessibility::XAccessibleRelationSet,
-                                 css::accessibility::XAccessible
-                                            > OConnectionLineAccess_BASE;
     class OTableConnection;
     /** the class OConnectionLineAccess represents the accessible object for 
the connection between two table windows
         like they are used in the QueryDesign and the RelationDesign
     */
-    class OConnectionLineAccess     :   public VCLXAccessibleComponent
-                                    ,   public OConnectionLineAccess_BASE
+    class OConnectionLineAccess     :   public cppu::ImplInheritanceHelper<
+                                            VCLXAccessibleComponent,
+                                            
css::accessibility::XAccessibleRelationSet,
+                                            css::accessibility::XAccessible>
     {
         VclPtr<const OTableConnection>             m_pLine; // the window 
which I should give accessibility to
     protected:
@@ -45,20 +44,6 @@ namespace dbaui
     public:
         OConnectionLineAccess(OTableConnection* _pLine);
 
-        // XInterface
-        virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type& 
aType ) override;
-        virtual void SAL_CALL acquire(  ) noexcept override
-        { // here inline is allowed because we do not use this class outside 
this dll
-            VCLXAccessibleComponent::acquire(  );
-        }
-        virtual void SAL_CALL release(  ) noexcept override
-        { // here inline is allowed because we do not use this class outside 
this dll
-            VCLXAccessibleComponent::release(  );
-        }
-
-        // XTypeProvider
-        virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes(  ) 
override;
-
         // XServiceInfo
         virtual OUString SAL_CALL getImplementationName() override;
 
diff --git a/dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx 
b/dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx
index 9ba41e4501f7..eac2bf1756ee 100644
--- a/dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx
+++ b/dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx
@@ -25,7 +25,6 @@
 #include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
 #include <TableConnection.hxx>
 #include <TableWindow.hxx>
-#include <comphelper/sequence.hxx>
 
 namespace dbaui
 {
@@ -36,7 +35,7 @@ namespace dbaui
     using namespace ::com::sun::star;
 
     OConnectionLineAccess::OConnectionLineAccess(OTableConnection* _pLine)
-        : VCLXAccessibleComponent(_pLine->GetComponentInterface().is() ? 
_pLine->GetWindowPeer() : nullptr)
+        : ImplInheritanceHelper(_pLine->GetComponentInterface().is() ? 
_pLine->GetWindowPeer() : nullptr)
         ,m_pLine(_pLine)
     {
     }
@@ -45,15 +44,6 @@ namespace dbaui
         m_pLine = nullptr;
         VCLXAccessibleComponent::disposing();
     }
-    Any SAL_CALL OConnectionLineAccess::queryInterface( const Type& aType )
-    {
-        Any aRet(VCLXAccessibleComponent::queryInterface( aType ));
-        return aRet.hasValue() ? aRet : 
OConnectionLineAccess_BASE::queryInterface( aType );
-    }
-    Sequence< Type > SAL_CALL OConnectionLineAccess::getTypes(  )
-    {
-        return 
::comphelper::concatSequences(VCLXAccessibleComponent::getTypes(),OConnectionLineAccess_BASE::getTypes());
-    }
     OUString SAL_CALL OConnectionLineAccess::getImplementationName()
     {
         return "org.openoffice.comp.dbu.ConnectionLineAccessibility";

Reply via email to