]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
More simplifications.
authorGlen Mazza <gmazza@apache.org>
Tue, 5 Apr 2005 02:26:53 +0000 (02:26 +0000)
committerGlen Mazza <gmazza@apache.org>
Tue, 5 Apr 2005 02:26:53 +0000 (02:26 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_KnuthStylePageBreaking@198559 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/area/RegionReference.java
src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java

index e4da38fd3ec723d8e6f0196422ee7988e1bc6459..6f671e96f3bde86e131454120cdd1d6d27c913d8 100644 (file)
@@ -31,7 +31,6 @@ import org.apache.fop.fo.Constants;
 public class RegionReference extends Area implements Cloneable {
     private int regionClass = Constants.FO_REGION_BEFORE;
     private CTM ctm;
-    private int bpd;
 
     // the list of block areas from the static flow
     private List blocks = new ArrayList();
@@ -106,24 +105,6 @@ public class RegionReference extends Area implements Cloneable {
         blocks.add(block);
     }
 
-    /**
-     * Set the block-progression-dimension.
-     *
-     * @return the footnote area
-     */
-    public void setBPD(int bpd) {
-        this.bpd = bpd;
-    }
-
-    /**
-     * Set the block-progression-dimension.
-     *
-     * @return the footnote area
-     */
-    public int getBPD() {
-        return bpd;
-    }
-
     /**
      * Clone this region.
      * This is used when cloning the page by the page master.
index 4c365a5531cabbff3579f327523ab6b92d6d5000..6f1c677c8fa9a2107bfe6475fb9545fa1f4a465f 100644 (file)
@@ -27,9 +27,7 @@ import java.awt.geom.Rectangle2D;
 import org.apache.fop.area.Area;
 import org.apache.fop.area.BlockViewport;
 import org.apache.fop.area.Block;
-import org.apache.fop.area.PageViewport;
 import org.apache.fop.area.Trait;
-import org.apache.fop.fo.Constants;
 import org.apache.fop.fo.flow.BlockContainer;
 import org.apache.fop.fo.properties.CommonAbsolutePosition;
 import org.apache.fop.area.CTM;
@@ -96,21 +94,6 @@ public class BlockContainerLayoutManager extends BlockStackingLayoutManager
         fobj = node;
     }
     
-    /**
-     * @return the currently applicable page viewport
-     */
-    protected PageViewport getPageViewport() {
-        LayoutManager lm = this;
-        while (lm != null && !(lm instanceof PageSequenceLayoutManager)) {
-            lm = lm.getParent();
-        }
-        if (lm == null) {
-            return null;
-        } else {
-            return ((PageSequenceLayoutManager)lm).getCurrentPageViewport();
-        }
-    }
-
     /**
      * @see org.apache.fop.layoutmgr.AbstractLayoutManager#initProperties()
      */
@@ -376,7 +359,7 @@ public class BlockContainerLayoutManager extends BlockStackingLayoutManager
             allocBPD = 0;
             if (abProps.bottom.getEnum() != EN_AUTO) {
                 if (isFixed()) {
-                    allocBPD = (int)getPageViewport().getViewArea().getHeight();
+                    allocBPD = (int)getCurrentPageViewport().getViewArea().getHeight();
                 } else {
                     allocBPD = context.getStackLimit().opt; 
                 }
@@ -393,7 +376,7 @@ public class BlockContainerLayoutManager extends BlockStackingLayoutManager
             allocIPD += getIPIndents();
         } else {
             if (isFixed()) {
-                allocIPD = (int)getPageViewport().getViewArea().getWidth(); 
+                allocIPD = (int)getCurrentPageViewport().getViewArea().getWidth(); 
             } else {
                 allocIPD = context.getRefIPD();
             }
@@ -767,7 +750,7 @@ public class BlockContainerLayoutManager extends BlockStackingLayoutManager
             allocBPD = 0;
             if (abProps.bottom.getEnum() != EN_AUTO) {
                 if (isFixed()) {
-                    allocBPD = (int)getPageViewport().getViewArea().getHeight();
+                    allocBPD = (int)getCurrentPageViewport().getViewArea().getHeight();
                 } else {
                     allocBPD = context.getStackLimit().opt; 
                 }
@@ -784,7 +767,7 @@ public class BlockContainerLayoutManager extends BlockStackingLayoutManager
             allocIPD += getIPIndents();
         } else {
             if (isFixed()) {
-                allocIPD = (int)getPageViewport().getViewArea().getWidth(); 
+                allocIPD = (int)getCurrentPageViewport().getViewArea().getWidth(); 
             } else {
                 allocIPD = context.getRefIPD();
             }