After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 435226 - Where-am-I doesn't correctly handle multiple selected paragraphs in OOo Writer and Evolution.
Where-am-I doesn't correctly handle multiple selected paragraphs in OOo Write...
Status: RESOLVED FIXED
Product: orca
Classification: Applications
Component: general
2.19.x
Other Linux
: High major
: 2.20.0
Assigned To: Rich Burridge
Orca Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-05-02 16:06 UTC by Rich Burridge
Modified: 2008-07-22 19:27 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
First cut at a fix for this bug. (4.76 KB, patch)
2007-05-15 17:15 UTC, Rich Burridge
none Details | Review
Patch to add in where-am-I multiple text selection for Evolution. (8.96 KB, patch)
2007-05-16 16:35 UTC, Rich Burridge
committed Details | Review
Patch to hopefully fix where-am-I for selections that start or include blank lines/paragraphs. (9.16 KB, patch)
2007-05-21 15:18 UTC, Rich Burridge
accepted-commit_now Details | Review
Sample OOo Writer document based on Joani's last comment. (9.02 KB, application/vnd.oasis.opendocument.text)
2007-05-21 17:41 UTC, Rich Burridge
  Details
Previous patch with debug print statements included. (10.01 KB, patch)
2007-05-21 23:46 UTC, Rich Burridge
rejected Details | Review
OOo Writer debug output requested by Rich (3.22 KB, text/plain)
2007-05-22 00:17 UTC, Joanmarie Diggs (IRC: joanie)
  Details
Evolution output requested by Rich (3.00 KB, text/plain)
2007-05-22 00:28 UTC, Joanmarie Diggs (IRC: joanie)
  Details

Description Rich Burridge 2007-05-02 16:06:28 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."
Comment 1 Rich Burridge 2007-05-02 16:17:06 UTC
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.
Comment 2 Mike Pedersen 2007-05-02 18:50:44 UTC
I forgot to check this in.  It is now done and the files are checked into subversion.
Comment 3 Rich Burridge 2007-05-04 14:26:34 UTC
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.


Comment 4 Mike Pedersen 2007-05-04 19:07:25 UTC
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.  
Comment 5 Rich Burridge 2007-05-10 20:03:32 UTC
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?
Comment 6 Rich Burridge 2007-05-15 17:15:27 UTC
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.
Comment 7 Rich Burridge 2007-05-16 16:35:30 UTC
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.
Comment 8 Mike Pedersen 2007-05-16 18:31:24 UTC
> 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.
Comment 9 Rich Burridge 2007-05-16 19:23:49 UTC
Thanks Mike. Patch committed. Moving to [pending] state.
Comment 10 Rich Burridge 2007-05-17 15:00:44 UTC
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. 
Comment 11 Mike Pedersen 2007-05-17 18:43:21 UTC
Perhaps we should just close this bug as bixed and open a new bug on the evolution problem.  
Comment 12 Rich Burridge 2007-05-17 19:32:41 UTC
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.
Comment 13 Rich Burridge 2007-05-21 15:18:32 UTC
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.
Comment 14 Joanmarie Diggs (IRC: joanie) 2007-05-21 15:52:22 UTC
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!")
Comment 15 Rich Burridge 2007-05-21 17:41:28 UTC
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?
Comment 16 Joanmarie Diggs (IRC: joanie) 2007-05-21 20:33:19 UTC
> 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.
Comment 17 Rich Burridge 2007-05-21 23:46:50 UTC
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.
Comment 18 Joanmarie Diggs (IRC: joanie) 2007-05-22 00:17:08 UTC
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]
Comment 19 Joanmarie Diggs (IRC: joanie) 2007-05-22 00:28:37 UTC
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]
Comment 20 Rich Burridge 2007-05-22 00:41:57 UTC
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?
Comment 21 Joanmarie Diggs (IRC: joanie) 2007-05-22 00:50:36 UTC
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. ;-)
Comment 22 Rich Burridge 2007-05-22 01:07:33 UTC
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.
Comment 23 Mike Pedersen 2007-05-22 01:18:28 UTC
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.
Comment 24 Willie Walker 2007-05-22 13:41:51 UTC
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.
Comment 25 Rich Burridge 2007-05-22 13:58:44 UTC
> 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.
Comment 26 Willie Walker 2007-05-22 14:58:06 UTC
> 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!

Comment 27 Rich Burridge 2007-05-22 16:14:06 UTC
Bug #440490 has been opened for the key binding 
documentation enhancement.
Comment 28 Willie Walker 2007-05-23 19:47:58 UTC
> 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!
Comment 29 Mike Pedersen 2007-05-23 21:50:46 UTC
I'm also happy with this latest patch.