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 365320 - In OOo writer, Orca repeats lines when moving between paragraphs
In OOo writer, Orca repeats lines when moving between paragraphs
Status: RESOLVED FIXED
Product: orca
Classification: Applications
Component: general
2.17.x
Other All
: Normal normal
: ---
Assigned To: Lynn Monsanto
Orca Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-10-26 15:27 UTC by Willie Walker
Modified: 2006-11-14 20:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch for 365320 (1.75 KB, text/plain)
2006-10-27 22:10 UTC, Lynn Monsanto
Details

Description Willie Walker 2006-10-26 15:27:28 UTC
Run oowriter.  Type a few PARAGRAPHS (i.e., press return at the end of a line or two), making sure one or more paragraphs is at least two lines line.

Run orca - arrow up and down in the document you just created.  When you cross line boundaries in the same paragraph, the line you just landed on is spoken only once.  When you cross paragraph boundaries, the line you just landed on is spoken twice.

Here's the relevant debug.out information for crossing paragraph boundaries - it's just two events in a row with no intervening event in between.  Looks like we're getting a state-changed:focused event for the new paragraph (so we naturally speak line) and then the caret moved event (so we naturally speak the line).

vvvvv PROCESS OBJECT EVENT object:state-changed:focused vvvvv
OBJECT EVENT: object:state-changed:focused             detail=(1,0)
    app.name='soffice.bin'        name=None role='paragraph' state='EDITABLE ENABLED FOCUSABLE FOCUSED MULTI_LINE MULTISELECTABLE SHOWING VISIBLE' relations='FLOWS_FROM FLOWS_TO'
Finding top-level object for source.name=None
--> obj.name='Document view'
--> obj.name=None
--> obj.name=None
--> obj.name='Untitled1 - OpenOffice.org Writer'
--> obj.name='Untitled1 - OpenOffice.org Writer'
LOCUS OF FOCUS: app='soffice.bin' name='' role='paragraph'
                event='object:state-changed:focused'
OBJECT EVENT: object:state-changed:focused             detail=(1,0)
             app.name='soffice.bin'        name=None role='paragraph' state='EDITABLE ENABLED FOCUSABLE FOCUSED MULTI_LINE MULTISELECTABLE SHOWING VISIBLE' relations='FLOWS_FROM FLOWS_TO'
StarOffice.locusOfFocusChanged - Writer: text paragraph.
SPEECH OUTPUT: 'Here is another line.'
GENERATOR: _getBrailleRegionsForText
           obj             =
           role            = paragraph
BRAILLE LINE:  'Here is another line. $l'
     VISIBLE:  'Here is another line. $l', cursor=21
^^^^^ PROCESS OBJECT EVENT object:state-changed:focused ^^^^^

DEQUEUED EVENT object:text-caret-moved <----------

vvvvv PROCESS OBJECT EVENT object:text-caret-moved vvvvv
OBJECT EVENT: object:text-caret-moved                  detail=(20,0)
    app.name='soffice.bin'        name=None role='paragraph' state='EDITABLE ENABLED FOCUSABLE FOCUSED MULTI_LINE MULTISELECTABLE SHOWING VISIBLE' relations='FLOWS_FROM FLOWS_TO'
BRAILLE LINE:  'Here is another line. $l'
     VISIBLE:  'Here is another line. $l', cursor=21
SPEECH OUTPUT: 'Here is another line.'
^^^^^ PROCESS OBJECT EVENT object:text-caret-moved ^^^^^

As for how to fix this?  I'm not sure - perhaps add a new onStateChanged method to StarOffice.py.  In this method, see if we're getting a state-changed:focus event for a paragraph.  If we are, call orca.setLocusOfFocus with notifyPresentationManager=False and return.  If we aren't, call the superclass's onStateChanged method.
Comment 1 Lynn Monsanto 2006-10-27 22:10:22 UTC
Created attachment 75532 [details]
patch for 365320
Comment 2 Willie Walker 2006-10-28 15:01:32 UTC
I think there might be a couple minor issues with this patch.  It will definitely work as is, but if you can modify it a little bit, I'd feel more comfortable.

From what I remember from the debug output, we're not actually getting two focus events.  Instead, we're getting a focus event (in the form of object:state-changed:focused instead of focus:) followed by a caret moved event.    As a result, the comment in the patch might be a little misleading.

In addition, by ignoring the object:state-changed:focused event, we're no longer setting the locus of focus here.  The reason things continue to work, though, is that we manage this around line 1861 in default.py: if we detect a caret moved event in an object whose state is FOCUSED but is not the locus of focus, we force the object to be the locus of focus.

As an alternative patch, it would be great to modify the comment to say what's really going on here, and it might be more "proper" to add one line to the patch:

+            self.currentParagraph = event.source
---->        orca.setLocusOfFocus(event, event.source, False)
+            return
Comment 3 Lynn Monsanto 2006-11-01 20:31:11 UTC
I made the requested change.