diff options
author | Tobias Melcher | 2017-12-04 09:57:57 +0000 |
---|---|---|
committer | Lars Vogel | 2018-01-17 17:00:55 +0000 |
commit | b604b5bff36ee1e1907249135a76eb97ba7a525f (patch) | |
tree | c52623a02dfddee5b0f5be206460f7a90afd2af3 | |
parent | bf4f51d091c1ca54883063f9567fd83cddafeb63 (diff) | |
download | eclipse.platform.swt-b604b5bff36ee1e1907249135a76eb97ba7a525f.tar.gz eclipse.platform.swt-b604b5bff36ee1e1907249135a76eb97ba7a525f.tar.xz eclipse.platform.swt-b604b5bff36ee1e1907249135a76eb97ba7a525f.zip |
Bug 529241 - RTFWriter ignores background color
replace \highlight with \chshdng0\chcbpat in RTFWriter to be able to
configure the background color
Change-Id: I1ee8d5c43b5a036425c534f5d4174460534d59f3
Signed-off-by: Tobias Melcher <tobias.melcher@sap.com>
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java index 19d721fcc8..df5510014e 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java @@ -930,7 +930,7 @@ public class StyledText extends Canvas { * Use the colors and font styles specified in "styles" and "lineBackground". * Formatting is written to reflect the text rendering by the text widget. * Style background colors take precedence over the line background color. - * Background colors are written using the \highlight tag (vs. the \cb tag). + * Background colors are written using the \chshdng0\chcbpat tag (vs. the \cb tag). * </p> * * @param line line text to write as RTF. Must not contain line breaks @@ -960,7 +960,7 @@ public class StyledText extends Canvas { write(" "); if (lineBackground != null) { - write("{\\highlight"); + write("{\\chshdng0\\chcbpat"); write(getColorIndex(lineBackground, DEFAULT_BACKGROUND)); write(" "); } @@ -997,7 +997,7 @@ public class StyledText extends Canvas { write(getColorIndex(style.foreground, DEFAULT_FOREGROUND)); int colorIndex = getColorIndex(style.background, DEFAULT_BACKGROUND); if (colorIndex != DEFAULT_BACKGROUND) { - write("\\highlight"); + write("\\chshdng0\\chcbpat"); write(colorIndex); } int fontStyle = style.fontStyle; |