[orca] Present table cell text, if present, rather than the name in LibreOffice Writer
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Present table cell text, if present, rather than the name in LibreOffice Writer
- Date: Wed, 16 Oct 2013 14:54:12 +0000 (UTC)
commit 946ee612d4ead98e1a51437590c550dc19badc37
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Wed Oct 16 10:51:30 2013 -0400
Present table cell text, if present, rather than the name in LibreOffice Writer
src/orca/scripts/apps/soffice/script_utilities.py | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/src/orca/scripts/apps/soffice/script_utilities.py
b/src/orca/scripts/apps/soffice/script_utilities.py
index bdee230..3848566 100644
--- a/src/orca/scripts/apps/soffice/script_utilities.py
+++ b/src/orca/scripts/apps/soffice/script_utilities.py
@@ -69,10 +69,17 @@ class Utilities(script_utilities.Utilities):
any text being shown.
"""
- if obj.getRole() == pyatspi.ROLE_PUSH_BUTTON and obj.name:
+ role = obj.getRole()
+ if role == pyatspi.ROLE_PUSH_BUTTON and obj.name:
return obj.name
- else:
- return script_utilities.Utilities.displayedText(self, obj)
+
+ if role == pyatspi.ROLE_TABLE_CELL:
+ strings = list(map(self.displayedText, [child for child in obj]))
+ text = "\n".join(strings)
+ if text.strip():
+ return text
+
+ return script_utilities.Utilities.displayedText(self, obj)
def isReadOnlyTextArea(self, obj):
"""Returns True if obj is a text entry area that is read only."""
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]