summaryrefslogtreecommitdiff
path: root/accessibility/source/extended
diff options
context:
space:
mode:
authorArnaud Versini <arnaud.versini@gmail.com>2018-07-08 13:30:39 +0200
committerArnaud Versini <arnaud.versini@libreoffice.org>2018-07-15 09:44:25 +0200
commit43d8bf8beefe31a41733c5c9b443df22ca3c22a9 (patch)
tree9be48b75a4e2a541ee9ad08bcadb9c2b1cdc292a /accessibility/source/extended
parentd7ab10b62e893453a250d4dc9a8a05235590b1d0 (diff)
accessibility : move ensureIsAlive outside of implGetText and implGetLocale
Change-Id: Ib52a19045cde1b6d9d3f3b5d76c5c59d162a3fa6 Reviewed-on: https://gerrit.libreoffice.org/57153 Tested-by: Jenkins Reviewed-by: Arnaud Versini <arnaud.versini@libreoffice.org>
Diffstat (limited to 'accessibility/source/extended')
-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 );