summaryrefslogtreecommitdiff
path: root/accessibility
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-11-01 14:53:41 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-11-01 14:54:13 +0200
commit49c7bc5af291dbf6b34bcea82c9c0513f65b308b (patch)
tree6c0c073bd2f5ea9709f760bc90d44439c5e71830 /accessibility
parent53949256dd1fb0741009cc46e112ba3a00c33b39 (diff)
loplugin:expandablemethods in accessibility
Change-Id: I51d13c12274d99623b97f611e30204bea624cbfc
Diffstat (limited to 'accessibility')
-rw-r--r--accessibility/inc/extended/AccessibleBrowseBox.hxx5
-rw-r--r--accessibility/inc/extended/AccessibleBrowseBoxTableBase.hxx3
-rw-r--r--accessibility/inc/extended/AccessibleGridControl.hxx5
-rw-r--r--accessibility/inc/extended/AccessibleGridControlTableBase.hxx7
-rw-r--r--accessibility/inc/extended/accessibleiconchoicectrl.hxx4
-rw-r--r--accessibility/inc/extended/accessibleiconchoicectrlentry.hxx4
-rw-r--r--accessibility/inc/extended/accessiblelistbox.hxx4
-rw-r--r--accessibility/inc/extended/accessiblelistboxentry.hxx4
-rw-r--r--accessibility/inc/extended/accessibletablistboxtable.hxx4
-rw-r--r--accessibility/inc/extended/listboxaccessible.hxx4
-rw-r--r--accessibility/source/extended/AccessibleBrowseBox.cxx5
-rw-r--r--accessibility/source/extended/AccessibleBrowseBoxTableBase.cxx8
-rw-r--r--accessibility/source/extended/AccessibleGridControl.cxx6
-rw-r--r--accessibility/source/extended/AccessibleGridControlTableBase.cxx15
-rw-r--r--accessibility/source/extended/accessibleiconchoicectrl.cxx18
-rw-r--r--accessibility/source/extended/accessibleiconchoicectrlentry.cxx18
-rw-r--r--accessibility/source/extended/accessiblelistbox.cxx18
-rw-r--r--accessibility/source/extended/accessiblelistboxentry.cxx18
-rw-r--r--accessibility/source/extended/accessibletablistboxtable.cxx9
-rw-r--r--accessibility/source/extended/listboxaccessible.cxx24
20 files changed, 29 insertions, 154 deletions
diff --git a/accessibility/inc/extended/AccessibleBrowseBox.hxx b/accessibility/inc/extended/AccessibleBrowseBox.hxx
index 12948bcb2d9a..bc6f1a5ea384 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 70cab0dfb080..6d0ff563271f 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 fed499099583..c99ac4ece64d 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 8a4d981b21c0..9276247f3a5a 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 feb66df68ed2..8b54e3058a86 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 680aade8a4ed..66cfc092bed6 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 d51458ec25c5..e8249be5d20a 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 447324a6174a..55cb1bb3b440 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 5a41660d518f..6a12f2ad829b 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 7c84e19f8ec7..e93fa0225ad1 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 543c638912da..73e982370992 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 0abc93ba7719..5bc990dce7ac 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 9f7acaa7f86b..2de159c4e38a 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 a98e1f58b9c4..0a3e09008f6f 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 7b4708c0ad57..cacf65c5cf3b 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 d60fe598557d..591c254e775a 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 864167c7374a..fb9b58054d46 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 cd70de11a83d..39ece7abea65 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 1e25ee8837ea..529892445008 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 db388f3a5732..63cb02db16f7 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: */