]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
This is Jordan Naftolin's patch to allow you to have links in the
authorSteve Coffman <gears@apache.org>
Fri, 16 Jun 2000 19:24:01 +0000 (19:24 +0000)
committerSteve Coffman <gears@apache.org>
Fri, 16 Jun 2000 19:24:01 +0000 (19:24 +0000)
xsl-before and xsl-after regions.

git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@193403 13f79535-47bb-0310-9956-ffa450edef68

src/org/apache/fop/fo/flow/StaticContent.java

index 5e21aefdcd22133dd126ebcacbed14af6745bfdc..26c07b8f58a5017c7c79586d0e08b33565380b2b 100644 (file)
@@ -94,6 +94,17 @@ public class StaticContent extends FObj {
     
     public Status layout(Area area) throws FOPException {
        int numChildren = this.children.size();
+       // Set area absolute height so that link rectangles will be drawn correctly in xsl-before and xsl-after
+       String flowName = this.properties.get("flow-name").getString();
+       if(flowName.equals("xsl-before"))
+       {
+               area.setAbsoluteHeight(-area.getMaxHeight());
+       }
+       else if(flowName.equals("xsl-after"))
+       {
+               area.setAbsoluteHeight(area.getPage().getBody().getMaxHeight());
+       }
+       
        for (int i = 0; i < numChildren; i++) {
            FObj fo = (FObj) children.elementAt(i);
            fo.layout(area);