[orca/gnome-3-14] Handle a false positive in isSameObject() which prevented LO paragraph presentation



commit 31ed3ed2796d54dac72315b763413cde93f4a485
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]