From: Glen Mazza Date: Sat, 15 Nov 2003 23:45:34 +0000 (+0000) Subject: Peter Herweg's patch applied: X-Git-Tag: Root_Temp_KnuthStylePageBreaking~1003 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=27de1e064d542f299c107b9a6c6408a29877188d;p=xmlgraphics-fop.git Peter Herweg's patch applied: http://nagoya.apache.org/bugzilla/showattachment.cgi?attach_id=9128 git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@197013 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfColorTable.java b/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfColorTable.java index 1297ba11c..01f21baf9 100644 --- a/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfColorTable.java +++ b/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfColorTable.java @@ -210,7 +210,9 @@ public class RtfColorTable { } header.writeGroupMark (true); - header.writeControlWord ("colortbl;"); + //Don't use writeControlWord, because it appends a blank, + //which may confuse Wordpad. + header.write ("\\colortbl;"); int len = colorTable.size (); @@ -236,7 +238,7 @@ public class RtfColorTable { * @param i Identifier of color */ private void addColor (Integer i) { - colorIndex.put (i, new Integer (colorTable.size () + 1)); + colorIndex.put (i, new Integer (colorTable.size ())); colorTable.addElement (i); } @@ -271,4 +273,4 @@ public class RtfColorTable { return retVal < 0 ? retVal + 256 : retVal; } -} \ No newline at end of file +}