--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTView.m Thu Feb 25 10:22:22 2016 +0530
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTView.m Fri Feb 26 18:51:44 2016 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -624,7 +624,8 @@
{
NSString *selectedText = [self accessibleSelectedText];
NSAttributedString *styledText = [[NSAttributedString alloc] initWithString:selectedText];
- NSData *rtfdData = [styledText RTFDFromRange:NSMakeRange(0, [styledText length]) documentAttributes:nil];
+ NSData *rtfdData = [styledText RTFDFromRange:NSMakeRange(0, [styledText length])
+ documentAttributes:@{NSDocumentTypeDocumentAttribute: NSRTFTextDocumentType}];
[styledText release];
return rtfdData;
}
@@ -681,7 +682,7 @@
if ([[pboard types] containsObject:NSRTFDPboardType])
{
NSData *rtfdData = [pboard dataForType:NSRTFDPboardType];
- NSAttributedString *styledText = [[NSAttributedString alloc] initWithRTFD:rtfdData documentAttributes:nil];
+ NSAttributedString *styledText = [[NSAttributedString alloc] initWithRTFD:rtfdData documentAttributes:NULL];
NSString *text = [styledText string];
[styledText release];