< prev index next >
src/java.desktop/macosx/native/libawt_lwawt/awt/AWTView.m
Print this page
*** 622,632 ****
// same as above, but converts to RTFD
- (NSData *)accessibleSelectedTextAsRTFD
{
NSString *selectedText = [self accessibleSelectedText];
NSAttributedString *styledText = [[NSAttributedString alloc] initWithString:selectedText];
! NSData *rtfdData = [styledText RTFDFromRange:NSMakeRange(0, [styledText length]) documentAttributes:nil];
[styledText release];
return rtfdData;
}
// finds the focused accessible element, and if it is a text element, sets the text in it
--- 622,632 ----
// same as above, but converts to RTFD
- (NSData *)accessibleSelectedTextAsRTFD
{
NSString *selectedText = [self accessibleSelectedText];
NSAttributedString *styledText = [[NSAttributedString alloc] initWithString:selectedText];
! NSData *rtfdData = [styledText RTFDFromRange:NSMakeRange(0, [styledText length]) documentAttributes:@{}];
[styledText release];
return rtfdData;
}
// finds the focused accessible element, and if it is a text element, sets the text in it
*** 679,689 ****
}
if ([[pboard types] containsObject:NSRTFDPboardType])
{
NSData *rtfdData = [pboard dataForType:NSRTFDPboardType];
! NSAttributedString *styledText = [[NSAttributedString alloc] initWithRTFD:rtfdData documentAttributes:nil];
NSString *text = [styledText string];
[styledText release];
return [self replaceAccessibleTextSelection:text];
}
--- 679,689 ----
}
if ([[pboard types] containsObject:NSRTFDPboardType])
{
NSData *rtfdData = [pboard dataForType:NSRTFDPboardType];
! NSAttributedString *styledText = [[NSAttributedString alloc] initWithRTFD:rtfdData documentAttributes:@{}];
NSString *text = [styledText string];
[styledText release];
return [self replaceAccessibleTextSelection:text];
}
< prev index next >