From 65e41b462559b2435090fc103080a18bff3ac108 Mon Sep 17 00:00:00 2001 From: William Victor Mote Date: Sun, 21 Sep 2003 22:21:11 +0000 Subject: [PATCH] reset background-color for each paragraph, submitted by Peter Herweg, see http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23302 git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@196935 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/fop/rtf/renderer/RTFHandler.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/java/org/apache/fop/rtf/renderer/RTFHandler.java b/src/java/org/apache/fop/rtf/renderer/RTFHandler.java index 5b6886354..67435d4f1 100644 --- a/src/java/org/apache/fop/rtf/renderer/RTFHandler.java +++ b/src/java/org/apache/fop/rtf/renderer/RTFHandler.java @@ -689,6 +689,12 @@ public class RTFHandler extends FOInputHandler { rtfAttr.set(rtfValue); } + /** + * Reads background-color from bl and writes it to rtfAttr. + * + * @param bl the Block object the properties are read from + * @param rtfAttr the RtfAttributes object the attributes are written to + */ private void attrBlockBackgroundColor(Block bl, RtfAttributes rtfAttr) { ColorType fopValue = bl.properties.get("background-color").getColorType(); int rtfColor = 0; @@ -696,12 +702,11 @@ public class RTFHandler extends FOInputHandler { actually a transparent black, which is generally not suitable as a default here. Changing FOP's default to "white" causes problems in PDF output, so we will look for the default here & change it to - white. */ + "auto". */ if ((fopValue.getRed() == 0) && (fopValue.getGreen() == 0) && (fopValue.getBlue() == 0) && (fopValue.getAlpha() == 0)) { - rtfColor = RtfColorTable.getInstance().getColorNumber("white").intValue(); + rtfColor = 0; //=auto currentRTFBackgroundColor = -1; - return; } else { rtfColor = convertFOPColorToRTF(fopValue); } -- 2.39.5