OS X Accessibility: implement AXStyleRangeForIndex in QTextEdit
Not tested as I have no idea what VoiceOver uses it for (it seems to never query this attribute during any operation I tested). Change-Id: Ie5e2b765a9956bcf2be9b659b8914e393ed1ea90 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>bb10
parent
250e80ceb9
commit
e9bbe07501
|
|
@ -357,7 +357,7 @@ static void convertLineOffset(QAccessibleTextInterface *text, int &line, int &of
|
|||
// NSAccessibilityRangeForIndexParameterizedAttribute,
|
||||
NSAccessibilityBoundsForRangeParameterizedAttribute,
|
||||
// NSAccessibilityRTFForRangeParameterizedAttribute,
|
||||
// NSAccessibilityStyleRangeForIndexParameterizedAttribute,
|
||||
NSAccessibilityStyleRangeForIndexParameterizedAttribute,
|
||||
NSAccessibilityAttributedStringForRangeParameterizedAttribute,
|
||||
nil
|
||||
];
|
||||
|
|
@ -424,6 +424,11 @@ static void convertLineOffset(QAccessibleTextInterface *text, int &line, int &of
|
|||
QPoint point(static_cast<int>(nsPoint.x), static_cast<int>(qt_mac_flipYCoordinate(nsPoint.y)));
|
||||
int offset = iface->textInterface()->offsetAtPoint(point);
|
||||
return [NSValue valueWithRange:NSMakeRange(static_cast<NSUInteger>(offset), 1)];
|
||||
} else if ([attribute isEqualToString: NSAccessibilityStyleRangeForIndexParameterizedAttribute]) {
|
||||
int start = 0;
|
||||
int end = 0;
|
||||
iface->textInterface()->attributes([parameter intValue], &start, &end);
|
||||
return [NSValue valueWithRange:NSMakeRange(static_cast<NSUInteger>(start), static_cast<NSUInteger>(end - start))];
|
||||
}
|
||||
return nil;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue