jeremias    2005/02/07 02:59:25

  Modified:    src/java/org/apache/fop/layoutmgr TraitSetter.java
  Log:
  use hasBackground() as a fail-fast.
  
  Revision  Changes    Path
  1.17      +4 -3      
xml-fop/src/java/org/apache/fop/layoutmgr/TraitSetter.java
  
  Index: TraitSetter.java
  ===================================================================
  RCS file: 
/home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/TraitSetter.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- TraitSetter.java  25 Jan 2005 12:53:29 -0000      1.16
  +++ TraitSetter.java  7 Feb 2005 10:59:25 -0000       1.17
  @@ -165,6 +165,9 @@
        * @param backProps the background properties
        */
       public static void addBackground(Area area, 
CommonBorderPaddingBackground backProps) {
  +        if (!backProps.hasBackground()) {
  +            return;
  +        }
           Trait.Background back = new Trait.Background();
           back.setColor(backProps.backgroundColor);
   
  @@ -213,9 +216,7 @@
               }
           }
   
  -        if (back.getColor() != null || back.getFopImage() != null) {
  -            area.addTrait(Trait.BACKGROUND, back);
  -        }
  +        area.addTrait(Trait.BACKGROUND, back);
       }
   
       /**
  
  
  

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

Reply via email to