vmote       2003/09/21 15:21:11

  Modified:    src/java/org/apache/fop/rtf/renderer RTFHandler.java
  Log:
  reset background-color for each paragraph, submitted by Peter Herweg, see 
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23302
  
  Revision  Changes    Path
  1.24      +8 -3      xml-fop/src/java/org/apache/fop/rtf/renderer/RTFHandler.java
  
  Index: RTFHandler.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/rtf/renderer/RTFHandler.java,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- RTFHandler.java   19 Sep 2003 18:27:59 -0000      1.23
  +++ RTFHandler.java   21 Sep 2003 22:21:11 -0000      1.24
  @@ -689,6 +689,12 @@
           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 @@
              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);
           }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to