keiron      01/08/30 04:33:38

  Modified:    src/org/apache/fop/fo/flow Leader.java
  Log:
  will handle max leader length better, default was 0 before
  
  Revision  Changes    Path
  1.11      +9 -3      xml-fop/src/org/apache/fop/fo/flow/Leader.java
  
  Index: Leader.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/Leader.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- Leader.java       2001/08/20 11:19:23     1.10
  +++ Leader.java       2001/08/30 11:33:38     1.11
  @@ -1,5 +1,5 @@
   /*
  - * $Id: Leader.java,v 1.10 2001/08/20 11:19:23 keiron Exp $
  + * $Id: Leader.java,v 1.11 2001/08/30 11:33:38 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -108,8 +108,14 @@
               this.properties.get("leader-length.optimum").getLength().mvalue();
           int leaderLengthMinimum =
               this.properties.get("leader-length.minimum").getLength().mvalue();
  -        int leaderLengthMaximum =
  -            this.properties.get("leader-length.maximum").getLength().mvalue();
  +        Length maxlength = this.properties.get("leader-length.maximum").getLength();
  +        int leaderLengthMaximum;
  +        if(maxlength instanceof PercentLength) {
  +            leaderLengthMaximum = (int)(((PercentLength)maxlength).value()
  +                                      * area.getAllocationWidth());
  +        } else {
  +            leaderLengthMaximum = maxlength.mvalue();
  +        }
           // the following properties only apply for leader-pattern = "rule"
           int ruleThickness =
               this.properties.get("rule-thickness").getLength().mvalue();
  
  
  

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

Reply via email to