orca r4071 - in trunk: . src/orca/scripts/apps/soffice test/keystrokes/oowriter



Author: joanied
Date: Wed Jul 30 16:56:57 2008
New Revision: 4071
URL: http://svn.gnome.org/viewvc/orca?rev=4071&view=rev

Log:
* test/keystrokes/oowriter/bug_430402.py:
  test/keystrokes/oowriter/bug_382415.py:
  test/keystrokes/oowriter/bug_413909.py:
  test/keystrokes/oowriter/bug_355733.py:
  test/keystrokes/oowriter/bug_353268.py:
  test/keystrokes/oowriter/bug_350219.py:
  test/keystrokes/oowriter/bug_382408.py:
  test/keystrokes/oowriter/bug_382418.py:
  test/keystrokes/oowriter/bug_382880.py:
  test/keystrokes/oowriter/bug_469367.py:
  test/keystrokes/oowriter/bug_362979.py:
  test/keystrokes/oowriter/bug_382888.py:
  src/orca/scripts/apps/soffice/script.py:
  Fix for bug #429390 - Braille stays on current line after
  pressing return at end of line in OOo Writer.


Modified:
   trunk/ChangeLog
   trunk/src/orca/scripts/apps/soffice/script.py
   trunk/test/keystrokes/oowriter/bug_350219.py
   trunk/test/keystrokes/oowriter/bug_353268.py
   trunk/test/keystrokes/oowriter/bug_355733.py
   trunk/test/keystrokes/oowriter/bug_362979.py
   trunk/test/keystrokes/oowriter/bug_382408.py
   trunk/test/keystrokes/oowriter/bug_382415.py
   trunk/test/keystrokes/oowriter/bug_382418.py
   trunk/test/keystrokes/oowriter/bug_382880.py
   trunk/test/keystrokes/oowriter/bug_382888.py
   trunk/test/keystrokes/oowriter/bug_413909.py
   trunk/test/keystrokes/oowriter/bug_430402.py
   trunk/test/keystrokes/oowriter/bug_469367.py

Modified: trunk/src/orca/scripts/apps/soffice/script.py
==============================================================================
--- trunk/src/orca/scripts/apps/soffice/script.py	(original)
+++ trunk/src/orca/scripts/apps/soffice/script.py	Wed Jul 30 16:56:57 2008
@@ -1758,11 +1758,15 @@
             self.lastCell = event.source.parent
             return
 
-        # Two events are received when the caret moves
-        # to a new paragraph in oowriter. The first is a focus event
-        # (in the form of object:state-changed:focused
-        # instead of focus:). The second is a caret-moved
-        # event. Just set the locusOfFocus for the first event.
+        # When a new paragraph receives focus, we get a caret-moved event and
+        # two focus events (the first being object:state-changed:focused).
+        # The caret-moved event will cause us to present the text at the new
+        # location, so it is safe to set the locusOfFocus silently here.
+        # However, if we just created a new paragraph by pressing Return at
+        # the end of the current paragraph, we will only get a caret-moved
+        # event for the paragraph that just gave up focus (detail1 == -1).
+        # In this case, we will keep displaying the previous line of text,
+        # so we'll do an updateBraille() just in case.
         #
         if event.type.startswith("object:state-changed:focused"):
             rolesList = [pyatspi.ROLE_PARAGRAPH, \
@@ -1771,10 +1775,12 @@
                          pyatspi.ROLE_PANEL, \
                          pyatspi.ROLE_ROOT_PANE, \
                          pyatspi.ROLE_FRAME]
-            if self.isDesiredFocusedItem(event.source, rolesList) and \
-               event.source != self.currentParagraph:
+            if self.isDesiredFocusedItem(event.source, rolesList) \
+               and event.source != self.currentParagraph \
+               and event.detail1 == 1:
                 self.currentParagraph = event.source
                 orca.setLocusOfFocus(event, event.source, False)
+                self.updateBraille(event.source)
                 return
 
         # If we are in the sbase Table Wizard, try to reduce the numerous

Modified: trunk/test/keystrokes/oowriter/bug_350219.py
==============================================================================
--- trunk/test/keystrokes/oowriter/bug_350219.py	(original)
+++ trunk/test/keystrokes/oowriter/bug_350219.py	Wed Jul 30 16:56:57 2008
@@ -34,6 +34,8 @@
      "     VISIBLE:  'Untitled[ ]*2 - *",
      "BRAILLE LINE:  'soffice Application Untitled[ ]*2 - " + utils.getOOoName("Writer") + " Frame Untitled[ ]*2 - " + utils.getOOoName("Writer") + " RootPane Panel'",
      "     VISIBLE:  'Panel', cursor=1",
+     "BRAILLE LINE:  'soffice Application Untitled[ ]*2 - " + utils.getOOoName("Writer") + " Frame Untitled[ ]*2 - " + utils.getOOoName("Writer") + " RootPane ScrollPane Document view  \$l'",
+     "     VISIBLE:  ' $l', cursor=1",
      "SPEECH OUTPUT: 'Untitled[ ]*2 - " + utils.getOOoName("Writer") + " frame'",
      "SPEECH OUTPUT: ''",
      "SPEECH OUTPUT: 'panel'"]))

Modified: trunk/test/keystrokes/oowriter/bug_353268.py
==============================================================================
--- trunk/test/keystrokes/oowriter/bug_353268.py	(original)
+++ trunk/test/keystrokes/oowriter/bug_353268.py	Wed Jul 30 16:56:57 2008
@@ -49,6 +49,8 @@
     "Return to top of document",
     ["BRAILLE LINE:  'soffice Application Untitled[ ]*2 - " + utils.getOOoName("Writer") + " Frame Untitled[ ]*2 - " + utils.getOOoName("Writer") + " RootPane ScrollPane Document view Line 1 \$l'",
      "     VISIBLE:  'Line 1 $l', cursor=1",
+     "BRAILLE LINE:  'soffice Application Untitled[ ]*2 - " + utils.getOOoName("Writer") + " Frame Untitled[ ]*2 - " + utils.getOOoName("Writer") + " RootPane ScrollPane Document view Line 1 \$l'",
+     "     VISIBLE:  'Line 1 $l', cursor=1",
      "SPEECH OUTPUT: 'Line 1'"]))
 
 ######################################################################
@@ -61,6 +63,8 @@
     "Arrow down over first line of text",
     ["BRAILLE LINE:  'soffice Application Untitled[ ]*2 - " + utils.getOOoName("Writer") + " Frame Untitled[ ]*2 - " + utils.getOOoName("Writer") + " RootPane ScrollPane Document view Line 2 \$l'",
      "     VISIBLE:  'Line 2 $l', cursor=1",
+     "BRAILLE LINE:  'soffice Application Untitled[ ]*2 - " + utils.getOOoName("Writer") + " Frame Untitled[ ]*2 - " + utils.getOOoName("Writer") + " RootPane ScrollPane Document view Line 2 \$l'",
+     "     VISIBLE:  'Line 2 $l', cursor=1",
      "SPEECH OUTPUT: 'Line 2'"]))
 
 ######################################################################
@@ -73,6 +77,8 @@
     "Arrow down over second line of text",
     ["BRAILLE LINE:  'soffice Application Untitled[ ]*2 - " + utils.getOOoName("Writer") + " Frame Untitled[ ]*2 - " + utils.getOOoName("Writer") + " RootPane ScrollPane Document view  \$l'",
      "     VISIBLE:  ' $l', cursor=1",
+     "BRAILLE LINE:  'soffice Application Untitled[ ]*2 - " + utils.getOOoName("Writer") + " Frame Untitled[ ]*2 - " + utils.getOOoName("Writer") + " RootPane ScrollPane Document view  \$l'",
+     "     VISIBLE:  ' $l', cursor=1",
      "SPEECH OUTPUT: 'blank'"]))
 
 ######################################################################

Modified: trunk/test/keystrokes/oowriter/bug_355733.py
==============================================================================
--- trunk/test/keystrokes/oowriter/bug_355733.py	(original)
+++ trunk/test/keystrokes/oowriter/bug_355733.py	Wed Jul 30 16:56:57 2008
@@ -58,6 +58,8 @@
     "Return to top of document",
     ["BRAILLE LINE:  'soffice Application Untitled[ ]*2 - " + utils.getOOoName("Writer") + " Frame Untitled[ ]*2 - " + utils.getOOoName("Writer") + " RootPane ScrollPane Document view Line 1 \$l'",
      "     VISIBLE:  'Line 1 $l', cursor=1",
+     "BRAILLE LINE:  'soffice Application Untitled[ ]*2 - " + utils.getOOoName("Writer") + " Frame Untitled[ ]*2 - " + utils.getOOoName("Writer") + " RootPane ScrollPane Document view Line 1 \$l'",
+     "     VISIBLE:  'Line 1 $l', cursor=1",
      "SPEECH OUTPUT: 'Line 1'"]))
 
 ######################################################################

Modified: trunk/test/keystrokes/oowriter/bug_362979.py
==============================================================================
--- trunk/test/keystrokes/oowriter/bug_362979.py	(original)
+++ trunk/test/keystrokes/oowriter/bug_362979.py	Wed Jul 30 16:56:57 2008
@@ -79,6 +79,8 @@
     "Move cursor to start of document",
     ["BRAILLE LINE:  'soffice Application Untitled[ ]*2 - " + utils.getOOoName("Writer") + " Frame Untitled[ ]*2 - " + utils.getOOoName("Writer") + " RootPane ScrollPane Document view âLine 1 \$l'",
      "     VISIBLE:  'âLine 1 \$l', cursor=2",
+     "BRAILLE LINE:  'soffice Application Untitled[ ]*2 - " + utils.getOOoName("Writer") + " Frame Untitled[ ]*2 - " + utils.getOOoName("Writer") + " RootPane ScrollPane Document view âLine 1 \$l'",
+     "     VISIBLE:  'âLine 1 \$l', cursor=2",
      "SPEECH OUTPUT: 'âLine 1'"]))
 
 ######################################################################
@@ -91,6 +93,8 @@
     "Move to second bulleted line",
     ["BRAILLE LINE:  'soffice Application Untitled[ ]*2 - " + utils.getOOoName("Writer") + " Frame Untitled[ ]*2 - " + utils.getOOoName("Writer") + " RootPane ScrollPane Document view âLine 2 \$l'",
      "     VISIBLE:  'âLine 2 \$l', cursor=2",
+     "BRAILLE LINE:  'soffice Application Untitled[ ]*2 - " + utils.getOOoName("Writer") + " Frame Untitled[ ]*2 - " + utils.getOOoName("Writer") + " RootPane ScrollPane Document view âLine 2 \$l'",
+     "     VISIBLE:  'âLine 2 \$l', cursor=2",
      "SPEECH OUTPUT: 'âLine 2'"]))
 
 ######################################################################

Modified: trunk/test/keystrokes/oowriter/bug_382408.py
==============================================================================
--- trunk/test/keystrokes/oowriter/bug_382408.py	(original)
+++ trunk/test/keystrokes/oowriter/bug_382408.py	Wed Jul 30 16:56:57 2008
@@ -37,6 +37,8 @@
     "Type a down arrow to move to the next line",
     ["BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "table-sample(.odt|)", "This is a test. \$l") + "'",
      "     VISIBLE:  'This is a test. $l', cursor=16",
+     "BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "table-sample(.odt|)", "This is a test. \$l") + "'",
+     "     VISIBLE:  'This is a test. $l', cursor=16",
      "SPEECH OUTPUT: 'This is a test.'"]))
 
 ######################################################################

Modified: trunk/test/keystrokes/oowriter/bug_382415.py
==============================================================================
--- trunk/test/keystrokes/oowriter/bug_382415.py	(original)
+++ trunk/test/keystrokes/oowriter/bug_382415.py	Wed Jul 30 16:56:57 2008
@@ -30,6 +30,8 @@
     "Down arrow to next line",
     ["BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "table-sample(.odt|)", "This is a test. \$l") + "'",
      "     VISIBLE:  'This is a test. $l', cursor=16",
+     "BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "table-sample(.odt|)", "This is a test. \$l") + "'",
+     "     VISIBLE:  'This is a test. $l', cursor=16",
      "SPEECH OUTPUT: 'This is a test.'"]))
 
 ######################################################################

Modified: trunk/test/keystrokes/oowriter/bug_382418.py
==============================================================================
--- trunk/test/keystrokes/oowriter/bug_382418.py	(original)
+++ trunk/test/keystrokes/oowriter/bug_382418.py	Wed Jul 30 16:56:57 2008
@@ -67,6 +67,8 @@
      "     VISIBLE:  'Paragraph', cursor=1",
      "BRAILLE LINE:  'soffice Application Untitled[ ]*2 - " + utils.getOOoName("Writer") + " Frame Untitled[ ]*2 - " + utils.getOOoName("Writer") + " RootPane ScrollPane Document view Line 1 \$l'",
      "     VISIBLE:  'Line 1 $l', cursor=1",
+     "BRAILLE LINE:  'soffice Application Untitled[ ]*2 - " + utils.getOOoName("Writer") + " Frame Untitled[ ]*2 - " + utils.getOOoName("Writer") + " RootPane ScrollPane Document view Line 1 \$l'",
+     "     VISIBLE:  'Line 1 $l', cursor=1",
      "SPEECH OUTPUT: ''",
      "SPEECH OUTPUT: ' not selected'",
 # [[[TODO: WDW - StarOffice 8 gives us this.  DEV300_m25 does not.]]]

Modified: trunk/test/keystrokes/oowriter/bug_382880.py
==============================================================================
--- trunk/test/keystrokes/oowriter/bug_382880.py	(original)
+++ trunk/test/keystrokes/oowriter/bug_382880.py	Wed Jul 30 16:56:57 2008
@@ -30,6 +30,8 @@
     "Type a down arrow to move to the next line",
     ["BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "table-sample(.odt|)", "This is a test. \$l") + "'",
      "     VISIBLE:  'This is a test. $l', cursor=16",
+     "BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "table-sample(.odt|)", "This is a test. \$l") + "'",
+     "     VISIBLE:  'This is a test. $l', cursor=16",
      "SPEECH OUTPUT: 'This is a test.'"]))
 
 ######################################################################

Modified: trunk/test/keystrokes/oowriter/bug_382888.py
==============================================================================
--- trunk/test/keystrokes/oowriter/bug_382888.py	(original)
+++ trunk/test/keystrokes/oowriter/bug_382888.py	Wed Jul 30 16:56:57 2008
@@ -30,6 +30,8 @@
     "Type a down arrow to move to the next line",
     ["BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "table-sample(.odt|)", "This is a test. \$l") + "'",
      "     VISIBLE:  'This is a test. $l', cursor=16",
+     "BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "table-sample(.odt|)", "This is a test. \$l") + "'",
+     "     VISIBLE:  'This is a test. $l', cursor=16",
      "SPEECH OUTPUT: 'This is a test.'"]))
 
 ######################################################################

Modified: trunk/test/keystrokes/oowriter/bug_413909.py
==============================================================================
--- trunk/test/keystrokes/oowriter/bug_413909.py	(original)
+++ trunk/test/keystrokes/oowriter/bug_413909.py	Wed Jul 30 16:56:57 2008
@@ -53,6 +53,8 @@
     "Type Control-Home to move to the start of the document",
     ["BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "Untitled[ ]*2", "The quuuiick brown fox \$l") + "'",
      "     VISIBLE:  'The quuuiick brown fox $l', cursor=1",
+     "BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "Untitled[ ]*2", "The quuuiick brown fox \$l") + "'",
+     "     VISIBLE:  'The quuuiick brown fox $l', cursor=1",
      "SPEECH OUTPUT: 'The quuuiick brown fox'"]))
 
 ######################################################################

Modified: trunk/test/keystrokes/oowriter/bug_430402.py
==============================================================================
--- trunk/test/keystrokes/oowriter/bug_430402.py	(original)
+++ trunk/test/keystrokes/oowriter/bug_430402.py	Wed Jul 30 16:56:57 2008
@@ -63,6 +63,8 @@
     "Type Control-Home to move to start of document",
     ["BRAILLE LINE:  'soffice Application Untitled[ ]*2 - " + utils.getOOoName("Writer") + " Frame Untitled[ ]*2 - " + utils.getOOoName("Writer") + " RootPane ScrollPane Document view The quick \$l'",
      "     VISIBLE:  'The quick $l', cursor=1",
+     "BRAILLE LINE:  'soffice Application Untitled[ ]*2 - " + utils.getOOoName("Writer") + " Frame Untitled[ ]*2 - " + utils.getOOoName("Writer") + " RootPane ScrollPane Document view The quick \$l'",
+     "     VISIBLE:  'The quick $l', cursor=1",
      "SPEECH OUTPUT: 'The quick'"]))
 
 ######################################################################

Modified: trunk/test/keystrokes/oowriter/bug_469367.py
==============================================================================
--- trunk/test/keystrokes/oowriter/bug_469367.py	(original)
+++ trunk/test/keystrokes/oowriter/bug_469367.py	Wed Jul 30 16:56:57 2008
@@ -43,6 +43,8 @@
     "Enter up arrow to position the text caret on the first line",
     ["BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "empty_document(.odt|)", "		   This is a test. \$l") + "'",
      "     VISIBLE:  '		   This is a test. $l', cursor=1",
+     "BRAILLE LINE:  '" + utils.getOOoBrailleLine("Writer", "empty_document(.odt|)", "		   This is a test. \$l") + "'",
+     "     VISIBLE:  '		   This is a test. $l', cursor=1",
      "SPEECH OUTPUT: '		   This is a test.'"]))
 
 ######################################################################



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