GNOME Bugzilla – Bug 435226
Where-am-I doesn't correctly handle multiple selected paragraphs in OOo Writer and Evolution.
Last modified: 2008-07-22 19:27:05 UTC
This is from Hermann in comment #6 of bug #430278: "In OO-writer and in Evolution Orca speaks only selected text within paragraphs. When I select a block that is over several paragraphs, it only speaks the first."
Mike, yesterday you mentioned that you had updated the Orca spec to describe what should be done for multiple object selection. I've just looked in section 3.15. "Where Am I?" Command in .../orca/trunk/docs/doc-set/orca.html and I see no references to this. What file did you update and what should be done to handle this? i.e what should be spoken/brailled when multiple paragraphs are selected in OOo Writer or Evolution? Thanks.
I forgot to check this in. It is now done and the files are checked into subversion.
Mike, could you tell me exactly what files you have changed and checked into subversion? Is this the relevant information in section 3.15.1.2? "If focus is within a text box and text within that text box is selected, Orca should NOT read the current line. Rather, it should state the text that is selected spanning paragraph boundries if necessary followed by stating "selected". Orca should also speak any attributes present in this line of text. IE if a word is bold bold should be spoken before the word." If it is, then what do you mean by "state the text"? Speak/braille all the selected text? What if it's the whole document? Please clarify.
If the whole document is selected orca should speak it. There really is nothing for braille to do here as a document won't fit on a braille display anyway.
Mike, I want to revisit this again before I try to implement it. With the recent change to implement where-am-I for icon panels, we only spoke the names of the selected item on a double-click of Numpad Plus. Should we be thinking of something similar here for speaking all the selected paragraphs?
Created attachment 88231 [details] [review] First cut at a fix for this bug. Here's a first cut at trying to fix this bug. Patch not committed yet. The Orca spec. is still unclear. Currently bullet #3 of section 3.15.1.2 reads: "3. If focus is within a text box and text within that text box is selected, Orca should NOT read the current line. Rather, it should state the text that is selected spanning paragraph boundries if necessary followed by stating "selected". Orca should also speak any attributes present in this line of text. IE if a word is bold bold should be spoken before the word." It's the last part that's unclear. In particular "this line of text". If there is selected text spanning multiple paragraphs, should the attributes be spoken for all the selected text or just the line that currently has focus? This patch assumes just the line that currently has focus. If this is incorrect, please clarify the spec., let me know and I'll rework the patch. This seems to work okay with OpenOffice Writer. We have the problem with Evolution that each of the lines in a mail message is a text object within a panel. +-name='evolution-2.10' role='application' state='' relations='' +-name='INBOX (8 total, 6 unread) - Evolution' role='frame' state='ACTIVE ENABLED RESIZABLE SENSITIVE SHOWING VISIBLE' relations='' +-name=None role='filler' state='ENABLED SENSITIVE SHOWING VERTICAL VISIBLE' relations='' +-name=None role='panel' state='ENABLED SENSITIVE SHOWING VISIBLE' relations='' +-name=None role='filler' state='ENABLED SENSITIVE SHOWING VERTICAL VISIBLE' relations='' +-name=None role='split pane' state='ENABLED FOCUSABLE HORIZONTAL SENSITIVE SHOWING VISIBLE' relations='' +-name=None role='page tab list' state='ENABLED SENSITIVE SHOWING VISIBLE' relations='' +-name=None role='page tab' state='ENABLED SELECTABLE SELECTED SHOWING VISIBLE' relations='' +-name=None role='panel' state='ENABLED SENSITIVE SHOWING VISIBLE' relations='' +-name=None role='panel' state='ENABLED RESIZABLE SENSITIVE SHOWING VISIBLE' relations='' +-name=None role='filler' state='ENABLED SENSITIVE SHOWING VERTICAL VISIBLE' relations='' +-name=None role='split pane' state='ENABLED FOCUSABLE SENSITIVE SHOWING VERTICAL VISIBLE' relations='' +-name=None role='filler' state='ENABLED SENSITIVE SHOWING VERTICAL VISIBLE' relations='' +-name=None role='scroll pane' state='ENABLED FOCUSABLE SENSITIVE SHOWING VISIBLE' relations='' +-name='Panel containing HTML' role='panel' state='ENABLED FOCUSABLE SENSITIVE SHOWING VISIBLE' relations='' +-name=None role='unknown' state='ENABLED SHOWING VISIBLE' relations='' +-name=None role='unknown' state='ENABLED SHOWING VISIBLE' relations='' +-name=None role='panel' state='ENABLED SHOWING VISIBLE' relations='' +-name=None role='text' state='ENABLED FOCUSABLE FOCUSED MULTI_LINE SENSITIVE SHOWING VISIBLE' relations='' There are no FLOWS_FROM or FLOWS_TO relationships to link the sections of selected text together. Sigh. I'll now investigate whether we can override one or more methods in the subclassed WhereAmI class in Evolution.py to properly handle this.
Created attachment 88299 [details] [review] Patch to add in where-am-I multiple text selection for Evolution. Patch not committed yet. Please try it out and let me know if you find any problems. Mike, still need an answer to my outstanding question in comment #6. Thanks.
> It's the last part that's unclear. In particular "this line of text". > If there is selected text spanning multiple paragraphs, should the > attributes be spoken for all the selected text or just the line that > currently has focus? > This patch assumes just the line that currently has focus. If this is > incorrect, please clarify the spec., let me know and I'll rework the patch. You are correct here. I think if we tried to speak the attributes for all selected text the user would so quickly get lost that it would be a waste of time. This patch seems good where it is working.
Thanks Mike. Patch committed. Moving to [pending] state.
As reported by Hermann on the Orca mailing list, there is also a bug In Orca with Evolution w.r.t. this functionality, if there are multiple lines selected and the line that has focus is a blank line.
Perhaps we should just close this bug as bixed and open a new bug on the evolution problem.
Hermann also mentioned on the Orca mailing list that this last problem occured in OOo Writer too. I can't reproduce that. I say keep this bug open to fix this problem.
Created attachment 88551 [details] [review] Patch to hopefully fix where-am-I for selections that start or include blank lines/paragraphs. Patch not committed yet. Could others please try this out and let me know what they find? Thanks.
Rich, I'm afraid I'm not seeing any difference, with and without the patch. Here is the text I used in both a new message window and in a Writer document: ----------------- This is a test. And so is this and this and this and this. I am not feeling very creative right now. I suppose it has something to do with the rapid cellular breakdown of one's gray matter that results from working on the UMass syllabus. Oh well, what can you do? You can test patches! ----------------- There was NOT a newline at the end of "patches!". In both cases I selected "And so..." through "you do?". Writer had no problem speaking the two paragraphs before the patch; with the patch it was also fine. Evolution didn't speak the "Oh well, what can you do?" bit before the patch and with the patch, it still isn't speaking that. Also I noticed another issue that is independent of the patch. In Writer, if the last line/paragraph is selected, that is all Orca will read. (I had selected from "And so..." through "patches!")
Created attachment 88558 [details] Sample OOo Writer document based on Joani's last comment. I'm not seeing the "...In Writer, if the last line/paragraph is selected, that is all Orca will read." problem you are seeing. Here's the document I was testing against. I selected the text (using Shift-Up/Down/Left/Right arrow keys) both ways (so the text caret is either before "And" or after "patches!") and double-clicking nicely spoke the selected text. It spoke the selected text. What are you doing differently? If I try to read the text in your last comment as part of the email message that I got, I do see weird things. I can select some text and just press Numpad+Enter once, and Orca will read the line above the selected text. I still believe this is because I'm using a version of Evolution that isn't giving up all the "object:text-caret-moved" events correctly yet. I think we are going to need to wait until Evolution bug #347347 is fully fixed before this will work. If I put that text as the body of a new Evolution compose message and performvarious selection tests, it nicely speaks the selected test. Do you see this as well?
> Sample OOo Writer document based on Joani's last comment. Dunno if it makes a difference or not, but in your sample, the lines of what is functioning as the second paragraph seem to be constructed of individual paragraphs because of the newlines added when the text was pasted into the comment. In my original sample, the second paragraph wraps. Regardless.... > It spoke the selected text. What are you doing differently? Dunno. Any selection command that causes the last paragraph to become selected does it for me. Try Control A. > If I put that text as the body of a new Evolution compose message and > perform various selection tests, it nicely speaks the selected test. Even when crossing line/paragraph boundaries? If I have two paragraphs selected, Orca will only speak the first one when I press KP_Enter.
Created attachment 88571 [details] [review] Previous patch with debug print statements included. Joanie, I'm simply not seeing what you're seeing, which suggests you are just doing something different from what I'm doing. I've reworked the previous patch and added a load of print statements. Can you please try it? Also please set your debug level to INFO (and with eventDebugLevel comments out) to avoid too much output. Then try it with OOo and Evolution and attach the results you get and the steps you took to get there. Many thanks.
Created attachment 88572 [details] OOo Writer debug output requested by Rich Here's Writer. Steps: 1. Launch Orca from gnome-terminal 2. Control+Alt+D for Desktop 3. J for joanie_test.odt 4. Enter to open it 5. Control A to select all 6. KP_Enter for whereAmI Output: where_am_I: _HTS: called. where_am_I: obj getNSelections: 1 where_am_I: returning: [True, False]
Created attachment 88573 [details] Evolution output requested by Rich Steps: 0. (prep) Copy and paste the text into a new "Compose Message" window 1. Launch Evolution from gnome-terminal 2. Alt+Tab into "Compose Message" window 3. Down Arrow to move to the beginning of second paragraph 4. Shift+Down Arrow until it through "do?" was selected with the caret blinking on the blank line following "Oh well, what can you do?" 5. KP_Enter for whereAmI Output: Evol: _HTS: called. Evol: obj getNSelections: 1 Evol: returning: [True, False]
Thanks Joanie. In both these cases you've written: KP_Enter for whereAmI Speaking of selected text is supposed to occur when you double-click KP_Enter (see section 3.15.1.2 of the orca spec.) If you double-click KP_Enter, do you get the desired behavior?
Oh crappity crap.... Yes, Rich, if I double-click it I do get the desired behavior. Somehow I got it in my head that pressing it once would speak the selected text were any text selected. And when a single press caused Orca to speak selected text -- just not all of the selected text -- I erroneously concluded that it wasn't working. I'm REALLY sorry I wasted your time. Now if you'll excuse me, I have a dunce cap to place on my head and a corner to go find. ;-)
No problem. But I do think it exposes a real problem with Orca. How do you know what commands you are supposed to use to do what? Hermann asked about this on the Orca list. Hopefully Mike will reply with a good answer.
There are two answers here. 1. The wiki has a keystroke list. 2. The community is more than welcome to step up and write a comprehensive users guide for orca. The information for doing this is all available but just scattered around in different places. This just hasn't been done yet with all the effort going into developing and testing fixes and new features.
Can we close this bug? Documentation and functionality are separate. If we wanted to enhance Orca, however, we could add a "click count" field to a keybinding. That way, each discrete piece of functionality would be a separate key binding, each with its own learn mode text. This would be somewhat involved, however, and cause changes across the code and to the keybindings GUI.
> Can we close this bug? Not yet. It needs further testing. It appears to work nicely for me, and now for Joanie. Does it work for you? I like your idea of the double/triple click being part of the keybinding documentation. Would you like me to open up a new bug for that? Thanks.
> I like your idea of the double/triple click being part of > the keybinding documentation. Would you like me to open > up a new bug for that? Sure -- let's make it a low priority RFE assigned to the FUTURE. :-) Thanks!
Bug #440490 has been opened for the key binding documentation enhancement.
> Not yet. It needs further testing. It appears to work > nicely for me, and now for Joanie. Does it work for you? Seems to work well for me. I say go ahead and commit the patch and then close this bug as FIXED. Thanks!
I'm also happy with this latest patch.