summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--accessibility/source/extended/AccessibleBrowseBoxTableCell.cxx16
1 files changed, 14 insertions, 2 deletions
diff --git a/accessibility/source/extended/AccessibleBrowseBoxTableCell.cxx b/accessibility/source/extended/AccessibleBrowseBoxTableCell.cxx
index 726f500e58e3..305a0607a657 100644
--- a/accessibility/source/extended/AccessibleBrowseBoxTableCell.cxx
+++ b/accessibility/source/extended/AccessibleBrowseBoxTableCell.cxx
@@ -50,13 +50,11 @@ namespace accessibility
// implementation of a table cell
OUString AccessibleBrowseBoxTableCell::implGetText()
{
- ensureIsAlive();
return mpBrowseBox->GetAccessibleCellText( getRowPos(), static_cast< sal_uInt16 >( getColumnPos() ) );
}
css::lang::Locale AccessibleBrowseBoxTableCell::implGetLocale()
{
- ensureIsAlive();
return mpBrowseBox->GetAccessible()->getAccessibleContext()->getLocale();
}
@@ -219,6 +217,7 @@ namespace accessibility
sal_Bool SAL_CALL AccessibleBrowseBoxTableCell::setCaretPosition ( sal_Int32 nIndex )
{
SolarMethodGuard aGuard(getMutex());
+ ensureIsAlive();
if ( !implIsValidRange( nIndex, nIndex, implGetText().getLength() ) )
throw IndexOutOfBoundsException();
@@ -228,12 +227,14 @@ namespace accessibility
sal_Unicode SAL_CALL AccessibleBrowseBoxTableCell::getCharacter( sal_Int32 nIndex )
{
SolarMethodGuard aGuard(getMutex());
+ ensureIsAlive();
return OCommonAccessibleText::implGetCharacter( implGetText(), nIndex );
}
css::uno::Sequence< css::beans::PropertyValue > SAL_CALL AccessibleBrowseBoxTableCell::getCharacterAttributes( sal_Int32 nIndex, const css::uno::Sequence< OUString >& )
{
SolarMethodGuard aGuard(getMutex());
+ ensureIsAlive();
OUString sText( implGetText() );
@@ -245,6 +246,7 @@ namespace accessibility
sal_Int32 SAL_CALL AccessibleBrowseBoxTableCell::getCharacterCount( )
{
SolarMethodGuard aGuard(getMutex());
+ ensureIsAlive();
return implGetText().getLength();
}
@@ -252,24 +254,28 @@ namespace accessibility
OUString SAL_CALL AccessibleBrowseBoxTableCell::getSelectedText( )
{
SolarMethodGuard aGuard(getMutex());
+ ensureIsAlive();
return OCommonAccessibleText::getSelectedText( );
}
sal_Int32 SAL_CALL AccessibleBrowseBoxTableCell::getSelectionStart( )
{
SolarMethodGuard aGuard(getMutex());
+ ensureIsAlive();
return OCommonAccessibleText::getSelectionStart( );
}
sal_Int32 SAL_CALL AccessibleBrowseBoxTableCell::getSelectionEnd( )
{
SolarMethodGuard aGuard(getMutex());
+ ensureIsAlive();
return OCommonAccessibleText::getSelectionEnd( );
}
sal_Bool SAL_CALL AccessibleBrowseBoxTableCell::setSelection( sal_Int32 nStartIndex, sal_Int32 nEndIndex )
{
SolarMethodGuard aGuard(getMutex());
+ ensureIsAlive();
if ( !implIsValidRange( nStartIndex, nEndIndex, implGetText().getLength() ) )
throw IndexOutOfBoundsException();
@@ -279,36 +285,42 @@ namespace accessibility
OUString SAL_CALL AccessibleBrowseBoxTableCell::getText( )
{
SolarMethodGuard aGuard(getMutex());
+ ensureIsAlive();
return implGetText( );
}
OUString SAL_CALL AccessibleBrowseBoxTableCell::getTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex )
{
SolarMethodGuard aGuard(getMutex());
+ ensureIsAlive();
return OCommonAccessibleText::implGetTextRange( implGetText(), nStartIndex, nEndIndex );
}
css::accessibility::TextSegment SAL_CALL AccessibleBrowseBoxTableCell::getTextAtIndex( sal_Int32 nIndex, sal_Int16 aTextType )
{
SolarMethodGuard aGuard(getMutex());
+ ensureIsAlive();
return OCommonAccessibleText::getTextAtIndex( nIndex ,aTextType);
}
css::accessibility::TextSegment SAL_CALL AccessibleBrowseBoxTableCell::getTextBeforeIndex( sal_Int32 nIndex, sal_Int16 aTextType )
{
SolarMethodGuard aGuard(getMutex());
+ ensureIsAlive();
return OCommonAccessibleText::getTextBeforeIndex( nIndex ,aTextType);
}
css::accessibility::TextSegment SAL_CALL AccessibleBrowseBoxTableCell::getTextBehindIndex( sal_Int32 nIndex, sal_Int16 aTextType )
{
SolarMethodGuard aGuard(getMutex());
+ ensureIsAlive();
return OCommonAccessibleText::getTextBehindIndex( nIndex ,aTextType);
}
sal_Bool SAL_CALL AccessibleBrowseBoxTableCell::copyText( sal_Int32 nStartIndex, sal_Int32 nEndIndex )
{
SolarMethodGuard aGuard(getMutex());
+ ensureIsAlive();
OUString sText = implGetText();
checkIndex_Impl( nStartIndex, sText );