Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 315140 - StyledText.RTFWriter ignores font style
Summary: StyledText.RTFWriter ignores font style
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.6   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.7 M2   Edit
Assignee: Felipe Heidrich CLA
QA Contact: Felipe Heidrich CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-31 16:24 EDT by Rodrigo Peretti CLA
Modified: 2010-09-15 16:56 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rodrigo Peretti CLA 2010-05-31 16:24:25 EDT
Eclipse 3.6 RC2

I'm trying to use StyledText to create a simple Rich Text editor. In order to extract RTF from it, I'm using the clipboard workaround.

I'm running into an issue when the style of the text is defined in the font (as opposed to fontStyle). It seems RTFWriter only writes styles if they are in fontStyle but ignores the ones in FontData.getStyle()

I wonder if this is a bug or I am missing something.
Comment 1 Felipe Heidrich CLA 2010-05-31 17:05:36 EDT
This is bug.

In StyledText$RTFWriter#writeHeader it ignores the font style when writting the font table (see that fd.getStyle() is never called).
We could also fix the bug writeStyledLine when item.style != null.

After 3.6, only very serious bugs can be included in the build for 3.6 at this point. Sorry Rodrigo.
Comment 2 Felipe Heidrich CLA 2010-08-13 15:48:10 EDT
Fixed in HEAD > 20100813