[orca/gnome-2-30] Fix for bgo#618790 - The active descendant in OOo Writer 3.2's Templates and Documents dialog are no



commit c2b9b6124ae6297e1f79f2816165b660f0fa7cfe
Author: Joanmarie Diggs <joanmarie diggs gmail com>
Date:   Sun May 16 20:57:57 2010 -0400

    Fix for bgo#618790 - The active descendant in OOo Writer 3.2's Templates and Documents dialog are not presented

 src/orca/scripts/apps/soffice/script.py |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/src/orca/scripts/apps/soffice/script.py b/src/orca/scripts/apps/soffice/script.py
index 28adcc5..7a1f16a 100644
--- a/src/orca/scripts/apps/soffice/script.py
+++ b/src/orca/scripts/apps/soffice/script.py
@@ -504,6 +504,21 @@ class Script(default.Script):
                       % (readOnly, debug.getAccessibleDetails(obj)))
         return readOnly
 
+    def isSameObject(self, obj1, obj2):
+        same = default.Script.isSameObject(self, obj1, obj2)
+
+        # 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 \
+           and obj1.getRole() == pyatspi.ROLE_TABLE_CELL \
+           and obj1.getIndexInParent() == obj2.getIndexInParent() == -1:
+            top = self.getTopLevel(obj1)
+            if top and top.getRole() == pyatspi.ROLE_DIALOG:
+                same = False
+
+        return same
+
     def adjustForWriterTable(self, obj):
         """Check to see if we are in Writer, where the object with focus
         is a paragraph, and the parent is the table cell. If it is, then,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]