diff options
author | Jeremias Maerki <jeremias@apache.org> | 2009-01-30 19:28:59 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2009-01-30 19:28:59 +0000 |
commit | 5a32e5468b4df6fd33c76027f8f72385f8140373 (patch) | |
tree | ef2451e54e1b094df3c0051f829b0428029d5269 /src/java/org/apache/fop/area/Page.java | |
parent | 77c49600624d70f8de7a19757342bd897c6de20f (diff) | |
download | xmlgraphics-fop-5a32e5468b4df6fd33c76027f8f72385f8140373.tar.gz xmlgraphics-fop-5a32e5468b4df6fd33c76027f8f72385f8140373.zip |
Fixed test error for transcoders.
Enabled disabling strict validation from inside the test case. This enabled activating the border/padding test case for region references.
Refactored layout engine and intermediate format tests a bit to increase code reuse.
Fixed the way border/padding are set on the area tree. The current way had unwanted side-effects for the AreaTreeParser.
Added support for border/padding on region references when parsing from area tree XML.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign@739386 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/area/Page.java')
-rw-r--r-- | src/java/org/apache/fop/area/Page.java | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/java/org/apache/fop/area/Page.java b/src/java/org/apache/fop/area/Page.java index 167d28e6b..4607dfb74 100644 --- a/src/java/org/apache/fop/area/Page.java +++ b/src/java/org/apache/fop/area/Page.java @@ -128,8 +128,10 @@ public class Page extends AreaTreeObject implements Serializable, Cloneable { } // set borders and padding traits // (a little extensions wrt what prescribed by the specs at 6.4.14) - TraitSetter.addBorders(rr, r.getCommonBorderPaddingBackground(), false, false, false, false, null); - TraitSetter.addPadding(rr, r.getCommonBorderPaddingBackground(), false, false, false, false, null); + TraitSetter.addBorders(rr, r.getCommonBorderPaddingBackground(), + false, false, false, false, null); + TraitSetter.addPadding(rr, r.getCommonBorderPaddingBackground(), + false, false, false, false, null); setRegionReferencePosition(rr, r, rvp.getViewArea()); rvp.setRegionReference(rr); setRegionViewport(r.getNameId(), rvp); @@ -182,8 +184,12 @@ public class Page extends AreaTreeObject implements Serializable, Cloneable { FODimension reldims = new FODimension(0, 0); rr.setCTM(CTM.getCTMandRelDims(r.getReferenceOrientation(), r.getWritingMode(), absRegVPRect, reldims)); - rr.setIPD(reldims.ipd); - rr.setBPD(reldims.bpd); + rr.setIPD(reldims.ipd + - rr.getBorderAndPaddingWidthStart() + - rr.getBorderAndPaddingWidthEnd()); + rr.setBPD(reldims.bpd + - rr.getBorderAndPaddingWidthBefore() + - rr.getBorderAndPaddingWidthAfter()); } /** |