chart2/source/controller/accessibility/AccessibleBase.cxx |    5 
 chart2/source/controller/inc/AccessibleBase.hxx           |    8 
 chart2/source/controller/main/ChartController.cxx         |    6 
 chart2/source/controller/main/ChartController_Window.cxx  |  114 ++++----------
 4 files changed, 37 insertions(+), 96 deletions(-)

New commits:
commit 1721a3042ec65f2b4c8ad2cdc036caf160321227
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Mon Mar 31 06:06:42 2025 +0200
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Tue Apr 1 11:18:22 2025 +0200

    chart a11y: Use Reference to XAccessible
    
    Before
    
        commit bdf2d664784b3ebe3e7078b9ec82a02d09d9ded8
        Date:   Sat Sep 2 10:44:51 2023 +0200
    
            use more concrete type in AccessibleChartView
    
    , that was a `Reference<lang::XInitialization>`,
    but now, there's no more reason to use something else
    than an XAccessible.
    
    Change-Id: I054fad40e1b62f3b4ec688ab09673d4c86f7f1ce
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183517
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>
    Tested-by: Jenkins

diff --git a/chart2/source/controller/main/ChartController.cxx 
b/chart2/source/controller/main/ChartController.cxx
index 20f5a7209a18..6006704492cd 100644
--- a/chart2/source/controller/main/ChartController.cxx
+++ b/chart2/source/controller/main/ChartController.cxx
@@ -1531,11 +1531,11 @@ void ChartController::impl_invalidateAccessible()
     auto pChartWindow(GetChartWindow());
     if( pChartWindow )
     {
-        Reference< XInterface > xInit( pChartWindow->GetAccessible(false) );
-        if(xInit.is())
+        Reference<XAccessible> xAccessible = 
pChartWindow->GetAccessible(false);
+        if (xAccessible.is())
         {
             //empty arguments -> invalid accessible
-            dynamic_cast<AccessibleChartView&>(*xInit).initialize();
+            dynamic_cast<AccessibleChartView&>(*xAccessible).initialize();
         }
     }
 #endif
commit ce050797b5b3a9f9912c2bed88febd6b6ca7307f
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Mon Mar 31 05:25:14 2025 +0200
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Tue Apr 1 11:18:16 2025 +0200

    chart: Use ChartController::m_xViewWindow directly
    
    ... instead of assigning it to an additional local
    variable and using that one.
    
    Also drop the (maybe related?)
    
        //@todo
    
    comments that unfortunately don't say what should
    be done...
    
    Change-Id: I08ba33facba385b4f1b43f176125710dd8f031d7
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183516
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/chart2/source/controller/main/ChartController_Window.cxx 
b/chart2/source/controller/main/ChartController_Window.cxx
index c14e97d532a7..c6b317176744 100644
--- a/chart2/source/controller/main/ChartController_Window.cxx
+++ b/chart2/source/controller/main/ChartController_Window.cxx
@@ -240,10 +240,9 @@ void SAL_CALL ChartController::setPosSize(
     sal_Int16 Flags )
 {
     SolarMutexGuard aGuard;
-    uno::Reference<awt::XWindow> xWindow = m_xViewWindow;
     auto pChartWindow(GetChartWindow());
 
-    if(!(xWindow.is() && pChartWindow))
+    if(!(m_xViewWindow.is() && pChartWindow))
         return;
 
     Size aLogicSize = pChartWindow->PixelToLogic( Size( Width, Height ), 
MapMode( MapUnit::Map100thMM )  );
@@ -286,161 +285,114 @@ void SAL_CALL ChartController::setPosSize(
 
 awt::Rectangle SAL_CALL ChartController::getPosSize()
 {
-    //@todo
     awt::Rectangle aRet(0, 0, 0, 0);
 
-    uno::Reference<awt::XWindow> xWindow = m_xViewWindow;
-    if(xWindow.is())
-        aRet = xWindow->getPosSize();
+    if (m_xViewWindow.is())
+        aRet = m_xViewWindow->getPosSize();
 
     return aRet;
 }
 
 void SAL_CALL ChartController::setVisible( sal_Bool Visible )
 {
-    //@todo
-    uno::Reference<awt::XWindow> xWindow = m_xViewWindow;
-
-    if(xWindow.is())
-        xWindow->setVisible( Visible );
+    if (m_xViewWindow.is())
+        m_xViewWindow->setVisible(Visible);
 }
 
 void SAL_CALL ChartController::setEnable( sal_Bool Enable )
 {
-    //@todo
-    uno::Reference<awt::XWindow> xWindow = m_xViewWindow;
-
-    if(xWindow.is())
-        xWindow->setEnable( Enable );
+    if (m_xViewWindow.is())
+        m_xViewWindow->setEnable(Enable);
 }
 
 void SAL_CALL ChartController::setFocus()
 {
-    //@todo
-    uno::Reference<awt::XWindow> xWindow = m_xViewWindow;
-
-    if(xWindow.is())
-        xWindow->setFocus();
+    if (m_xViewWindow.is())
+        m_xViewWindow->setFocus();
 }
 
 void SAL_CALL ChartController::addWindowListener(
     const uno::Reference< awt::XWindowListener >& xListener )
 {
-    //@todo
-    uno::Reference<awt::XWindow> xWindow = m_xViewWindow;
-
-    if(xWindow.is())
-        xWindow->addWindowListener( xListener );
+    if (m_xViewWindow.is())
+        m_xViewWindow->addWindowListener(xListener);
 }
 
 void SAL_CALL ChartController::removeWindowListener(
     const uno::Reference< awt::XWindowListener >& xListener )
 {
-    //@todo
-    uno::Reference<awt::XWindow> xWindow = m_xViewWindow;
-
-    if(xWindow.is())
-        xWindow->removeWindowListener( xListener );
+    if (m_xViewWindow.is())
+        m_xViewWindow->removeWindowListener(xListener);
 }
 
 void SAL_CALL ChartController::addFocusListener(
     const uno::Reference< awt::XFocusListener >& xListener )
 {
-    //@todo
-    uno::Reference<awt::XWindow> xWindow = m_xViewWindow;
-
-    if(xWindow.is())
-        xWindow->addFocusListener( xListener );
+    if (m_xViewWindow.is())
+        m_xViewWindow->addFocusListener(xListener);
 }
 
 void SAL_CALL ChartController::removeFocusListener(
     const uno::Reference< awt::XFocusListener >& xListener )
 {
-    //@todo
-    uno::Reference<awt::XWindow> xWindow = m_xViewWindow;
-
-    if(xWindow.is())
-        xWindow->removeFocusListener( xListener );
+    if (m_xViewWindow.is())
+        m_xViewWindow->removeFocusListener(xListener);
 }
 
 void SAL_CALL ChartController::addKeyListener(
     const uno::Reference< awt::XKeyListener >& xListener )
 {
-    //@todo
-    uno::Reference<awt::XWindow> xWindow = m_xViewWindow;
-
-    if(xWindow.is())
-        xWindow->addKeyListener( xListener );
+    if (m_xViewWindow.is())
+        m_xViewWindow->addKeyListener(xListener);
 }
 
 void SAL_CALL ChartController::removeKeyListener(
     const uno::Reference< awt::XKeyListener >& xListener )
 {
-    //@todo
-    uno::Reference<awt::XWindow> xWindow = m_xViewWindow;
-
-    if(xWindow.is())
-        xWindow->removeKeyListener( xListener );
+    if (m_xViewWindow.is())
+        m_xViewWindow->removeKeyListener(xListener);
 }
 
 void SAL_CALL ChartController::addMouseListener(
     const uno::Reference< awt::XMouseListener >& xListener )
 {
-    //@todo
-    uno::Reference<awt::XWindow> xWindow = m_xViewWindow;
-
-    if(xWindow.is())
-        xWindow->addMouseListener( xListener );
+    if (m_xViewWindow.is())
+        m_xViewWindow->addMouseListener(xListener);
 }
 
 void SAL_CALL ChartController::removeMouseListener(
     const uno::Reference< awt::XMouseListener >& xListener )
 {
-    //@todo
-    uno::Reference<awt::XWindow> xWindow = m_xViewWindow;
-
-    if(xWindow.is())
-        xWindow->removeMouseListener( xListener );
+    if (m_xViewWindow.is())
+        m_xViewWindow->removeMouseListener(xListener);
 }
 
 void SAL_CALL ChartController::addMouseMotionListener(
     const uno::Reference< awt::XMouseMotionListener >& xListener )
 {
-    //@todo
-    uno::Reference<awt::XWindow> xWindow = m_xViewWindow;
-
-    if(xWindow.is())
-        xWindow->addMouseMotionListener( xListener );
+    if (m_xViewWindow.is())
+        m_xViewWindow->addMouseMotionListener(xListener);
 }
 
 void SAL_CALL ChartController::removeMouseMotionListener(
     const uno::Reference< awt::XMouseMotionListener >& xListener )
 {
-    //@todo
-    uno::Reference<awt::XWindow> xWindow = m_xViewWindow;
-
-    if(xWindow.is())
-        xWindow->removeMouseMotionListener( xListener );
+    if (m_xViewWindow.is())
+        m_xViewWindow->removeMouseMotionListener(xListener);
 }
 
 void SAL_CALL ChartController::addPaintListener(
     const uno::Reference< awt::XPaintListener >& xListener )
 {
-    //@todo
-    uno::Reference<awt::XWindow> xWindow = m_xViewWindow;
-
-    if(xWindow.is())
-        xWindow->addPaintListener( xListener );
+    if (m_xViewWindow.is())
+        m_xViewWindow->addPaintListener(xListener);
 }
 
 void SAL_CALL ChartController::removePaintListener(
     const uno::Reference< awt::XPaintListener >& xListener )
 {
-    //@todo
-    uno::Reference<awt::XWindow> xWindow = m_xViewWindow;
-
-    if(xWindow.is())
-        xWindow->removePaintListener( xListener );
+    if (m_xViewWindow.is())
+        m_xViewWindow->removePaintListener(xListener);
 }
 
 // impl vcl window controller methods
commit 679e9b4ca1a9a7842cae5d8a9aad5188d4bb5f0d
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Mon Mar 31 05:11:32 2025 +0200
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Tue Apr 1 11:18:08 2025 +0200

    chart a11y: Drop XEventListener inheritance
    
    Don't let AccessibleBase subclass XEventListener as
    there's no need to, and AccessibleBase::disposing
    wasn't doing anything anyways.
    
    Change-Id: I6fa5e7cb65853e775792c35ce6571104c8c7edcb
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183515
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/chart2/source/controller/accessibility/AccessibleBase.cxx 
b/chart2/source/controller/accessibility/AccessibleBase.cxx
index 0fd8633ccdfc..3a0fda2152b6 100644
--- a/chart2/source/controller/accessibility/AccessibleBase.cxx
+++ b/chart2/source/controller/accessibility/AccessibleBase.cxx
@@ -787,11 +787,6 @@ uno::Sequence< OUString > SAL_CALL 
AccessibleBase::getSupportedServiceNames()
     };
 }
 
-// ________ AccessibleBase::XEventListener ________
-void SAL_CALL AccessibleBase::disposing( const lang::EventObject& /*Source*/ )
-{
-}
-
 // ________ XAccessibleEventBroadcasters ________
 void SAL_CALL AccessibleBase::addAccessibleEventListener( const Reference< 
XAccessibleEventListener >& xListener )
 {
diff --git a/chart2/source/controller/inc/AccessibleBase.hxx 
b/chart2/source/controller/inc/AccessibleBase.hxx
index 926611bfb8ec..3191fa0f252f 100644
--- a/chart2/source/controller/inc/AccessibleBase.hxx
+++ b/chart2/source/controller/inc/AccessibleBase.hxx
@@ -24,7 +24,6 @@
 #include <com/sun/star/accessibility/XAccessibleContext.hpp>
 #include <com/sun/star/accessibility/XAccessibleComponent.hpp>
 #include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/lang/XEventListener.hpp>
 #include <com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp>
 #include <comphelper/accessibleeventnotifier.hxx>
 #include <cppuhelper/basemutex.hxx>
@@ -79,8 +78,7 @@ typedef ::cppu::WeakComponentImplHelper<
         css::accessibility::XAccessibleContext,
         css::accessibility::XAccessibleComponent,
         css::accessibility::XAccessibleEventBroadcaster,
-        css::lang::XServiceInfo,
-        css::lang::XEventListener
+        css::lang::XServiceInfo
         > AccessibleBase_Base;
 }
 
@@ -262,10 +260,6 @@ protected:
         const OUString& ServiceName ) override;
     virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() 
override;
 
-    // ________ XEventListener ________
-    virtual void SAL_CALL disposing(
-        const css::lang::EventObject& Source ) override;
-
     // ________ XAccessibleEventBroadcaster ________
     virtual void SAL_CALL addAccessibleEventListener(
         const css::uno::Reference< 
css::accessibility::XAccessibleEventListener >& xListener ) override;

Reply via email to