bckfnn      2004/02/04 05:04:17

  Modified:    src/java/org/apache/fop/layoutmgr PageLayoutManager.java
  Log:
  Set the ipd and bpd on the region reference area based on the reldims
  and use those values those values for layout.
  
  Revision  Changes    Path
  1.29      +5 -4      xml-fop/src/java/org/apache/fop/layoutmgr/PageLayoutManager.java
  
  Index: PageLayoutManager.java
  ===================================================================
  RCS file: 
/home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/PageLayoutManager.java,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- PageLayoutManager.java    17 Jan 2004 19:29:46 -0000      1.28
  +++ PageLayoutManager.java    4 Feb 2004 13:04:17 -0000       1.29
  @@ -470,7 +470,7 @@
           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 @@
               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 @@
           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 @@
           // 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 @@
           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);
       }
   
       /**
  
  
  

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

Reply via email to