.spaceBefore, this).getSpace();
foBlockSpaceAfter = new SpaceVal(getBlockContainerFO().getCommonMarginBlock()
.spaceAfter, this).getSpace();
+ startIndent = getBlockContainerFO().getCommonMarginBlock().startIndent.getValue(this);
+ endIndent = getBlockContainerFO().getCommonMarginBlock().endIndent.getValue(this);
boolean rotated = (getBlockContainerFO().getReferenceOrientation() % 180 != 0);
if (rotated) {
return indents;
}
- private int getIPIndents() {
- int iIndents = 0;
- iIndents += getBlockContainerFO().getCommonMarginBlock().startIndent.getValue(this);
- iIndents += getBlockContainerFO().getCommonMarginBlock().endIndent.getValue(this);
- return iIndents;
- }
-
private boolean isAbsoluteOrFixed() {
return (abProps.absolutePosition == EN_ABSOLUTE)
|| (abProps.absolutePosition == EN_FIXED);
autoHeight = false;
//boolean rotated = (getBlockContainerFO().getReferenceOrientation() % 180 != 0);
- referenceIPD = context.getRefIPD();
int maxbpd = context.getStackLimit().opt;
- int allocBPD, allocIPD;
+ int allocBPD;
if (height.getEnum() == EN_AUTO
|| (!height.isAbsolute() && getAncestorBlockAreaBPD() <= 0)) {
//auto height when height="auto" or "if that dimension is not specified explicitly
allocBPD = height.getValue(this); //this is the content-height
allocBPD += getBPIndents();
}
+ vpContentBPD = allocBPD - getBPIndents();
+
+ referenceIPD = context.getRefIPD();
if (width.getEnum() == EN_AUTO) {
- allocIPD = referenceIPD;
+ updateContentAreaIPDwithOverconstrainedAdjust();
} else {
- allocIPD = width.getValue(this); //this is the content-width
- allocIPD += getIPIndents();
+ int contentWidth = width.getValue(this);
+ updateContentAreaIPDwithOverconstrainedAdjust(contentWidth);
}
-
- vpContentBPD = allocBPD - getBPIndents();
- setContentAreaIPD(allocIPD - getIPIndents());
double contentRectOffsetX = 0;
contentRectOffsetX += getBlockContainerFO()
// this);
TraitSetter.addMargins(viewportBlockArea,
getBlockContainerFO().getCommonBorderPaddingBackground(),
- getBlockContainerFO().getCommonMarginBlock(),
+ startIndent, endIndent,
this);
viewportBlockArea.setCTM(absoluteCTM);
}
public void initialize() {
+ super.initialize();
Font fs = getBlockFO().getCommonFont().getFontState(
getBlockFO().getFOEventHandler().getFontInfo(), this);
follow = -fs.getDescender();
middleShift = -fs.getXHeight() / 2;
lineHeight = getBlockFO().getLineHeight().getOptimum(this).getLength();
+ startIndent = getBlockFO().getCommonMarginBlock().startIndent.getValue(this);
+ endIndent = getBlockFO().getCommonMarginBlock().endIndent.getValue(this);
foSpaceBefore = new SpaceVal(getBlockFO().getCommonMarginBlock().spaceBefore, this)
.getSpace();
foSpaceAfter = new SpaceVal(getBlockFO().getCommonMarginBlock().spaceAfter, this)
return llm;
}
- private int getIPIndents() {
- int iIndents = 0;
- iIndents += getBlockFO().getCommonMarginBlock().startIndent.getValue(this);
- iIndents += getBlockFO().getCommonMarginBlock().endIndent.getValue(this);
- return iIndents;
- }
-
/**
* @see org.apache.fop.layoutmgr.BlockLevelLayoutManager#mustKeepTogether()
*/
if (curBlockArea == null) {
curBlockArea = new Block();
- int contentIPD = referenceIPD - getIPIndents();
-
- curBlockArea.setIPD(contentIPD/*parentwidth*/);
+ curBlockArea.setIPD(super.getContentAreaIPD());
TraitSetter.addBreaks(curBlockArea,
getBlockFO().getBreakBefore(), getBlockFO().getBreakAfter());
discardPaddingBefore, discardPaddingAfter, false, false, this);
TraitSetter.addMargins(curBlockArea,
getBlockFO().getCommonBorderPaddingBackground(),
- getBlockFO().getCommonMarginBlock(),
+ startIndent, endIndent,
this);
setCurrentArea(curBlockArea); // ??? for generic operations
protected boolean firstVisibleMarkServed = false;
/** Reference IPD available */
protected int referenceIPD = 0;
+ /** the effective start-indent value */
+ protected int startIndent = 0;
+ /** the effective end-indent value */
+ protected int endIndent = 0;
/**
* Holds the (one-time use) fo:block space-before
* and -after properties. Large fo:blocks are split
return (int) Math.ceil((float)len / bpUnit);
}
+ /**
+ * Determines and sets the content area IPD based on available reference area IPD, start- and
+ * end-indent properties.
+ * end-indent is adjusted based on overconstrained geometry rules, if necessary.
+ * @return the resulting content area IPD
+ */
+ protected int updateContentAreaIPDwithOverconstrainedAdjust() {
+ int ipd = referenceIPD - (startIndent + endIndent);
+ if (ipd < 0) {
+ //5.3.4, XSL 1.0, Overconstrained Geometry
+ log.debug("Adjusting end-indent based on overconstrained geometry rules for " + fobj);
+ endIndent += ipd;
+ ipd = 0;
+ //TODO Should we skip layout for a block that has ipd=0?
+ }
+ setContentAreaIPD(ipd);
+ return ipd;
+ }
+
+ /**
+ * Sets the content area IPD by directly supplying the value.
+ * end-indent is adjusted based on overconstrained geometry rules, if necessary.
+ * @return the resulting content area IPD
+ */
+ protected int updateContentAreaIPDwithOverconstrainedAdjust(int contentIPD) {
+ int ipd = referenceIPD - (contentIPD + (startIndent + endIndent));
+ if (ipd < 0) {
+ //5.3.4, XSL 1.0, Overconstrained Geometry
+ log.debug("Adjusting end-indent based on overconstrained geometry rules for " + fobj);
+ endIndent += ipd;
+ }
+ setContentAreaIPD(contentIPD);
+ return contentIPD;
+ }
+
/**
* @see LayoutManager#getNextKnuthElements(LayoutContext, int)
*/
referenceIPD = context.getRefIPD();
- int iIndents = 0;
- int bIndents = 0;
- if (fobj instanceof org.apache.fop.fo.flow.Block) {
- org.apache.fop.fo.flow.Block block = (org.apache.fop.fo.flow.Block)fobj;
- iIndents = block.getCommonMarginBlock().startIndent.getValue(this)
- + block.getCommonMarginBlock().endIndent.getValue(this);
- bIndents = block.getCommonBorderPaddingBackground().getBPPaddingAndBorder(false, this);
- }
- int ipd = referenceIPD - iIndents;
-
- MinOptMax stackSize = new MinOptMax();
-
- // Set context for percentage property values.
- setContentAreaIPD(ipd);
+ updateContentAreaIPDwithOverconstrainedAdjust();
LinkedList returnedList = null;
LinkedList contentList = new LinkedList();
childLC.copyPendingMarksFrom(context);
if (curLM instanceof LineLayoutManager) {
// curLM is a LineLayoutManager
- // set stackLimit for lines
- childLC.setStackLimit(new MinOptMax(ipd/*
- * - iIndents -
- * iTextIndent
- */));
- childLC.setRefIPD(ipd);
+ // set stackLimit for lines (stack limit is now i-p-direction, not b-p-direction!)
+ childLC.setStackLimit(new MinOptMax(getContentAreaIPD()));
+ childLC.setRefIPD(getContentAreaIPD());
} else {
// curLM is a ?
//childLC.setStackLimit(MinOptMax.subtract(context
}
}
+ /** @return the sum of start-indent and end-indent */
+ protected int getIPIndents() {
+ return startIndent + endIndent;
+ }
+
/**
* Returns the IPD of the content area
* @return the IPD of the content area
* outside of the border rectangle to the area.
* @param area the area to set the traits on.
* @param bpProps the border, padding and background properties
- * @param marginProps the margin properties.
+ * @param startIndent the effective start-indent value
+ * @param endIndent the effective end-indent value
* @param context the context for evaluation of percentages
*/
public static void addMargins(Area area,
CommonBorderPaddingBackground bpProps,
- CommonMarginBlock marginProps,
+ int startIndent, int endIndent,
PercentBaseContext context) {
- int startIndent = marginProps.startIndent.getValue(context);
if (startIndent != 0) {
area.addTrait(Trait.START_INDENT, new Integer(startIndent));
}
- int spaceStart = marginProps.startIndent.getValue(context)
+ int spaceStart = startIndent
- bpProps.getBorderStartWidth(false)
- bpProps.getPaddingStart(false, context);
if (spaceStart != 0) {
area.addTrait(Trait.SPACE_START, new Integer(spaceStart));
}
- int endIndent = marginProps.endIndent.getValue(context);
if (endIndent != 0) {
area.addTrait(Trait.END_INDENT, new Integer(endIndent));
}
- int spaceEnd = marginProps.endIndent.getValue(context)
+ int spaceEnd = endIndent
- bpProps.getBorderEndWidth(false)
- bpProps.getPaddingEnd(false, context);
if (spaceEnd != 0) {
}
}
+ /**
+ * Add space to a block area.
+ * Layout managers that create block areas can use this to add space
+ * outside of the border rectangle to the area.
+ * @param area the area to set the traits on.
+ * @param bpProps the border, padding and background properties
+ * @param marginProps the margin properties.
+ * @param context the context for evaluation of percentages
+ */
+ public static void addMargins(Area area,
+ CommonBorderPaddingBackground bpProps,
+ CommonMarginBlock marginProps,
+ PercentBaseContext context) {
+ int startIndent = marginProps.startIndent.getValue(context);
+ int endIndent = marginProps.endIndent.getValue(context);
+ addMargins(area, bpProps, startIndent, endIndent, context);
+ }
+
public static int getEffectiveSpace(double adjust, MinOptMax space) {
if (space == null) {
return 0;
getListBlockFO().getCommonMarginBlock().spaceBefore, this).getSpace();
foSpaceAfter = new SpaceVal(
getListBlockFO().getCommonMarginBlock().spaceAfter, this).getSpace();
+ startIndent = getListBlockFO().getCommonMarginBlock().startIndent.getValue(this);
+ endIndent = getListBlockFO().getCommonMarginBlock().endIndent.getValue(this);
}
private void resetSpaces() {
this.effSpaceAfter = foSpaceAfter;
}
- private int getIPIndents() {
- int iIndents = 0;
- iIndents += getListBlockFO().getCommonMarginBlock().startIndent.getValue(this);
- iIndents += getListBlockFO().getCommonMarginBlock().endIndent.getValue(this);
- return iIndents;
- }
-
/** @see org.apache.fop.layoutmgr.BlockStackingLayoutManager */
public LinkedList getNextKnuthElements(LayoutContext context, int alignment) {
resetSpaces();
getListItemFO().getCommonMarginBlock().spaceBefore, this).getSpace();
foSpaceAfter = new SpaceVal(
getListItemFO().getCommonMarginBlock().spaceAfter, this).getSpace();
+ startIndent = getListItemFO().getCommonMarginBlock().startIndent.getValue(this);
+ endIndent = getListItemFO().getCommonMarginBlock().endIndent.getValue(this);
}
private void resetSpaces() {
this.effSpaceAfter = foSpaceAfter;
}
- private int getIPIndents() {
- int iIndents = 0;
- iIndents += getListItemFO().getCommonMarginBlock().startIndent.getValue(this);
- iIndents += getListItemFO().getCommonMarginBlock().endIndent.getValue(this);
- return iIndents;
- }
-
/** @see org.apache.fop.layoutmgr.LayoutManager */
public LinkedList getNextKnuthElements(LayoutContext context, int alignment) {
referenceIPD = context.getRefIPD();
}
- private int getIPIndents() {
+ /** @see org.apache.fop.layoutmgr.BlockStackingLayoutManager#getIPIndents() */
+ protected int getIPIndents() {
int iIndents = 0;
int[] startEndBorderWidths = gridUnit.getStartEndBorderWidths();
startBorderWidth += startEndBorderWidths[0];
private Block curBlockArea;
- private int contentIPD;
private int referenceBPD;
private double tableUnits;
private boolean autoLayout = true;
getTable().getCommonMarginBlock().spaceBefore, this).getSpace();
foSpaceAfter = new SpaceVal(
getTable().getCommonMarginBlock().spaceAfter, this).getSpace();
+ startIndent = getTable().getCommonMarginBlock().startIndent.getValue(this);
+ endIndent = getTable().getCommonMarginBlock().endIndent.getValue(this);
if (getTable().isSeparateBorderModel()) {
this.halfBorderSeparationBPD = getTable().getBorderSeparation().getBPD().getLength()
this.effSpaceAfter = foSpaceAfter;
}
- private int getIPIndents() {
- int iIndents = 0;
- iIndents += getTable().getCommonMarginBlock().startIndent.getValue(this);
- iIndents += getTable().getCommonMarginBlock().endIndent.getValue(this);
- return iIndents;
- }
-
/** @return half the value of border-separation.block-progression-dimension. */
public int getHalfBorderSeparationBPD() {
return halfBorderSeparationBPD;
referenceIPD = context.getRefIPD();
if (getTable().getInlineProgressionDimension().getOptimum(this).getEnum() != EN_AUTO) {
- referenceIPD = getTable().getInlineProgressionDimension().getOptimum(this)
+ int contentIPD = getTable().getInlineProgressionDimension().getOptimum(this)
.getLength().getValue(this);
- contentIPD = referenceIPD;
+ updateContentAreaIPDwithOverconstrainedAdjust(contentIPD);
} else {
if (!getTable().isAutoLayout()) {
log.info("table-layout=\"fixed\" and width=\"auto\", "
+ "but auto-layout not supported "
+ "=> assuming width=\"100%\"");
}
- contentIPD = referenceIPD - getIPIndents();
- }
- if (referenceIPD > context.getRefIPD()) {
- log.warn("Allocated IPD exceeds available reference IPD");
+ updateContentAreaIPDwithOverconstrainedAdjust();
}
// either works out table of column widths or if proportional-column-width function
}
// sets TABLE_UNITS in case where one or more oldColumns is defined using
// proportional-column-width
- if (sumCols < contentIPD) {
+ if (sumCols < getContentAreaIPD()) {
if (tableUnits == 0.0) {
- this.tableUnits = (contentIPD - sumCols) / factors;
+ this.tableUnits = (getContentAreaIPD() - sumCols) / factors;
}
}
LayoutContext lc = new LayoutContext(0);
- lc.setRefIPD(contentIPD);
+ lc.setRefIPD(getContentAreaIPD());
contentLM.setStartXOffset(startXOffset);
contentLM.addAreas(parentIter, lc);
tableHeight += contentLM.getUsedBPD();
this);
TraitSetter.addMargins(curBlockArea,
getTable().getCommonBorderPaddingBackground(),
- getTable().getCommonMarginBlock(),
+ startIndent, endIndent,
this);
TraitSetter.addBreaks(curBlockArea,
getTable().getBreakBefore(), getTable().getBreakAfter());
TraitSetter.setProducerID(curBlockArea, getTable().getId());
- curBlockArea.setIPD(contentIPD);
+ curBlockArea.setIPD(getContentAreaIPD());
setCurrentArea(curBlockArea);
}
}
}
- /**
- * Returns the IPD of the content area
- * @return the IPD of the content area
- */
- public int getContentAreaIPD() {
- return referenceIPD;
- }
-
/**
* Returns the BPD of the content area
* @return the BPD of the content area
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright 2005 The Apache Software Foundation
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!-- $Id$ -->
+<testcase>
+ <info>
+ <p>
+ This test checks 5.3.4 "Overconstrained Geometry".
+ </p>
+ </info>
+ <fo>
+ <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
+ <fo:layout-master-set>
+ <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in">
+ <fo:region-body/>
+ </fo:simple-page-master>
+ </fo:layout-master-set>
+ <fo:page-sequence master-reference="normal">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block-container start-indent="20pt" end-indent="20pt" background-color="yellow" id="bc1">
+ <fo:block start-indent="0pt" end-indent="0pt" text-align-last="justify">5.3.4 Overconstrained Geometry</fo:block>
+ </fo:block-container>
+ <fo:block-container width="100%" start-indent="20pt" end-indent="20pt" background-color="yellow" id="bc2">
+ <fo:block start-indent="0pt" end-indent="0pt" text-align-last="justify">5.3.4 Overconstrained Geometry</fo:block>
+ </fo:block-container>
+
+ <fo:block-container space-before="10pt" inline-progression-dimension="3in" block-progression-dimension="5pt" background-color="orange">
+ <fo:block/>
+ </fo:block-container>
+ <fo:block-container start-indent="5in - 2.5in" inline-progression-dimension="2.5in" block-progression-dimension="5pt" background-color="orange">
+ <fo:block/>
+ </fo:block-container>
+ <fo:block-container start-indent="3in" end-indent="2.5in" background-color="yellow" id="bc3">
+ <fo:block start-indent="0pt" end-indent="0pt">5.3.4 Overconstrained Geometry</fo:block>
+ </fo:block-container>
+ </fo:flow>
+ </fo:page-sequence>
+ </fo:root>
+ </fo>
+ <checks>
+ <!-- block-container 1 -->
+ <eval expected="320000" xpath="//block[@prod-id = 'bc1']/@ipd"/>
+ <eval expected="320000" xpath="//block[@prod-id = 'bc1']/@ipda"/>
+ <eval expected="20000" xpath="//block[@prod-id = 'bc1']/@start-indent"/>
+ <eval expected="20000" xpath="//block[@prod-id = 'bc1']/@end-indent"/>
+
+ <!-- block-container 2, end-indent is adjusted due to overconstrained relaxing -->
+ <eval expected="360000" xpath="//block[@prod-id = 'bc2']/@ipd"/>
+ <eval expected="360000" xpath="//block[@prod-id = 'bc2']/@ipda"/>
+ <eval expected="20000" xpath="//block[@prod-id = 'bc2']/@start-indent"/>
+ <eval expected="-20000" xpath="//block[@prod-id = 'bc2']/@end-indent"/>
+
+ <!-- block-container 3, end-indent is adjusted due to overconstrained relaxing -->
+ <eval expected="0" xpath="//block[@prod-id = 'bc3']/@ipd"/>
+ <eval expected="216000" xpath="//block[@prod-id = 'bc3']/@start-indent"/>
+ <eval expected="144000" xpath="//block[@prod-id = 'bc3']/@end-indent"/>
+ </checks>
+</testcase>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright 2005 The Apache Software Foundation
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!-- $Id$ -->
+<testcase>
+ <info>
+ <p>
+ This test checks 5.3.4 "Overconstrained Geometry".
+ </p>
+ </info>
+ <fo>
+ <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
+ <fo:layout-master-set>
+ <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in">
+ <fo:region-body/>
+ </fo:simple-page-master>
+ </fo:layout-master-set>
+ <fo:page-sequence master-reference="normal">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block-container inline-progression-dimension="3in" block-progression-dimension="5pt" background-color="orange">
+ <fo:block/>
+ </fo:block-container>
+ <fo:block-container start-indent="5in - 2.5in" inline-progression-dimension="2.5in" block-progression-dimension="5pt" background-color="orange">
+ <fo:block/>
+ </fo:block-container>
+ <fo:block start-indent="3in" end-indent="2.5in" background-color="yellow" id="mainblock">5.3.4 Overconstrained Geometry</fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+ </fo:root>
+ </fo>
+ <checks>
+ <!-- end-indent is expected to be modified from 180000 to 144000 due to 5.3.4, XSL 1.0 -->
+ <eval expected="0" xpath="//block[@prod-id = 'mainblock']/@ipd"/>
+ <eval expected="216000" xpath="//block[@prod-id = 'mainblock']/@start-indent"/>
+ <eval expected="144000" xpath="//block[@prod-id = 'mainblock']/@end-indent"/>
+ </checks>
+</testcase>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright 2005 The Apache Software Foundation
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!-- $Id$ -->
+<testcase>
+ <info>
+ <p>
+ This test checks 5.3.4 "Overconstrained Geometry".
+ </p>
+ </info>
+ <fo>
+ <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
+ <fo:layout-master-set>
+ <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in" margin-left="0.5in" margin-right="0.5in">
+ <fo:region-body background-color="lightgray"/>
+ </fo:simple-page-master>
+ </fo:layout-master-set>
+ <fo:page-sequence master-reference="normal">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:table table-layout="fixed" start-indent="20pt" end-indent="20pt" border-collapse="separate" id="table1">
+ <fo:table-column/>
+ <fo:table-body start-indent="0pt" end-indent="0pt">
+ <fo:table-row>
+ <fo:table-cell background-color="yellow">
+ <fo:block>content</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ <fo:table table-layout="fixed" width="100%" start-indent="20pt" end-indent="20pt" border-collapse="separate" id="table2">
+ <fo:table-column/>
+ <fo:table-body start-indent="0pt" end-indent="0pt">
+ <fo:table-row>
+ <fo:table-cell background-color="yellow">
+ <fo:block>content</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ <fo:block-container space-before="10pt" inline-progression-dimension="3in" block-progression-dimension="5pt" background-color="orange">
+ <fo:block/>
+ </fo:block-container>
+ <fo:block-container start-indent="4in - 1.5in" inline-progression-dimension="1.5in" block-progression-dimension="5pt" background-color="orange">
+ <fo:block/>
+ </fo:block-container>
+ <fo:table table-layout="fixed" start-indent="3in" end-indent="1.5in" border-collapse="separate" id="table3">
+ <fo:table-column/>
+ <fo:table-body start-indent="0pt" end-indent="0pt">
+ <fo:table-row>
+ <fo:table-cell background-color="yellow">
+ <fo:block>5.3.4 Overconstrained Geometry</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ </fo:flow>
+ </fo:page-sequence>
+ </fo:root>
+ </fo>
+ <checks>
+ <!-- table 1 -->
+ <eval expected="248000" xpath="//block[@prod-id = 'table1']/@ipd"/>
+ <eval expected="248000" xpath="//block[@prod-id = 'table1']/@ipda"/>
+ <eval expected="20000" xpath="//block[@prod-id = 'table1']/@start-indent"/>
+ <eval expected="20000" xpath="//block[@prod-id = 'table1']/@end-indent"/>
+
+ <!-- table 2, end-indent is adjusted due to overconstrained relaxing -->
+ <eval expected="288000" xpath="//block[@prod-id = 'table2']/@ipd"/>
+ <eval expected="288000" xpath="//block[@prod-id = 'table2']/@ipda"/>
+ <eval expected="20000" xpath="//block[@prod-id = 'table2']/@start-indent"/>
+ <eval expected="-20000" xpath="//block[@prod-id = 'table2']/@end-indent"/>
+
+ <!-- table 3, end-indent is adjusted due to overconstrained relaxing -->
+ <eval expected="0" xpath="//block[@prod-id = 'table3']/@ipd"/>
+ <eval expected="216000" xpath="//block[@prod-id = 'table3']/@start-indent"/>
+ <eval expected="72000" xpath="//block[@prod-id = 'table3']/@end-indent"/>
+ </checks>
+</testcase>