[orca] Handle a false positive in isSameObject() which prevented LO paragraph presentation
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Handle a false positive in isSameObject() which prevented LO paragraph presentation
- Date: Mon, 24 Nov 2014 14:34:18 +0000 (UTC)
commit d9bb5d998aa7040d2820d12137804f8c5d47e9c2
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Mon Nov 24 09:31:54 2014 -0500
Handle a false positive in isSameObject() which prevented LO paragraph presentation
src/orca/scripts/apps/soffice/script_utilities.py | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/src/orca/scripts/apps/soffice/script_utilities.py
b/src/orca/scripts/apps/soffice/script_utilities.py
index 8f7b81f..105b705 100644
--- a/src/orca/scripts/apps/soffice/script_utilities.py
+++ b/src/orca/scripts/apps/soffice/script_utilities.py
@@ -280,11 +280,19 @@ class Utilities(script_utilities.Utilities):
def isSameObject(self, obj1, obj2):
same = script_utilities.Utilities.isSameObject(self, obj1, obj2)
+ if not same or obj1 == obj2:
+ return same
+
+ # The document frame currently contains just the active page,
+ # resulting in false positives. So for paragraphs, rely upon
+ # the equality check.
+ if obj1.getRole() == obj2.getRole() == pyatspi.ROLE_PARAGRAPH:
+ return False
# Handle the case of false positives in dialog boxes resulting
# from getIndexInParent() returning a bogus value. bgo#618790.
#
- if same and (obj1 != obj2) and not obj1.name \
+ if not obj1.name \
and obj1.getRole() == pyatspi.ROLE_TABLE_CELL \
and obj1.getIndexInParent() == obj2.getIndexInParent() == -1:
top = self.topLevelObject(obj1)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]