[Libreoffice-commits] core.git: accessibility/inc accessibility/source

Noel Grandin noel.grandin at collabora.co.uk
Tue Nov 1 12:54:40 UTC 2016


 accessibility/inc/extended/AccessibleBrowseBox.hxx               |    5 --
 accessibility/inc/extended/AccessibleBrowseBoxTableBase.hxx      |    3 -
 accessibility/inc/extended/AccessibleGridControl.hxx             |    5 --
 accessibility/inc/extended/AccessibleGridControlTableBase.hxx    |    7 --
 accessibility/inc/extended/accessibleiconchoicectrl.hxx          |    4 -
 accessibility/inc/extended/accessibleiconchoicectrlentry.hxx     |    4 -
 accessibility/inc/extended/accessiblelistbox.hxx                 |    4 -
 accessibility/inc/extended/accessiblelistboxentry.hxx            |    4 -
 accessibility/inc/extended/accessibletablistboxtable.hxx         |    4 -
 accessibility/inc/extended/listboxaccessible.hxx                 |    4 -
 accessibility/source/extended/AccessibleBrowseBox.cxx            |    5 --
 accessibility/source/extended/AccessibleBrowseBoxTableBase.cxx   |    8 ---
 accessibility/source/extended/AccessibleGridControl.cxx          |    6 --
 accessibility/source/extended/AccessibleGridControlTableBase.cxx |   15 ------
 accessibility/source/extended/accessibleiconchoicectrl.cxx       |   18 +------
 accessibility/source/extended/accessibleiconchoicectrlentry.cxx  |   18 +------
 accessibility/source/extended/accessiblelistbox.cxx              |   18 +------
 accessibility/source/extended/accessiblelistboxentry.cxx         |   18 +------
 accessibility/source/extended/accessibletablistboxtable.cxx      |    9 ---
 accessibility/source/extended/listboxaccessible.cxx              |   24 ++++------
 20 files changed, 29 insertions(+), 154 deletions(-)

New commits:
commit 49c7bc5af291dbf6b34bcea82c9c0513f65b308b
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Tue Nov 1 14:53:41 2016 +0200

    loplugin:expandablemethods in accessibility
    
    Change-Id: I51d13c12274d99623b97f611e30204bea624cbfc

diff --git a/accessibility/inc/extended/AccessibleBrowseBox.hxx b/accessibility/inc/extended/AccessibleBrowseBox.hxx
index 12948bc..bc6f1a5 100644
--- a/accessibility/inc/extended/AccessibleBrowseBox.hxx
+++ b/accessibility/inc/extended/AccessibleBrowseBox.hxx
@@ -211,9 +211,6 @@ public:
         ::svt::IAccessibleTableProvider& _rBrowseBox
     );
 
-    /// checks whether the accessible context is still alive
-    bool                            isContextAlive() const;
-
     /// returns the AccessibleContext belonging to this Accessible
     inline AccessibleBrowseBox*            getContext()         { return m_pContext; }
 
@@ -233,7 +230,7 @@ protected:
     void dispose() override;
     virtual bool isAlive() const override
     {
-        return isContextAlive();
+        return m_pContext && m_pContext->isAlive();
     }
     virtual css::uno::Reference< css::accessibility::XAccessible >
         getHeaderBar( ::svt::AccessibleBrowseBoxObjType _eObjType ) override
diff --git a/accessibility/inc/extended/AccessibleBrowseBoxTableBase.hxx b/accessibility/inc/extended/AccessibleBrowseBoxTableBase.hxx
index 70cab0d..6d0ff56 100644
--- a/accessibility/inc/extended/AccessibleBrowseBoxTableBase.hxx
+++ b/accessibility/inc/extended/AccessibleBrowseBoxTableBase.hxx
@@ -198,9 +198,6 @@ protected:
     /** @attention  This method requires locked mutex's and a living object.
         @return  The column index of the specified cell index. */
     sal_Int32 implGetColumn( sal_Int32 nChildIndex ) const;
-    /** @attention  This method requires locked mutex's and a living object.
-        @return  The child index of the specified cell address. */
-    sal_Int32 implGetChildIndex( sal_Int32 nRow, sal_Int32 nColumn ) const;
 
     /** @attention  This method requires locked mutex's and a living object.
         @return  TRUE, if the specified row is selected. */
diff --git a/accessibility/inc/extended/AccessibleGridControl.hxx b/accessibility/inc/extended/AccessibleGridControl.hxx
index fed4990..c99ac4e 100644
--- a/accessibility/inc/extended/AccessibleGridControl.hxx
+++ b/accessibility/inc/extended/AccessibleGridControl.hxx
@@ -179,9 +179,6 @@ public:
         ::svt::table::IAccessibleTable& _rTable
     );
 
-    /// checks whether the accessible context is still alive
-    bool                            isContextAlive() const;
-
     /// returns the AccessibleContext belonging to this Accessible
     inline AccessibleGridControl*            getContext()         { return m_pContext; }
 
@@ -201,7 +198,7 @@ protected:
     void DisposeAccessImpl() override;
     virtual bool isAlive() const override
     {
-        return isContextAlive();
+        return m_pContext && m_pContext->isAlive();
     }
     virtual void commitCellEvent( sal_Int16 nEventId,
          const css::uno::Any& rNewValue, const css::uno::Any& rOldValue ) override
diff --git a/accessibility/inc/extended/AccessibleGridControlTableBase.hxx b/accessibility/inc/extended/AccessibleGridControlTableBase.hxx
index 8a4d981..9276247 100644
--- a/accessibility/inc/extended/AccessibleGridControlTableBase.hxx
+++ b/accessibility/inc/extended/AccessibleGridControlTableBase.hxx
@@ -158,18 +158,11 @@ protected:
     // internal helper methods
 
     /** @attention  This method requires locked mutex's and a living object.
-        @return  The number of cells of the table. */
-    sal_Int32 implGetChildCount() const;
-
-    /** @attention  This method requires locked mutex's and a living object.
         @return  The row index of the specified cell index. */
     sal_Int32 implGetRow( sal_Int32 nChildIndex ) const;
     /** @attention  This method requires locked mutex's and a living object.
         @return  The column index of the specified cell index. */
     sal_Int32 implGetColumn( sal_Int32 nChildIndex ) const;
-    /** @attention  This method requires locked mutex's and a living object.
-        @return  The child index of the specified cell address. */
-    sal_Int32 implGetChildIndex( sal_Int32 nRow, sal_Int32 nColumn ) const;
 
     /** Fills a sequence with sorted indexes of completely selected rows.
         @attention  This method requires locked mutex's and a living object.
diff --git a/accessibility/inc/extended/accessibleiconchoicectrl.hxx b/accessibility/inc/extended/accessibleiconchoicectrl.hxx
index feb66df..8b54e30 100644
--- a/accessibility/inc/extended/accessibleiconchoicectrl.hxx
+++ b/accessibility/inc/extended/accessibleiconchoicectrl.hxx
@@ -75,10 +75,6 @@ namespace accessibility
         virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw (css::uno::RuntimeException, std::exception) override;
         virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(css::uno::RuntimeException, std::exception) override;
 
-        // XServiceInfo - static methods
-        static css::uno::Sequence< OUString > getSupportedServiceNames_Static() throw(css::uno::RuntimeException);
-        static OUString getImplementationName_Static() throw(css::uno::RuntimeException);
-
         // XAccessible
         virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext(  ) throw (css::uno::RuntimeException, std::exception) override;
 
diff --git a/accessibility/inc/extended/accessibleiconchoicectrlentry.hxx b/accessibility/inc/extended/accessibleiconchoicectrlentry.hxx
index 680aade..66cfc09 100644
--- a/accessibility/inc/extended/accessibleiconchoicectrlentry.hxx
+++ b/accessibility/inc/extended/accessibleiconchoicectrlentry.hxx
@@ -118,10 +118,6 @@ namespace accessibility
         virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw (css::uno::RuntimeException, std::exception) override;
         virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(css::uno::RuntimeException, std::exception) override;
 
-        // XServiceInfo - static methods
-        static css::uno::Sequence< OUString > getSupportedServiceNames_Static() throw(css::uno::RuntimeException);
-        static OUString getImplementationName_Static() throw(css::uno::RuntimeException);
-
         // XEventListener
         virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) throw(css::uno::RuntimeException, std::exception) override;
 
diff --git a/accessibility/inc/extended/accessiblelistbox.hxx b/accessibility/inc/extended/accessiblelistbox.hxx
index d51458e..e8249be 100644
--- a/accessibility/inc/extended/accessiblelistbox.hxx
+++ b/accessibility/inc/extended/accessiblelistbox.hxx
@@ -88,10 +88,6 @@ namespace accessibility
         virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw (css::uno::RuntimeException, std::exception) override;
         virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(css::uno::RuntimeException, std::exception) override;
 
-        // XServiceInfo - static methods
-        static css::uno::Sequence< OUString > getSupportedServiceNames_Static() throw(css::uno::RuntimeException);
-        static OUString getImplementationName_Static() throw(css::uno::RuntimeException);
-
         // XAccessible
         virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext(  ) throw (css::uno::RuntimeException, std::exception) override;
 
diff --git a/accessibility/inc/extended/accessiblelistboxentry.hxx b/accessibility/inc/extended/accessiblelistboxentry.hxx
index 447324a..55cb1bb 100644
--- a/accessibility/inc/extended/accessiblelistboxentry.hxx
+++ b/accessibility/inc/extended/accessiblelistboxentry.hxx
@@ -143,10 +143,6 @@ namespace accessibility
         virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw (css::uno::RuntimeException, std::exception) override;
         virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(css::uno::RuntimeException, std::exception) override;
 
-        // XServiceInfo - static methods
-        static css::uno::Sequence< OUString > getSupportedServiceNames_Static() throw(css::uno::RuntimeException);
-        static OUString getImplementationName_Static() throw(css::uno::RuntimeException);
-
         // XAccessible
         virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext(  ) throw (css::uno::RuntimeException, std::exception) override;
 
diff --git a/accessibility/inc/extended/accessibletablistboxtable.hxx b/accessibility/inc/extended/accessibletablistboxtable.hxx
index 5a41660..6a12f2a 100644
--- a/accessibility/inc/extended/accessibletablistboxtable.hxx
+++ b/accessibility/inc/extended/accessibletablistboxtable.hxx
@@ -48,8 +48,6 @@ private:
     /** Throws an exception, if nIndex is not a valid child index. */
     void ensureValidIndex( sal_Int32 _nIndex ) const;
 
-    /** Returns true, if the specified row is selected. */
-    bool implIsRowSelected( sal_Int32 _nRow ) const;
     /** Selects the specified row. */
     void implSelectRow( sal_Int32 _nRow, bool _bSelect );
 
@@ -59,8 +57,6 @@ private:
     sal_Int32 implGetColumnCount() const override;
     /** Returns the count of selected rows in the table. */
     sal_Int32 implGetSelRowCount() const;
-    /** Returns the total cell count in the table (including header). */
-    inline sal_Int32 implGetCellCount() const { return implGetRowCount() * implGetColumnCount(); }
 
     /** Returns the row index from cell index. */
     inline sal_Int32 implGetRow( sal_Int32 _nIndex ) const { return _nIndex / implGetColumnCount(); }
diff --git a/accessibility/inc/extended/listboxaccessible.hxx b/accessibility/inc/extended/listboxaccessible.hxx
index 7c84e19..e93fa02 100644
--- a/accessibility/inc/extended/listboxaccessible.hxx
+++ b/accessibility/inc/extended/listboxaccessible.hxx
@@ -53,10 +53,6 @@ namespace accessibility
     protected:
         virtual ~ListBoxAccessibleBase( );
 
-        // own overridables
-        /// will be called for any VclWindowEvent events broadcasted by our VCL window
-        void ProcessWindowEvent( const VclWindowEvent& _rVclWindowEvent );
-
         /** will be called when our window broadcasts the VCLEVENT_OBJECT_DYING event
 
             <p>Usually, you derive your class from both ListBoxAccessibleBase and XComponent,
diff --git a/accessibility/source/extended/AccessibleBrowseBox.cxx b/accessibility/source/extended/AccessibleBrowseBox.cxx
index 543c638..73e9823 100644
--- a/accessibility/source/extended/AccessibleBrowseBox.cxx
+++ b/accessibility/source/extended/AccessibleBrowseBox.cxx
@@ -347,11 +347,6 @@ css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL Accessibl
 }
 
 
-bool AccessibleBrowseBoxAccess::isContextAlive() const
-{
-    return  ( nullptr != m_pContext ) && m_pContext->isAlive();
-}
-
 
 } // namespace accessibility
 
diff --git a/accessibility/source/extended/AccessibleBrowseBoxTableBase.cxx b/accessibility/source/extended/AccessibleBrowseBoxTableBase.cxx
index 0abc93b..5bc990d 100644
--- a/accessibility/source/extended/AccessibleBrowseBoxTableBase.cxx
+++ b/accessibility/source/extended/AccessibleBrowseBoxTableBase.cxx
@@ -132,7 +132,7 @@ sal_Int32 SAL_CALL AccessibleBrowseBoxTableBase::getAccessibleIndex(
     ::osl::MutexGuard aGuard( getOslMutex() );
     ensureIsAlive();
     ensureIsValidAddress( nRow, nColumn );
-    return implGetChildIndex( nRow, nColumn );
+    return nRow * implGetColumnCount() + nColumn;
 }
 
 sal_Int32 SAL_CALL AccessibleBrowseBoxTableBase::getAccessibleRow( sal_Int32 nChildIndex )
@@ -244,12 +244,6 @@ sal_Int32 AccessibleBrowseBoxTableBase::implGetColumn( sal_Int32 nChildIndex ) c
     return nColumns ? (nChildIndex % nColumns) : 0;
 }
 
-sal_Int32 AccessibleBrowseBoxTableBase::implGetChildIndex(
-        sal_Int32 nRow, sal_Int32 nColumn ) const
-{
-    return nRow * implGetColumnCount() + nColumn;
-}
-
 bool AccessibleBrowseBoxTableBase::implIsRowSelected( sal_Int32 nRow ) const
 {
     return mpBrowseBox->IsRowSelected( nRow );
diff --git a/accessibility/source/extended/AccessibleGridControl.cxx b/accessibility/source/extended/AccessibleGridControl.cxx
index 9f7acaa..2de159c 100644
--- a/accessibility/source/extended/AccessibleGridControl.cxx
+++ b/accessibility/source/extended/AccessibleGridControl.cxx
@@ -440,12 +440,6 @@ css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL Accessibl
 }
 
 
-bool AccessibleGridControlAccess::isContextAlive() const
-{
-    return  ( nullptr != m_pContext ) && m_pContext->isAlive();
-}
-
-
 }   // namespace accessibility
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/accessibility/source/extended/AccessibleGridControlTableBase.cxx b/accessibility/source/extended/AccessibleGridControlTableBase.cxx
index a98e1f5..0a3e090 100644
--- a/accessibility/source/extended/AccessibleGridControlTableBase.cxx
+++ b/accessibility/source/extended/AccessibleGridControlTableBase.cxx
@@ -144,7 +144,7 @@ sal_Int32 SAL_CALL AccessibleGridControlTableBase::getAccessibleIndex(
 
     ensureIsAlive();
     ensureIsValidAddress( nRow, nColumn );
-    return implGetChildIndex( nRow, nColumn );
+    return nRow * m_aTable.GetColumnCount() + nColumn;
 }
 
 sal_Int32 SAL_CALL AccessibleGridControlTableBase::getAccessibleRow( sal_Int32 nChildIndex )
@@ -205,11 +205,6 @@ Sequence< sal_Int8 > SAL_CALL AccessibleGridControlTableBase::getImplementationI
 
 // internal helper methods ----------------------------------------------------
 
-sal_Int32 AccessibleGridControlTableBase::implGetChildCount() const
-{
-    return m_aTable.GetRowCount()*m_aTable.GetColumnCount();
-}
-
 sal_Int32 AccessibleGridControlTableBase::implGetRow( sal_Int32 nChildIndex ) const
 {
     sal_Int32 nColumns = m_aTable.GetColumnCount();
@@ -222,12 +217,6 @@ sal_Int32 AccessibleGridControlTableBase::implGetColumn( sal_Int32 nChildIndex )
     return nColumns ? (nChildIndex % nColumns) : 0;
 }
 
-sal_Int32 AccessibleGridControlTableBase::implGetChildIndex(
-        sal_Int32 nRow, sal_Int32 nColumn ) const
-{
-    return nRow * m_aTable.GetColumnCount() + nColumn;
-}
-
 void AccessibleGridControlTableBase::implGetSelectedRows( Sequence< sal_Int32 >& rSeq )
 {
     sal_Int32 const selectionCount( m_aTable.GetSelectedRowCount() );
@@ -263,7 +252,7 @@ void AccessibleGridControlTableBase::ensureIsValidAddress(
 void AccessibleGridControlTableBase::ensureIsValidIndex( sal_Int32 nChildIndex )
     throw ( lang::IndexOutOfBoundsException )
 {
-    if( nChildIndex >= implGetChildCount() )
+    if( nChildIndex >= m_aTable.GetRowCount()*m_aTable.GetColumnCount() )
         throw lang::IndexOutOfBoundsException(
             OUString( "child index is invalid" ), *this );
 }
diff --git a/accessibility/source/extended/accessibleiconchoicectrl.cxx b/accessibility/source/extended/accessibleiconchoicectrl.cxx
index 7b4708c..cacf65c5 100644
--- a/accessibility/source/extended/accessibleiconchoicectrl.cxx
+++ b/accessibility/source/extended/accessibleiconchoicectrl.cxx
@@ -129,31 +129,19 @@ namespace accessibility
 
     OUString SAL_CALL AccessibleIconChoiceCtrl::getImplementationName() throw (RuntimeException, std::exception)
     {
-        return getImplementationName_Static();
+        return OUString( "com.sun.star.comp.svtools.AccessibleIconChoiceControl" );
     }
 
     Sequence< OUString > SAL_CALL AccessibleIconChoiceCtrl::getSupportedServiceNames() throw (RuntimeException, std::exception)
     {
-        return getSupportedServiceNames_Static();
-    }
-
-    sal_Bool SAL_CALL AccessibleIconChoiceCtrl::supportsService( const OUString& _rServiceName ) throw (RuntimeException, std::exception)
-    {
-        return cppu::supportsService(this, _rServiceName);
-    }
-
-    // XServiceInfo - static methods
-
-    Sequence< OUString > AccessibleIconChoiceCtrl::getSupportedServiceNames_Static() throw (RuntimeException)
-    {
         return {"com.sun.star.accessibility.AccessibleContext",
                 "com.sun.star.accessibility.AccessibleComponent",
                 "com.sun.star.awt.AccessibleIconChoiceControl"};
     }
 
-    OUString AccessibleIconChoiceCtrl::getImplementationName_Static() throw (RuntimeException)
+    sal_Bool SAL_CALL AccessibleIconChoiceCtrl::supportsService( const OUString& _rServiceName ) throw (RuntimeException, std::exception)
     {
-        return OUString( "com.sun.star.comp.svtools.AccessibleIconChoiceControl" );
+        return cppu::supportsService(this, _rServiceName);
     }
 
     // XAccessible
diff --git a/accessibility/source/extended/accessibleiconchoicectrlentry.cxx b/accessibility/source/extended/accessibleiconchoicectrlentry.cxx
index d60fe59..591c254 100644
--- a/accessibility/source/extended/accessibleiconchoicectrlentry.cxx
+++ b/accessibility/source/extended/accessibleiconchoicectrlentry.cxx
@@ -232,31 +232,19 @@ throw(RuntimeException, std::exception)
 
     OUString SAL_CALL AccessibleIconChoiceCtrlEntry::getImplementationName() throw(RuntimeException, std::exception)
     {
-        return getImplementationName_Static();
+        return OUString( "com.sun.star.comp.svtools.AccessibleIconChoiceControlEntry" );
     }
 
     Sequence< OUString > SAL_CALL AccessibleIconChoiceCtrlEntry::getSupportedServiceNames() throw(RuntimeException, std::exception)
     {
-        return getSupportedServiceNames_Static();
-    }
-
-    sal_Bool SAL_CALL AccessibleIconChoiceCtrlEntry::supportsService( const OUString& _rServiceName ) throw (RuntimeException, std::exception)
-    {
-        return cppu::supportsService(this, _rServiceName);
-    }
-
-    // XServiceInfo - static methods
-
-    Sequence< OUString > AccessibleIconChoiceCtrlEntry::getSupportedServiceNames_Static() throw( RuntimeException )
-    {
         return {"com.sun.star.accessibility.AccessibleContext",
                 "com.sun.star.accessibility.AccessibleComponent",
                 "com.sun.star.awt.AccessibleIconChoiceControlEntry"};
     }
 
-    OUString AccessibleIconChoiceCtrlEntry::getImplementationName_Static() throw( RuntimeException )
+    sal_Bool SAL_CALL AccessibleIconChoiceCtrlEntry::supportsService( const OUString& _rServiceName ) throw (RuntimeException, std::exception)
     {
-        return OUString( "com.sun.star.comp.svtools.AccessibleIconChoiceControlEntry" );
+        return cppu::supportsService(this, _rServiceName);
     }
 
     // XAccessible
diff --git a/accessibility/source/extended/accessiblelistbox.cxx b/accessibility/source/extended/accessiblelistbox.cxx
index 864167c..fb9b580 100644
--- a/accessibility/source/extended/accessiblelistbox.cxx
+++ b/accessibility/source/extended/accessiblelistbox.cxx
@@ -319,31 +319,19 @@ namespace accessibility
 
     OUString SAL_CALL AccessibleListBox::getImplementationName() throw(RuntimeException, std::exception)
     {
-        return getImplementationName_Static();
+        return OUString( "com.sun.star.comp.svtools.AccessibleTreeListBox" );
     }
 
     Sequence< OUString > SAL_CALL AccessibleListBox::getSupportedServiceNames() throw(RuntimeException, std::exception)
     {
-        return getSupportedServiceNames_Static();
-    }
-
-    sal_Bool SAL_CALL AccessibleListBox::supportsService( const OUString& _rServiceName ) throw (RuntimeException, std::exception)
-    {
-        return cppu::supportsService(this, _rServiceName);
-    }
-
-    // XServiceInfo - static methods
-
-    Sequence< OUString > AccessibleListBox::getSupportedServiceNames_Static() throw( RuntimeException )
-    {
         return {"com.sun.star.accessibility.AccessibleContext",
                 "com.sun.star.accessibility.AccessibleComponent",
                 "com.sun.star.awt.AccessibleTreeListBox"};
     }
 
-    OUString AccessibleListBox::getImplementationName_Static() throw( RuntimeException )
+    sal_Bool SAL_CALL AccessibleListBox::supportsService( const OUString& _rServiceName ) throw (RuntimeException, std::exception)
     {
-        return OUString( "com.sun.star.comp.svtools.AccessibleTreeListBox" );
+        return cppu::supportsService(this, _rServiceName);
     }
 
     // XAccessible
diff --git a/accessibility/source/extended/accessiblelistboxentry.cxx b/accessibility/source/extended/accessiblelistboxentry.cxx
index cd70de1..39ece7a 100644
--- a/accessibility/source/extended/accessiblelistboxentry.cxx
+++ b/accessibility/source/extended/accessiblelistboxentry.cxx
@@ -257,31 +257,19 @@ namespace accessibility
 
     OUString SAL_CALL AccessibleListBoxEntry::getImplementationName() throw(RuntimeException, std::exception)
     {
-        return getImplementationName_Static();
+        return OUString( "com.sun.star.comp.svtools.AccessibleTreeListBoxEntry" );
     }
 
     Sequence< OUString > SAL_CALL AccessibleListBoxEntry::getSupportedServiceNames() throw(RuntimeException, std::exception)
     {
-        return getSupportedServiceNames_Static();
-    }
-
-    sal_Bool SAL_CALL AccessibleListBoxEntry::supportsService( const OUString& _rServiceName ) throw (RuntimeException, std::exception)
-    {
-        return cppu::supportsService(this, _rServiceName);
-    }
-
-    // XServiceInfo - static methods
-
-    Sequence< OUString > AccessibleListBoxEntry::getSupportedServiceNames_Static() throw( RuntimeException )
-    {
         return {"com.sun.star.accessibility.AccessibleContext",
                 "com.sun.star.accessibility.AccessibleComponent",
                 "com.sun.star.awt.AccessibleTreeListBoxEntry"};
     }
 
-    OUString AccessibleListBoxEntry::getImplementationName_Static() throw( RuntimeException )
+    sal_Bool SAL_CALL AccessibleListBoxEntry::supportsService( const OUString& _rServiceName ) throw (RuntimeException, std::exception)
     {
-        return OUString( "com.sun.star.comp.svtools.AccessibleTreeListBoxEntry" );
+        return cppu::supportsService(this, _rServiceName);
     }
 
     // XAccessible
diff --git a/accessibility/source/extended/accessibletablistboxtable.cxx b/accessibility/source/extended/accessibletablistboxtable.cxx
index 1e25ee8..5298924 100644
--- a/accessibility/source/extended/accessibletablistboxtable.cxx
+++ b/accessibility/source/extended/accessibletablistboxtable.cxx
@@ -260,15 +260,10 @@ namespace accessibility
 
     void AccessibleTabListBoxTable::ensureValidIndex( sal_Int32 _nIndex ) const
     {
-        if ( ( _nIndex < 0 ) || ( _nIndex >= implGetCellCount() ) )
+        if ( ( _nIndex < 0 ) || ( _nIndex >= (implGetRowCount() * implGetColumnCount()) ) )
             throw IndexOutOfBoundsException();
     }
 
-    bool AccessibleTabListBoxTable::implIsRowSelected( sal_Int32 _nRow ) const
-    {
-        return m_pTabListBox && m_pTabListBox->IsSelected( m_pTabListBox->GetEntry( _nRow ) );
-    }
-
     void AccessibleTabListBoxTable::implSelectRow( sal_Int32 _nRow, bool _bSelect )
     {
         if ( m_pTabListBox )
@@ -341,7 +336,7 @@ namespace accessibility
         ensureIsAlive();
         ensureValidIndex( nChildIndex );
 
-        return implIsRowSelected( implGetRow( nChildIndex ) );
+        return m_pTabListBox && m_pTabListBox->IsSelected( m_pTabListBox->GetEntry( implGetRow( nChildIndex ) ) );
     }
 
     void SAL_CALL AccessibleTabListBoxTable::clearAccessibleSelection(  ) throw (RuntimeException, std::exception)
diff --git a/accessibility/source/extended/listboxaccessible.cxx b/accessibility/source/extended/listboxaccessible.cxx
index db388f3..63cb02d 100644
--- a/accessibility/source/extended/listboxaccessible.cxx
+++ b/accessibility/source/extended/listboxaccessible.cxx
@@ -46,22 +46,9 @@ namespace accessibility
         OSL_ENSURE( rEvent.GetWindow() , "ListBoxAccessibleBase::WindowEventListener: no event window!" );
         OSL_ENSURE( rEvent.GetWindow() == m_pWindow, "ListBoxAccessibleBase::WindowEventListener: where did this come from?" );
 
-        ProcessWindowEvent( rEvent );
-    }
-
-    void ListBoxAccessibleBase::disposing()
-    {
-        SolarMutexGuard g;
-        if ( m_pWindow )
-            m_pWindow->RemoveEventListener( LINK( this, ListBoxAccessibleBase, WindowEventListener ) );
-        m_pWindow = nullptr;
-    }
-
-    void ListBoxAccessibleBase::ProcessWindowEvent( const VclWindowEvent& _rVclWindowEvent )
-    {
         if ( isAlive() )
         {
-            switch ( _rVclWindowEvent.GetId() )
+            switch ( rEvent.GetId() )
             {
                 case  VCLEVENT_OBJECT_DYING :
                 {
@@ -74,6 +61,15 @@ namespace accessibility
             }
         }
     }
+
+    void ListBoxAccessibleBase::disposing()
+    {
+        SolarMutexGuard g;
+        if ( m_pWindow )
+            m_pWindow->RemoveEventListener( LINK( this, ListBoxAccessibleBase, WindowEventListener ) );
+        m_pWindow = nullptr;
+    }
+
 }   // namespace accessibility
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list