summaryrefslogtreecommitdiff
path: root/accessibility/source
diff options
context:
space:
mode:
Diffstat (limited to 'accessibility/source')
-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
10 files changed, 27 insertions, 112 deletions
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: */