[orca] Additional sanity checks for LibreOffice Calc dead accessibles (bug 672787)
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Additional sanity checks for LibreOffice Calc dead accessibles (bug 672787)
- Date: Wed, 28 Mar 2012 12:44:19 +0000 (UTC)
commit 6f057ddf5164944f0f40ce1cfca7cabce69df7ca
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Wed Mar 28 08:43:27 2012 -0400
Additional sanity checks for LibreOffice Calc dead accessibles (bug 672787)
src/orca/script_utilities.py | 5 ++++-
src/orca/scripts/apps/soffice/script.py | 5 ++++-
src/orca/scripts/apps/soffice/speech_generator.py | 4 ++--
3 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/src/orca/script_utilities.py b/src/orca/script_utilities.py
index 05e2dad..2a1bf03 100644
--- a/src/orca/script_utilities.py
+++ b/src/orca/script_utilities.py
@@ -2935,7 +2935,10 @@ class Utilities:
# Use ARIA "valuetext" attribute if present. See
# http://bugzilla.gnome.org/show_bug.cgi?id=552965
#
- attributes = obj.getAttributes()
+ try:
+ attributes = obj.getAttributes()
+ except:
+ return ""
for attribute in attributes:
if attribute.startswith("valuetext"):
return attribute[10:]
diff --git a/src/orca/scripts/apps/soffice/script.py b/src/orca/scripts/apps/soffice/script.py
index 16cc0e1..40803bc 100644
--- a/src/orca/scripts/apps/soffice/script.py
+++ b/src/orca/scripts/apps/soffice/script.py
@@ -1842,7 +1842,10 @@ class Script(default.Script):
if not event.type.startswith('object:children-changed:add'):
return
- role = event.any_data.getRole()
+ try:
+ role = event.any_data.getRole()
+ except:
+ role = None
if role == pyatspi.ROLE_TABLE:
if self.isSpreadSheetCell(event.any_data, True):
orca.setLocusOfFocus(event, event.any_data)
diff --git a/src/orca/scripts/apps/soffice/speech_generator.py b/src/orca/scripts/apps/soffice/speech_generator.py
index 5ba72a7..6d26c07 100644
--- a/src/orca/scripts/apps/soffice/speech_generator.py
+++ b/src/orca/scripts/apps/soffice/speech_generator.py
@@ -348,8 +348,8 @@ class SpeechGenerator(speech_generator.SpeechGenerator):
except NotImplementedError:
parentTable = None
index = self._script.utilities.cellIndex(obj)
- if "lastColumn" in self._script.pointOfReference and \
- self._script.pointOfReference["lastColumn"] != \
+ if parentTable and "lastColumn" in self._script.pointOfReference \
+ and self._script.pointOfReference["lastColumn"] != \
parentTable.getColumnAtIndex(index):
if table in self._script.dynamicColumnHeaders:
row = self._script.dynamicColumnHeaders[table]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]