gmazza      2004/03/21 09:31:29

  Modified:    examples/fo/basic leader.fo
               src/java/org/apache/fop/layoutmgr AddLMVisitor.java
  Log:
  Fix to get use-content option of fo:leader working again. leader.fo now
  runs without error.
  
  Revision  Changes    Path
  1.3       +7 -7      xml-fop/examples/fo/basic/leader.fo
  
  Index: leader.fo
  ===================================================================
  RCS file: /home/cvs/xml-fop/examples/fo/basic/leader.fo,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- leader.fo 29 Jan 2003 16:07:20 -0000      1.2
  +++ leader.fo 21 Mar 2004 17:31:29 -0000      1.3
  @@ -725,7 +725,7 @@
         <fo:block space-before.optimum="8pt" font-size="12pt">
           The following examples show Leader with "use-content".
           The inline areas from the context of the leader are
  -        repeated until the lenght of the leader. The
  +        repeated until the length of the leader. The
           "leader-pattern-width" can be used to set the width
           of each repeated pattern element. <fo:inline font-style="italic">
           If this width is less than the inline areas then the width
  @@ -733,17 +733,17 @@
         </fo:block>
   
         <fo:block space-before.optimum="5pt" text-align="start">Characters:
  -        <fo:leader leader-pattern="use-content">abcd</fo:leader>
  +        <fo:leader leader-pattern="use-content">abcd</fo:leader>End
         </fo:block>
   
         <fo:block space-before.optimum="5pt" text-align="start">Set width:
           <fo:leader leader-pattern="use-content"
  -            leader-pattern-width="50pt">abcd</fo:leader>
  +            leader-pattern-width="50pt">abcd</fo:leader>End
         </fo:block>
   
         <fo:block space-before.optimum="5pt" text-align="start">Small Width:
           <fo:leader leader-pattern="use-content"
  -                   leader-pattern-width="2pt">abcd</fo:leader>
  +                   leader-pattern-width="2pt">abcd</fo:leader>End
         </fo:block>
   
         <fo:block space-before.optimum="5pt" text-align="start">SVG:
  @@ -754,7 +754,7 @@
   <rect x="5" y="5" width="5" height="5" style="fill:black"/>
   </svg>
   </fo:instream-foreign-object>
  -        </fo:leader>
  +        </fo:leader>End
         </fo:block>
   
         <fo:block space-before.optimum="5pt" text-align="start">Mixed:
  @@ -766,7 +766,7 @@
   <rect x="5" y="5" width="5" height="5" style="fill:black"/>
   </svg>
   </fo:instream-foreign-object>
  -        </fo:leader>
  +        </fo:leader>End
         </fo:block>
   
         <fo:block space-before.optimum="5pt" text-align="start">Mixed:
  @@ -779,7 +779,7 @@
   </svg>
   </fo:instream-foreign-object>
   def
  -        </fo:leader>
  +        </fo:leader>End
         </fo:block>
       </fo:flow>
     </fo:page-sequence>
  
  
  
  1.36      +4 -3      xml-fop/src/java/org/apache/fop/layoutmgr/AddLMVisitor.java
  
  Index: AddLMVisitor.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/AddLMVisitor.java,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- AddLMVisitor.java 21 Mar 2004 12:03:07 -0000      1.35
  +++ AddLMVisitor.java 21 Mar 2004 17:31:29 -0000      1.36
  @@ -294,7 +294,7 @@
        public void serveLeader(final Leader node) {
            LeafNodeLayoutManager lm = new LeafNodeLayoutManager() {
                public InlineArea get(LayoutContext context) {
  -                 return getLeaderInlineArea(node);
  +                 return getLeaderInlineArea(node, this);
                }
   
                protected MinOptMax getAllocationIPD(int refIPD) {
  @@ -322,7 +322,7 @@
            return new MinOptMax(min, opt, max);
        }
   
  -     private InlineArea getLeaderInlineArea(Leader node) {
  +     private InlineArea getLeaderInlineArea(Leader node, LayoutManager parentLM) {
            node.setup();
            InlineArea leaderArea = null;
   
  @@ -375,6 +375,7 @@
                FilledArea fa = new FilledArea();
   
                ContentLayoutManager clm = new ContentLayoutManager(fa);
  +             clm.setParent(parentLM);
                clm.setUserAgent(node.getUserAgent());
                lm.setParent(clm);
   
  
  
  

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

Reply via email to