<Swing Dev> [13] RFR JDK-8219156: RTFEditorKit writes background color but doesn't read

Sergey Bylokhov Sergey.Bylokhov at oracle.com
Tue Feb 19 21:07:09 UTC 2019


Hi, Prasanta.

Looks like in the test you have a code to check a foreground color(attrBackground, "green_foreground ") but it is unused.


On 19/02/2019 03:23, Prasanta Sadhukhan wrote:
> Hi All,
> 
> Please review a fix for an issue where it is seen that JTextPane with RTFEditorKit writes background color for specific word into rtf file but doesn't read it. So, if yellow background color is set, it will read default white background.
> 
> This is because RTFReader#AttributeTeackingDestination.handleKeyWord() does not handle "cb" keyword which is Font(character) formatting property for background color
> as per http://www.biblioscape.com/rtf15_spec.htm.
> Fix is to make it handle "cb" keyword.
> 
> Bug: https://bugs.openjdk.java.net/browse/JDK-8219156
> webrev: http://cr.openjdk.java.net/~psadhukhan/8219156/webrev.0/
> 
> Regards
> Prasanta
> 


-- 
Best regards, Sergey.


More information about the swing-dev mailing list