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 353268 - Orca is double reading lines in openoffice with latest ubuntu live cd
Orca is double reading lines in openoffice with latest ubuntu live cd
Status: RESOLVED FIXED
Product: orca
Classification: Applications
Component: speech
0.2.x
Other All
: Normal major
: ---
Assigned To: Rich Burridge
Orca Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-08-28 16:51 UTC by Mike Pedersen
Modified: 2006-08-28 22:44 UTC
See Also:
GNOME target: ---
GNOME version: 2.15/2.16


Attachments
Orca debug generated whilst recreating this problem. (231.07 KB, text/plain)
2006-08-28 20:47 UTC, Rich Burridge
Details
Orca debug generated whilst recreating this problem. (231.07 KB, text/plain)
2006-08-28 20:51 UTC, Rich Burridge
Details

Description Mike Pedersen 2006-08-28 16:51:46 UTC
Please describe the problem:
When using the ubuntu live cd from this morning and down-arrowing through a writer document orca reads each line twice

Steps to reproduce:
1. boot the live cd and start orca
2. open openoffice writer
3. enter several lines of text and return to the top of the document
4.  down arrow through the document


Actual results:
each line is read twice

Expected results:
each line should be read once

Does this happen every time?
yes

Other information:
Comment 1 Rich Burridge 2006-08-28 20:47:33 UTC
Created attachment 71799 [details]
Orca debug generated whilst recreating this problem.

I've recreated what Mike is seeing. Attaching a full debug listing.
I'll hopefully have a few more comments in a few minutes...
Comment 2 Rich Burridge 2006-08-28 20:51:18 UTC
Created attachment 71800 [details]
Orca debug generated whilst recreating this problem.

I've recreated what Mike is seeing. Attaching a full debug listing.
I'll hopefully have a few more comments in a few minutes...
Comment 3 Rich Burridge 2006-08-28 21:10:04 UTC
When navigating up and down the lines in the Open Office
Writer document, there are now two events which are causing
each line to be spoken:

  object:state-changed:focused

and

  object:text-caret-moved

For example, in debug.out at line 5163 we get:

OBJECT EVENT: object:state-changed:focused             detail=(0,0)
    app.name='soffice.bin'        name=None role='paragraph' state='EDITABLE ENABLED FOCUSABLE MULTI_LINE MULTISELECTABLE SHOWING VISIBLE'

which causes locusOfFocusChanged() in the StarOffice.py script to be called
(and process in section #1).

and at line 5194 we get:

OBJECT EVENT: object:text-caret-moved                  detail=(0,0)
    app.name='soffice.bin'        name=None role='paragraph' state='EDITABLE ENABLED FOCUSABLE FOCUSED MULTI_LINE MULTISELECTABLE SHOWING VISIBLE'

which is causing onCaretMoved() in default.py to be called, which in 
turn calls orca.setLocusOfFocus().

This is with Open Office v2.0.3.4-ubuntu2, from Tue August 1st at 13:11:16 UTC.

I'm going to compare this with running a recent StarOffice build against 
GNOME 2.14 on Solaris, to see what event(s) we are getting there for the 
same action.

Comment 4 Rich Burridge 2006-08-28 21:20:32 UTC
I am seeing exactly the same events with StarOffice 8 Product Update 3 rev 2,
on GNOME 2.14 on Solaris with the latest version of Orca from CVS HEAD.
This too is generating the double speak.
Comment 5 Rich Burridge 2006-08-28 21:28:05 UTC
Looks like the second half of the change of 10th August:

http://cvs.gnome.org/viewcvs/orca/src/orca/default.py?r1=1.190&r2=1.191

is causing the problem. If I comment out those three new lines in
onStateChanged(), the double speaking problem goes away.
Comment 6 Rich Burridge 2006-08-28 21:39:37 UTC
Sorry, make that the change of 11th August (not the 10th).
The fix for bug #350854.
Comment 7 Willie Walker 2006-08-28 22:08:40 UTC
Well...darn.  These lines are needed for the gedit/metacity bug.  What do you think about creating a new onStateChanged method in the gedit script and moving these three lines to there?  The new method would look something like:

    def onSelectionChanged(self, event):
        """Called when an object's selection changes.

        Arguments:
        - event: the Event
        """

        if not event or not event.source:
            return

        # Avoid doing this with objects that manage their descendants
        # because they'll issue a descendant changed event.
        #
        if event.source.state.count(
                 atspi.Accessibility.STATE_MANAGES_DESCENDANTS):
            return

        default.Script.onSelectionChanged(self, event)
Comment 8 Willie Walker 2006-08-28 22:26:43 UTC
D'Oh.  Ignore the code snippet from the previous sample.  That's the problem with debugging three separate problems simultaneously.  :-(   Here's a better method for gedit.py that should work.  Again...the goal is to move the block of suspect code from default.py to gedit.py.  This will keep the gedit fix working, and restore the previous behavior for OOo (I hope):

    def onStateChanged(self, event):
        """Called whenever an object's state changes.

        Arguments:
        - event: the Event
        """

        # Sometimes an object will tell us it is focused this
        # way versus issuing a focus event.  GEdit's edit area,
        # for example, will do this: when you use metacity's
        # window menu to do things like maximize or unmaximize
        # a window, you will only get a state-changed event
        # from the text area when it regains focus.
        #
        if (event.type == "object:state-changed:focused") \
           and (event.detail1):
            orca.setLocusOfFocus(event, event.source)

        default.Script.onSelectionChanged(self, event)

Comment 9 Willie Walker 2006-08-28 22:27:41 UTC
OK - one more try:

        default.Script.onStateChanged(self, event)

Mental note: it's onStateChanged.  Not onSelectionChanged.
Comment 10 Rich Burridge 2006-08-28 22:44:11 UTC
Thanks Will. I think I now have the correct code checked in
(see bug #350854 too). Closing as FIXED.