summaryrefslogtreecommitdiff
path: root/accessibility/source/extended/AccessibleGridControl.cxx
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2013-12-16 15:35:59 +0100
committerMichael Stahl <mstahl@redhat.com>2013-12-16 16:21:08 +0100
commit9eccfd86eea1603bdca9f31f3984dcf464406bbc (patch)
tree5ed0d7a0d58744b994fbf22c799649258162575e /accessibility/source/extended/AccessibleGridControl.cxx
parenta088b9791aa19ecfe3baf551435773b039f1a12e (diff)
accessibility: Mutex cleanup in AccessibleGridControl* classes
For unknown reasons this uses both SolarMutex and a OBaseMutex::m_aMutex to lock some but not all methods, which seems odd. - remove a third mutex AccessibleGridControl::m_aMutex that appears unused - lock OBaseMutex::m_aMutex in AccessibleGridControlBase::isAlive() which accesses rBHelper members, which should be sufficient - lock SolarMutex in all UNO methods - remove misc weird stuff like TC_SolarMethodGuard Change-Id: I8321757fb4a5043a05c23f2dc9801f5d8c8d911e
Diffstat (limited to 'accessibility/source/extended/AccessibleGridControl.cxx')
-rw-r--r--accessibility/source/extended/AccessibleGridControl.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/accessibility/source/extended/AccessibleGridControl.cxx b/accessibility/source/extended/AccessibleGridControl.cxx
index df7b8a0a7c65..8ce58001b046 100644
--- a/accessibility/source/extended/AccessibleGridControl.cxx
+++ b/accessibility/source/extended/AccessibleGridControl.cxx
@@ -87,7 +87,7 @@ AccessibleGridControl::~AccessibleGridControl()
void SAL_CALL AccessibleGridControl::disposing()
{
- ::osl::MutexGuard aGuard( getOslMutex() );
+ SolarMutexGuard g;
m_pImpl->m_pTable = NULL;
m_pImpl->m_pColumnHeaderBar = NULL;
@@ -122,7 +122,6 @@ sal_Int32 SAL_CALL AccessibleGridControl::getAccessibleChildCount()
throw ( uno::RuntimeException )
{
SolarMutexGuard aSolarGuard;
- ::osl::MutexGuard aGuard( getOslMutex() );
ensureIsAlive();
return m_aTable.GetAccessibleControlCount();
}
@@ -133,7 +132,6 @@ AccessibleGridControl::getAccessibleChild( sal_Int32 nChildIndex )
throw ( lang::IndexOutOfBoundsException, uno::RuntimeException )
{
SolarMutexGuard aSolarGuard;
- ::osl::MutexGuard aGuard( getOslMutex() );
if (nChildIndex<0 || nChildIndex>=getAccessibleChildCount())
throw IndexOutOfBoundsException();
@@ -177,6 +175,8 @@ AccessibleGridControl::getAccessibleChild( sal_Int32 nChildIndex )
sal_Int16 SAL_CALL AccessibleGridControl::getAccessibleRole()
throw ( uno::RuntimeException )
{
+ SolarMutexGuard g;
+
ensureIsAlive();
return AccessibleRole::PANEL;
}
@@ -189,7 +189,6 @@ AccessibleGridControl::getAccessibleAtPoint( const awt::Point& rPoint )
throw ( uno::RuntimeException )
{
SolarMutexGuard aSolarGuard;
- ::osl::MutexGuard aGuard( getOslMutex() );
ensureIsAlive();
Reference< XAccessible > xChild;
@@ -220,7 +219,6 @@ void SAL_CALL AccessibleGridControl::grabFocus()
throw ( uno::RuntimeException )
{
SolarMutexGuard aSolarGuard;
- ::osl::MutexGuard aGuard( getOslMutex() );
ensureIsAlive();
m_aTable.GrabFocus();
}
@@ -229,6 +227,8 @@ void SAL_CALL AccessibleGridControl::grabFocus()
Any SAL_CALL AccessibleGridControl::getAccessibleKeyBinding()
throw ( uno::RuntimeException )
{
+ SolarMutexGuard g;
+
ensureIsAlive();
return Any();
}
@@ -422,7 +422,7 @@ AccessibleGridControlAccess::~AccessibleGridControlAccess()
// -----------------------------------------------------------------------------
void AccessibleGridControlAccess::dispose()
{
- ::osl::MutexGuard aGuard( m_aMutex );
+ SolarMutexGuard g;
m_pContext = NULL;
::comphelper::disposeComponent( m_xContext );
@@ -431,7 +431,7 @@ void AccessibleGridControlAccess::dispose()
// -----------------------------------------------------------------------------
Reference< XAccessibleContext > SAL_CALL AccessibleGridControlAccess::getAccessibleContext() throw ( RuntimeException )
{
- ::osl::MutexGuard aGuard( m_aMutex );
+ SolarMutexGuard g;
OSL_ENSURE( ( m_pContext && m_xContext.is() ) || ( !m_pContext && !m_xContext.is() ),
"accessibility/extended/AccessibleGridControlAccess::getAccessibleContext: inconsistency!" );