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 611256 - atk_text_get_text is not working correctly with the specified end offset
atk_text_get_text is not working correctly with the specified end offset
Status: RESOLVED FIXED
Product: java-atk-wrapper
Classification: Applications
Component: general
unspecified
Other opensolaris
: Normal normal
: ---
Assigned To: Ke Wang
java-atk-wrapper maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2010-02-27 02:47 UTC by Joanmarie Diggs (IRC: joanie)
Modified: 2015-02-27 16:54 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Joanmarie Diggs (IRC: joanie) 2010-02-27 02:47:48 UTC
Steps to reproduce:

1. Launch Accerciser and switch to the iPython console.

2. Launch Gedit and type 'hello'.

3. Locate the accessible object in which 'hello' was just typed in Accerciser. With that object selected/highlighted, type the following in the iPython console:

  acc.queryText().getText(0, -1)

Expected results: 'hello' is returned.
Actual results: 'hello' is returned.

4. Launch a Java app, e.g. Notepad.jar and type 'hello'.

5. Locate the accessible object in which 'hello' was just typed in Accerciser. With that object selected/highlighted, type the following in the iPython console:

  acc.queryText().getText(0, -1)

Expected results: 'hello' is returned.
Actual results: '' is returned.

Impact: Orca expects to be able to get all of the text in an object by specifying a start offset of 0 and an end offset of -1. Because this fails for Java apps, any command in which Orca attempts to get all of the text of an object in a Java app will fail.
Comment 1 Joanmarie Diggs (IRC: joanie) 2010-02-27 02:57:10 UTC
Found another end offset issue with the implementation of atk_text_get_text, so I'm adjusting the summary.

Repeat the above steps for both gedit and a Java app (e.g. Notepad.jar). But this time, instead of using -1 as the end offset, use a proper offset.

Gedit:       getText(0, 1) returns 'h'
Notepad.jar: getText(0, 1) returns ''

Gedit:       getText(0, 2) returns 'he'
Notepad.jar: getText(0, 2) returns 'h'

This is why, if Orca is set to echo words, and the user types 'hello' and then presses Space or Period:

* In Gedit, Orca says 'hello'
* In Notepad.jar, Orca says 'hell'
Comment 2 Ke Wang 2010-03-04 09:48:18 UTC
Fix will be delivered into JAW 0.29.6
Comment 3 André Klapper 2015-02-27 16:54:29 UTC
[Moving at-spi/java-atk-wrapper bugs to separate product. See bug 740075]