Apache OpenOffice (AOO) Bugzilla – Issue 70922
[a11y] Writer inappropriately gives a "focus:" event for the Format menu when dismissing the File->Wizards menu.
Last modified: 2013-08-07 14:42:39 UTC
See also Orca bug #364765, which is blocked by this bug. http://bugzilla.gnome.org/show_bug.cgi?id=364765 I will attach a standalone Python script that just does at-spi calls (no Orca code in sight), that reproduces this problem. To reproduce this bug, follow these steps: 1) Run OpenOffice or StarOffice writer. 2) Run this standalone application in an xterm window using the python interpreter. 3) Give focus to the swriter window. 4) Type Alt-f to bring up the file menu. 5) Type "w" to bring up the Wizards sub-menu. 6) Type Esc to dismiss that Wizards sub-menu. 7) Press F12 to terminate this script. Notice that when you dismiss the Wizards sub-menu, you get a "focus:" event for the Format menu. This is wrong.
Created attachment 40096 [details] Standalone Python script that can reproduce this problem.
Created attachment 40097 [details] Output from running the Python bug_464765.py script.
The important part to look at in bug_364765.out are near the end of the file: ... KEYSTROKE type=1 hw_code=9 modifiers=0 event_string=(Escape) is_text=True focus: 0 0 <CORBA.any of type 'IDL:Accessibility/EventDetails:1.0'> name='Format' role='menu' state='ENABLED FOCUSED OPAQUE SELECTABLE SENSITIVE S HOWING VISIBLE' ...
Reassigned to ES.
ES->OBR: reproduced. Note: the python script fires too many events. Best viewed with: at-poke -> log events -> [x] focus -> "generic event 'focus:' A|co|ac|te|va|se:menu:Format:Contains comm...(0) (0)"
Note that it's easy to customize the Python script to only handle the events you are interested in. See the eventTypes list starting about line 300. Just add a "#" character at the beginning of the line for each one you are not interested in.
obr->od: can you please evaluate whether this is a writer or a bridging issue ? Thanks.
OD->TBE: Please take over and investigate, if the accessibility implementation for menus or the the access bridge causes this defect. Thx.
set target OOo 2.x
The state change focus event for the Format menu item is wrongly generated in vcl and forwarded by the accessibility implementation for menus. In vcl/source/window/menu.cxx, l.4641 it can be seen, that ImplCallHighlight is called at the wrong parent; in this case at the menubar instead of the File popup menu. Therefore this issue can be fixed by replacing if (pPopupMenu->pStartedFrom) pPopupMenu->pStartedFrom->ImplCallHighlight(pFloat->nHighlightedItem); with if (pPopupMenu) pPopupMenu->ImplCallHighlight(pFloat->nHighlightedItem); In addition, the DBG_ASSERT( pPopupMenu->pStartedFrom, "popup mysteriously killed" ); line should be moved right after the PopupMenu* pPopupMenu = (PopupMenu*)pMenu->pStartedFrom; line.
reassign issue to PL
fixed in CWS vcl78 the DBG_ASSERT is now useless since the case where pStartedFrom from the original menu is NULL is already handled.
please verify in CWS vcl78
Verified. Now shows: -> "generic event 'focus:' A|co|ac|te|va|se:menu:Wizards:Contains comm...(0) (0)"
Ok in m219