Issue 75052 - [A11Y] Orca doesn't read misspelled words in spellcheck dialog
Summary: [A11Y] Orca doesn't read misspelled words in spellcheck dialog
Status: CLOSED FIXED
Alias: None
Product: Writer
Classification: Application
Component: code (show other issues)
Version: OOo 2.1
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: eric.savary
QA Contact: issues@sw
URL:
Keywords: accessibility, oooqa
Depends on:
Blocks:
 
Reported: 2007-03-02 09:26 UTC by thomas.benisch
Modified: 2013-08-07 14:41 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description thomas.benisch 2007-03-02 09:26:07 UTC
Orca doesn't read misspelled words in the MultiLineEdit field of
the spellcheck dialog. The reason seems to be missing text attributes
of the misspelled word.

This functionality is probably broken since OOo 2.1.
Comment 1 thomas.benisch 2007-03-02 09:27:20 UTC
set keyword accessibility
Comment 2 thomas.benisch 2007-03-02 09:33:30 UTC
Some more details:

Malte Timmermann wrote:
> Thomas,
> 
> can you please write an issue for this, and handle for 2.2.1?
> 
> I assume your UAA code is not prepared for attributes, because normally
> a MultiLineEdit doesn't have some.
> 
> Malte.
> 
> Oliver Specht wrote, On 02/28/07 12:30:
>> Hi,
>> the dialog uses a MultiLineEdit and it has not been changed recemtly 
>> (except for warning removals).
>>
>> Regards,
>>
>> Oliver
>>
>> Thomas Lange - Sun Germany - ham02 - Hamburg wrote:
>>   
>>> Hi all,
>>>
>>> Malte Timmermann wrote:
>>>   
>>>     
>>>> Thomas,
>>>>
>>>> IRRC, you did the "new" spell check dialog.
>>>> I am not sure if the edit is a custom control from you, using the
>>>> EditEngine, our a standard (enhanced) MultiLineEdit.
>>>> If it's your control, please have a look at the Accessibility
>>>> implementation, attribute stuff (see below).
>>>> If it's a MultiLineEdit, please forward to Thomas Benisch.
>>>>
>>>> Anyway - please file an issue, set keyword "Accessibility", target 2.2.1.
>>>>
>>>> Thanks,
>>>> Malte.
>>>>   
>>>>     
>>>>       
>>> The 'new' spell check dialog is from OS. Thus I'm forwarding this mail
>>> to him.
>>>
>>> Regards,
>>> Thomas
>>>
>>>
>>>
>>>   
>>>     
>>>> Rich Burridge wrote, On 02/27/07 20:17:
>>>>     
>>>>       
>>>>> Willie Walker wrote:
>>>>>   
>>>>>       
>>>>>         
>>>>>> With Orca v2.17.92 from last night, the spreadsheet functionality 
>>>>>> works fine.  No hangs.  I looked at the spell check dialog, however, 
>>>>>> and things are definitely odd in it.  Orca seems to get focus: events 
>>>>>> for pushbuttons, but doesn't seem to speak anything in response to 
>>>>>> these events.  The same problem exists on Ubuntu Edgy with OOo 
>>>>>> 2.1-4ubuntu1 (I really wish I could cut/paste the text in the about 
>>>>>> dialog -- bummer).
>>>>>>
>>>>>> Rich - can you take a look at the spell check dialog please and see if 
>>>>>> you can get it back to its original glory?
>>>>>>     
>>>>>>         
>>>>>>           
>>>>> The problem is that we are not getting any text attributes back for the 
>>>>> paragraph inside the
>>>>> OOo spell check dialog. The code in the Orca StarOffice.py script (at 
>>>>> about line 972) looks like:
>>>>>
>>>>>     def readMisspeltWord(self, event, pane):
>>>>>         """Speak/braille the current misspelt word plus its context.
>>>>>            The spell check dialog contains a "paragraph" which shows the
>>>>>            context for the current spelling mistake. After 
>>>>> speaking/brailling
>>>>>            the default action for this component, that a selection of the
>>>>>            surronding text from that paragraph with the misspelt word is 
>>>>> also
>>>>>            spoken.
>>>>>
>>>>>         Arguments:
>>>>>         - event: the event.
>>>>>         - pane: the option pane in the spell check dialog.
>>>>>         """
>>>>>
>>>>>         paragraph = util.findByRole(pane, rolenames.ROLE_PARAGRAPH)
>>>>>
>>>>>         # Determine which word is the misspelt word. This word will have
>>>>>         # non-default text attributes associated with it.
>>>>>
>>>>>         textLength = paragraph[0].text.characterCount
>>>>>         startFound = False
>>>>>         endOff = textLength
>>>>>         for i in range(0, textLength):
>>>>>             attributes = paragraph[0].text.getAttributes(i)
>>>>>             if len(attributes[0]) != 0:
>>>>>                 if not startFound:
>>>>>                     startOff = i
>>>>>                     startFound = True
>>>>>             else:
>>>>>                 if startFound:
>>>>>                     endOff = i
>>>>>                     break
>>>>>
>>>>>         badWord = paragraph[0].text.getText(startOff, endOff-1)
>>>>>         ...
>>>>>
>>>>> What's happening is that startOff is not being set, because 
>>>>> len(attributes[0])
>>>>> for each of the characters in the text string in the spell dialog 
>>>>> paragraph is 0.
>>>>>
>>>>> For example, the spell check dialog could contain:
>>>>>
>>>>>   The quiick brown fox
>>>>>
>>>>> in that paragraph, and there should be attributes set for each of the 
>>>>> characters
>>>>>
>>>>>   quiick
>>>>>
>>>>>  From that, I can determine the misspelled word.
>>>>>
>>>>> Just initializing it to zero won't really help (although it would 
>>>>> present the
>>>>> traceback). We need the range of characters where attributes are set 
>>>>> (i.e. the
>>>>> misspelled word).
>>>>>
>>>>> This is testing with OpenOffice 2.2.0 on Ubuntu Feisty.
>>>>>
>>>>> Malte, has something changes recently in the Spellcheck dialog in OOo 
>>>>> 2.1 (and later)
>>>>> that would explain this?
>>>>>
>>>>> Thanks.
>>>>>
>>>>>   
>>>>>       
>>>>>         
>>>>   
>>>>     
>>>>       
>>>   
>>>     
>>   
Comment 3 thomas.benisch 2007-03-02 09:34:55 UTC
TBE->ES: Can you please confirm, that this is broken since OOo 2.1.
Comment 4 thomas.benisch 2007-03-02 16:18:30 UTC
change component to word processor
Comment 5 thomas.benisch 2007-03-06 11:26:44 UTC
accepted
Comment 6 Martin Hollmichel 2007-04-05 14:46:46 UTC
set target
Comment 7 thomas.benisch 2007-04-05 15:01:25 UTC
I implemented the ::com::sun::star::accessibility::XAccessibleTextAttributes
interface for the text engine (which is used by the MultiLineEdit).
Comment 8 thomas.benisch 2007-04-05 15:06:28 UTC
For the text 'The quiick brown fox' Orca reads:
"misspelt word quiick
 context The quick brown fox"
(tested with obr on Solaris x86)
Comment 9 thomas.benisch 2007-04-05 15:08:02 UTC
fixed on CWS tbe29
Comment 10 thomas.benisch 2007-04-10 11:54:34 UTC
TBE->ES: Please verify in CWS tbe29.
Comment 11 eric.savary 2007-04-11 15:51:32 UTC
Verified in cws tbe29.
Comment 12 eric.savary 2007-04-11 15:55:37 UTC
Closed
Comment 13 eric.savary 2007-04-11 16:31:49 UTC
Mistake! Not closed yet!
Comment 14 ace_dent 2008-05-16 03:29:50 UTC
This Issue is 'Verified' and not updated in 1yr+, so Closing.
A Closed Issue is a Happy Issue (TM).

Regards,
Andrew
 
Cleaning-up and Closing old Issues as part of:
~ The Grand Bug Squash, pre v3 ~