Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 311292

Summary: QI shouldn't return S_OK for IAText if there are only attributeListeners
Product: [Eclipse Project] Platform Reporter: Carolyn MacLeod <carolynmacleod4>
Component: SWTAssignee: Carolyn MacLeod <carolynmacleod4>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: Silenio_Quarti
Version: 3.6Flags: Silenio_Quarti: review+
Target Milestone: 3.6 RC1   
Hardware: PC   
OS: Windows Vista   
Whiteboard:
Attachments:
Description Flags
Only support IAccessibleText if there are accessibleTextListeners none

Description Carolyn MacLeod CLA 2010-05-01 16:48:50 EDT
Created attachment 166723 [details]
Only support IAccessibleText if there are accessibleTextListeners

Run org.eclipse.swt.examples.accessibility.LiveRegionExample.
Run AccProbe, and look at the Label at the top of the shell.
This Label implements an accessibleAttributeListener so that it can return object attributes.
The code for QI currently returns S_OK for IAccessibleText. This Label is just a plain Label - it is not an IAccessibleText (or even a ROLE_TEXT) so it returns all sorts of bogus information when AccProbe sends any of the text methods to the IAccessibleText interface.
The fix is to only answer S_OK for IAccessibleText if there are accessibleTextListeners. It doesn't make sense for an application to return text attributes without also implementing accessibleTextListener.
Comment 1 Carolyn MacLeod CLA 2010-05-03 22:43:21 EDT
Fixed > 20100503