GNOME Bugzilla – Bug 489490
[verified] [pyatspi] Test for OOo Writer bug #413909 not producing the correct output.
Last modified: 2008-07-22 19:32:33 UTC
I manually ran the steps to test that bug #413909 is still fixed. Orca can no longer provide "smarts" for spell checking in OOo Writer v2.1 (or later). Steps to reproduce: 1. Start oowriter. 2. Enter Alt-f, right arrow and Return. (File->New->Text Document). 3. Enter the following line, each one followed by a Return: The quuuiick brown fox jumps over the lazy dog 4. Type Control-Home to position the text caret to the left of the first character on the first line. 5. Enter F7 to bring up the spell checking dialog. 6. Press Esc to dismiss the spell checking dialog. 7. Enter Alt-f, Alt-c to close the Writer application. 8. Enter Tab and Return to discard the current changes. It missed speaking the line: SPEECH OUTPUT: 'Misspelled word: quuuiick Context is The quuuiick brown fox'
Created attachment 97741 [details] Orca output for the pyatspi'ed version when running this test.
Created attachment 97742 [details] Orca output for the old (pre-pyatspi) version generated when running this test.
The problem here is that in the locusOfFocusChanged() method in the StarOffice.py script, we look for a specific role hierarchy to detect the spell checking dialog: rolesList = [pyatspi.ROLE_PUSH_BUTTON, \ pyatspi.ROLE_OPTION_PANE, \ pyatspi.ROLE_DIALOG, \ pyatspi.ROLE_APPLICATION] It seems that the hierarchy now (according to the printAncestry() routine, is: +- [application | soffice] +- [dialog | Spellcheck: (English (USA))] +- [push button | Change] Eitan why isn't the option pane reported in the hierarchy?
Additional information: I've applied the patch from Eitan to pyatspi that "fixes the Mozilla problem" and reinstalled pyatspi. I've pulled very latest Orca from SVN trunk and reran the test. The problem still exists. Both accerciser and at-poke see the option pane. I'll now dig deeper to see if it's an Orca or a pyatspi problem.
Doing an Insert-F8 when focus in on the Change button in the Spell check dialog, shows the hierarchy is "broken". I'll try to investigate further now, to determine exactly what old Orca used to do differently to handle this. vvvvv PROCESS KEY PRESS EVENT F8 vvvvv +- [application | soffice] +- [frame | Untitled1 - OpenOffice.org Writer] +- [root pane | Untitled1 - OpenOffice.org Writer] +- [menu bar | ] +- [menu | File] +- [menu | Edit] +- [menu | View] +- [menu | Insert] +- [menu | Format] +- [menu | Table] +- [menu | Tools] +- [menu | Window] +- [menu | Help] +- [panel | ] +- [tool bar | Standard] WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! +- [tool bar | Formatting] WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! +- [panel | ] +- [panel | ] +- [panel | ] WARNING CHILD.PARENT != PARENT!!! +- [statusbar | ] +- [label | Page Number] +- [label | Page Style] +- [label | Zoom] +- [label | Insert Mode] +- [label | Selection Mode] +- [label | Document Modified] +- [label | Digital Signatures] +- [label | Size] +- [dialog | Spellcheck: (English (USA))] +- [option pane | Spellcheck: (English (USA))] +- [label | Not in dictionary] +- [scroll pane | Not in dictionary] +- [unknown | ] +- [paragraph | 1] +- [scroll bar | ] +- [filler | ] +- [label | Suggestions] +- [panel | Suggestions] WARNING CHILD.PARENT != PARENT!!! +- [label | Dictionary language] +- [combo box | Dictionary language] WARNING CHILD.PARENT != PARENT!!! WARNING CHILD.PARENT != PARENT!!! +- [push button | Ignore Once] +- [push button | Ignore All] +- [push button | Add] WARNING CHILD.PARENT != PARENT!!! +- [push button | Change All] +- [push button | AutoCorrect] +- [push button | Options] +- [push button | Help] +- [push button | Undo] +- [push button | Close] ^^^^^ PROCESS KEY PRESS EVENT F8 ^^^^^
Well this is interesting. I went back to the pre-pyatspi'ed Orca, and changed three values in settings.py: cacheValues = False cacheDescriptions = False cacheAccessibles = False I then installed that version and reran the test and did an Insert-F7 when the focus was on the Change button in the Spell check dialog: +-name='soffice' role='application' state='' relations='' +-name='Spellcheck: (English (USA))' role='dialog' state='ENABLED SENSITIVE SHOWING VISIBLE' relations='' +-name='Change' role='push button' state='ENABLED FOCUSABLE FOCUSED SENSITIVE SHOWING VISIBLE' relations='' No option pane there either. And it didn't speak the misspelled word context (i.e. what latest Orca is failing to do too). So this looks like a caching problem/difference. Still investigating.
Created attachment 97880 [details] [review] Proposed fix This is less than ideal. But at least it fixes the output issues. I would love to see this fixed upstream. The OO.o bug is: http://www.openoffice.org/issues/show_bug.cgi?id=78117
I was just glancing at the patch which seems to be based on the revised isDesiredFocusedItem() from default.py. In the original isDesiredFocusedItem() we did a check to be sure current existed before getting its role. The revised version was causing tracebacks if obj == None or if obj had fewer ancestors than our desired item. I checked in a fix for default.py. If this patch winds up being the approach we take in StarOffice, a similar change will likely be needed.
Created attachment 97935 [details] [review] Revised patch. Makes two changes: 1/ In isDesiredFocusItem(), moves the check for current equal to None to the top of the for loop (similar to the change made by Joanie in default.py). 2/ In printHierarchy(), adjusted the two "root"'s to debug.getAccessibleDetails(root) (similar to the recent change that Will made to fix the print[Ancestry,Hierarchy] bug).
Looks good! Please commit. Thanks!
Patch committed to SVN trunk. Moving to "[pending]".
We've tested this one pretty well. Please feel free to close.
Thanks. Closing as FIXED.
This fix seems to be the source of Orca hanging with oocalc. In _getParent() we call pyatspi.findDescendant() and never come back.
Thanks Joanie. Reopening.
Joanie, what at what point do you get to this hang? What are you doing?
All I have to do is launch Calc with Orca running.
Created attachment 98576 [details] [review] Proposed fix This patch re-implements Script._getParent. This is optomised to only override the regular behavior if it is a know problem node.
Thanks Eitan. Looks good. I think this one can be closed out as FIXED, as we're tracking the remaining problems in bug #491885.
Mike has also tested this (as part of testing bug #491885), so I've checked the patch in, and am moving the state to "[pending]".
Seems to work fine now.
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.