[Libreoffice-commits] core.git: accessibility/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sun Jul 15 07:44:44 UTC 2018


 accessibility/source/extended/AccessibleBrowseBoxTableCell.cxx |   16 ++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

New commits:
commit 43d8bf8beefe31a41733c5c9b443df22ca3c22a9
Author:     Arnaud Versini <arnaud.versini at gmail.com>
AuthorDate: Sun Jul 8 13:30:39 2018 +0200
Commit:     Arnaud Versini <arnaud.versini at libreoffice.org>
CommitDate: Sun Jul 15 09:44:25 2018 +0200

    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 at libreoffice.org>

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 );


More information about the Libreoffice-commits mailing list