[orca] Fix for bgo#624641 - Orca says "grayed" when focus is initially given to the table in OOo Calc



commit 10e4dff425651183f5287d420638a5b2c16082d0
Author: Joanmarie Diggs <joanmarie diggs gmail com>
Date:   Sat Jul 17 21:34:40 2010 -0400

    Fix for bgo#624641 - Orca says "grayed" when focus is initially given to the table in OOo Calc

 src/orca/scripts/apps/soffice/speech_generator.py |   14 ++++++++++++++
 test/keystrokes/oocalc/bug_364086.py              |    6 +++---
 test/keystrokes/oocalc/bug_364407.py              |    4 ++--
 test/keystrokes/oocalc/bug_433398.py              |    4 ++--
 test/keystrokes/oocalc/bug_435307.py              |    6 +++---
 5 files changed, 24 insertions(+), 10 deletions(-)
---
diff --git a/src/orca/scripts/apps/soffice/speech_generator.py b/src/orca/scripts/apps/soffice/speech_generator.py
index fb3ec49..7a5f470 100644
--- a/src/orca/scripts/apps/soffice/speech_generator.py
+++ b/src/orca/scripts/apps/soffice/speech_generator.py
@@ -130,6 +130,20 @@ class SpeechGenerator(speech_generator.SpeechGenerator):
                 self, obj, **args))
         return result
 
+    def _generateAvailability(self, obj, **args):
+        """Returns an array of strings for use by speech and braille that
+        represent the grayed/sensitivity/availability state of the
+        object, but only if it is insensitive (i.e., grayed out and
+        inactive).  Otherwise, and empty array will be returned.
+        """
+
+        result = []
+        if not self._script.isSpreadSheetCell(obj, startFromTable=True):
+            result.extend(speech_generator.SpeechGenerator.\
+                _generateAvailability(self, obj, **args))
+
+        return result
+
     def _generateDescription(self, obj, **args):
         """Returns an array of strings (and possibly voice and audio
         specifications) that represent the description of the object,
diff --git a/test/keystrokes/oocalc/bug_364086.py b/test/keystrokes/oocalc/bug_364086.py
index aad54d0..5320f14 100644
--- a/test/keystrokes/oocalc/bug_364086.py
+++ b/test/keystrokes/oocalc/bug_364086.py
@@ -33,13 +33,13 @@ sequence.append(KeyComboAction("Return"))
 sequence.append(WaitForFocus("Sheet Sheet1", acc_role=pyatspi.ROLE_TABLE))
 sequence.append(utils.AssertPresentationAction(
     "File->New->Spreadsheet",
-    ["BUG? - Shouldn't we also be saying the cell? And the 'grayed' bit is probably not desirable.",
+    ["BUG? - Shouldn't we also be saying the cell?",
      "BRAILLE LINE:  'soffice Application Untitled 2 - " + utils.getOOoName("Calc") + " Frame'",
      "     VISIBLE:  'Untitled 2 - " + utils.getOOoName("Calc") + " (Frame|)', cursor=1",
      "BRAILLE LINE:  'soffice Application Untitled 2 - " + utils.getOOoName("Calc") + " Frame Untitled 2 - " + utils.getOOoName("Calc") + " RootPane ScrollPane Document view3 Sheet Sheet1 Table'",
      "     VISIBLE:  'Sheet Sheet1 Table', cursor=1",
      "SPEECH OUTPUT: 'Untitled 2 - " + utils.getOOoName("Calc") + " frame'",
-     "SPEECH OUTPUT: 'Sheet Sheet1 table grayed'"]))
+     "SPEECH OUTPUT: 'Sheet Sheet1 table'"]))
 
 ######################################################################
 # 3. Type "hello" (without the quotes), followed by Return.
@@ -56,7 +56,7 @@ sequence.append(utils.AssertPresentationAction(
      "     VISIBLE:  'Cell A1 ', cursor=1",
      "BRAILLE LINE:  'soffice Application Untitled 2 - " + utils.getOOoName("Calc") + " Frame Untitled 2 - " + utils.getOOoName("Calc") + " RootPane ScrollPane Document view3 Sheet Sheet1 Table Cell A2 '",
      "     VISIBLE:  'Cell A2 ', cursor=1",
-     "SPEECH OUTPUT: 'Sheet Sheet1 table grayed'",
+     "SPEECH OUTPUT: 'Sheet Sheet1 table'",
      "SPEECH OUTPUT: 'A1'",
      "SPEECH OUTPUT: 'A2'"]))
 
diff --git a/test/keystrokes/oocalc/bug_364407.py b/test/keystrokes/oocalc/bug_364407.py
index 8bc5134..b22c709 100644
--- a/test/keystrokes/oocalc/bug_364407.py
+++ b/test/keystrokes/oocalc/bug_364407.py
@@ -31,13 +31,13 @@ sequence.append(KeyComboAction("Return"))
 sequence.append(WaitForFocus("Sheet Sheet1", acc_role=pyatspi.ROLE_TABLE))
 sequence.append(utils.AssertPresentationAction(
     "File->New->Spreadsheet",
-    ["BUG? - Shouldn't we also be saying the cell? And the 'grayed' bit is probably not desirable.",
+    ["BUG? - Shouldn't we also be saying the cell?",
      "BRAILLE LINE:  'soffice Application Untitled 2 - " + utils.getOOoName("Calc") + " Frame'",
      "     VISIBLE:  'Untitled 2 - " + utils.getOOoName("Calc") + " (Frame|)', cursor=1",
      "BRAILLE LINE:  'soffice Application Untitled 2 - " + utils.getOOoName("Calc") + " Frame Untitled 2 - " + utils.getOOoName("Calc") + " RootPane ScrollPane Document view3 Sheet Sheet1 Table'",
      "     VISIBLE:  'Sheet Sheet1 Table', cursor=1",
      "SPEECH OUTPUT: 'Untitled 2 - " + utils.getOOoName("Calc") + " frame'",
-     "SPEECH OUTPUT: 'Sheet Sheet1 table grayed'"]))
+     "SPEECH OUTPUT: 'Sheet Sheet1 table'"]))
 
 ######################################################################
 # 3. Type Control-Shift-t to give focus to the spreadsheet cell locator.
diff --git a/test/keystrokes/oocalc/bug_433398.py b/test/keystrokes/oocalc/bug_433398.py
index d2a50c2..ff44ef1 100644
--- a/test/keystrokes/oocalc/bug_433398.py
+++ b/test/keystrokes/oocalc/bug_433398.py
@@ -55,7 +55,7 @@ sequence.append(utils.AssertPresentationAction(
      "     VISIBLE:  'Sheet Sheet1 Table', cursor=1",
      "BRAILLE LINE:  'soffice Application fruit.ods - " + utils.getOOoName("Calc") + " Frame fruit.ods - " + utils.getOOoName("Calc") + " RootPane ScrollPane Document view4 Sheet Sheet1 Table Apples Cell B1 '",
      "     VISIBLE:  'Apples Cell B1 ', cursor=1",
-     "SPEECH OUTPUT: 'Sheet Sheet1 table grayed'",
+     "SPEECH OUTPUT: 'Sheet Sheet1 table'",
      "SPEECH OUTPUT: 'Apples B1'"]))
 
 ######################################################################
@@ -94,7 +94,7 @@ sequence.append(utils.AssertPresentationAction(
      "     VISIBLE:  'Sheet Sheet1 Table', cursor=1",
      "BRAILLE LINE:  'soffice Application fruit.ods - " + utils.getOOoName("Calc") + " Frame fruit.ods - " + utils.getOOoName("Calc") + " RootPane ScrollPane Document view3 Sheet Sheet1 Table Apples Cell B1 '",
      "     VISIBLE:  'Apples Cell B1 ', cursor=1",
-     "SPEECH OUTPUT: 'Sheet Sheet1 table grayed'",
+     "SPEECH OUTPUT: 'Sheet Sheet1 table'",
      "SPEECH OUTPUT: 'Apples B1.'",
      "SPEECH OUTPUT: '6 characters too long'"]))
 
diff --git a/test/keystrokes/oocalc/bug_435307.py b/test/keystrokes/oocalc/bug_435307.py
index 88667ad..1f9e94a 100644
--- a/test/keystrokes/oocalc/bug_435307.py
+++ b/test/keystrokes/oocalc/bug_435307.py
@@ -44,7 +44,7 @@ sequence.append(utils.AssertPresentationAction(
      "     VISIBLE:  'Sheet Sheet1 Table', cursor=1",
      "BRAILLE LINE:  'soffice Application fruit.ods - " + utils.getOOoName("Calc") + " Frame fruit.ods - " + utils.getOOoName("Calc") + " RootPane ScrollPane Document view4 Sheet Sheet1 Table Apples Cell B1 '",
      "     VISIBLE:  'Apples Cell B1 ', cursor=1",
-     "SPEECH OUTPUT: 'Sheet Sheet1 table grayed'",
+     "SPEECH OUTPUT: 'Sheet Sheet1 table'",
      "SPEECH OUTPUT: 'Apples B1.'"]))
 
 ######################################################################
@@ -60,12 +60,12 @@ sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("<Alt>f"))
 sequence.append(utils.AssertPresentationAction(
     "Type Alt-f to select the Freeze menu item [2]",
-    ["BUG? - Our 'text does not fit feature might need some tweaking. In this case the contents are not too long. False positive likely due to the height",
+    ["BUG? - Our 'text does not fit feature might need some tweaking. In this case the contents are not too long. This only seems to happen with the regression tests; not when performing the same task manually. So it might be a KNOWN ISSUE instead.",
      "BRAILLE LINE:  'soffice Application fruit.ods - " + utils.getOOoName("Calc") + " Frame fruit.ods - " + utils.getOOoName("Calc") + " RootPane ScrollPane Document view3 Sheet Sheet1 Table'",
      "     VISIBLE:  'Sheet Sheet1 Table', cursor=1",
      "BRAILLE LINE:  'soffice Application fruit.ods - " + utils.getOOoName("Calc") + " Frame fruit.ods - " + utils.getOOoName("Calc") + " RootPane ScrollPane Document view3 Sheet Sheet1 Table Apples Cell B1 '",
      "     VISIBLE:  'Apples Cell B1 ', cursor=1",
-     "SPEECH OUTPUT: 'Sheet Sheet1 table grayed'",
+     "SPEECH OUTPUT: 'Sheet Sheet1 table'",
      "SPEECH OUTPUT: 'Apples B1.'",
      "SPEECH OUTPUT: '6 characters too long'"]))
 



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