diff options
author | Finn Bock <bckfnn@apache.org> | 2004-02-04 13:04:17 +0000 |
---|---|---|
committer | Finn Bock <bckfnn@apache.org> | 2004-02-04 13:04:17 +0000 |
commit | 66c0ad06ef217368b080339dd286f8a45fc8b6ae (patch) | |
tree | 43e8a90730f6c72e495eb8d6dd2654479b2106ae /src | |
parent | 3f9f0e401f48836bd2d76b835ad2ff15473c8f36 (diff) | |
download | xmlgraphics-fop-66c0ad06ef217368b080339dd286f8a45fc8b6ae.tar.gz xmlgraphics-fop-66c0ad06ef217368b080339dd286f8a45fc8b6ae.zip |
Set the ipd and bpd on the region reference area based on the reldims
and use those values those values for layout.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@197327 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r-- | src/java/org/apache/fop/layoutmgr/PageLayoutManager.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/java/org/apache/fop/layoutmgr/PageLayoutManager.java b/src/java/org/apache/fop/layoutmgr/PageLayoutManager.java index d4c752cd1..ae6fd33cd 100644 --- a/src/java/org/apache/fop/layoutmgr/PageLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/PageLayoutManager.java @@ -470,7 +470,7 @@ public class PageLayoutManager extends AbstractLayoutManager implements Runnable RegionViewport rv = curPage.getPage().getRegionViewport( Region.BODY_CODE); curBody = (BodyRegion) rv.getRegion(); - flowBPD = (int) rv.getViewArea().getHeight() - + flowBPD = (int) curBody.getBPD() - rv.getBorderAndPaddingWidthBefore() - rv.getBorderAndPaddingWidthAfter(); return curPage; @@ -485,7 +485,6 @@ public class PageLayoutManager extends AbstractLayoutManager implements Runnable return; } RegionViewport reg = curPage.getPage().getRegionViewport(regionClass); - reg.getRegion().setIPD((int)reg.getViewArea().getWidth()); if (reg == null) { getLogger().error("no region viewport: shouldn't happen"); } @@ -496,7 +495,7 @@ public class PageLayoutManager extends AbstractLayoutManager implements Runnable lm.setParent(this); LayoutContext childLC = new LayoutContext(0); childLC.setStackLimit(new MinOptMax((int)curPage.getViewArea().getHeight())); - childLC.setRefIPD((int)reg.getViewArea().getWidth()); + childLC.setRefIPD(reg.getRegion().getIPD()); while (!lm.isFinished()) { BreakPoss bp = lm.getNextBreakPoss(childLC); if (bp != null) { @@ -710,7 +709,7 @@ public class PageLayoutManager extends AbstractLayoutManager implements Runnable // get Width or Height as IPD for span RegionViewport rv = curPage.getPage().getRegionViewport(Region.BODY_CODE); - int ipdWidth = (int) rv.getViewArea().getWidth() - + int ipdWidth = (int) rv.getRegion().getIPD() - rv.getBorderAndPaddingWidthStart() - rv.getBorderAndPaddingWidthEnd(); curSpan.setIPD(ipdWidth); @@ -898,6 +897,8 @@ public class PageLayoutManager extends AbstractLayoutManager implements Runnable FODimension reldims = new FODimension(0, 0); rr.setCTM(CTM.getCTMandRelDims(r.getPropertyManager().getAbsRefOrient(), r.getPropertyManager().getWritingMode(), absRegVPRect, reldims)); + rr.setIPD(reldims.ipd); + rr.setBPD(reldims.bpd); } /** |