// Resolve start/end borders in the row
Iterator guIter = row.iterator();
GridUnit gu = (GridUnit) guIter.next();
+ Iterator colIter = table.getColumns().iterator();
+ TableColumn col = (TableColumn) colIter.next();
+ gu.integrateBorderSegment(CommonBorderPaddingBackground.START, col);
gu.integrateBorderSegment(CommonBorderPaddingBackground.START, container);
while (guIter.hasNext()) {
- GridUnit guEnd = (GridUnit) guIter.next();
+ GridUnit nextGU = (GridUnit) guIter.next();
+ TableColumn nextCol = (TableColumn) colIter.next();
if (gu.isLastGridUnitColSpan()) {
- gu.resolveBorder(guEnd, CommonBorderPaddingBackground.END);
+ gu.integrateBorderSegment(CommonBorderPaddingBackground.END, col);
+ nextGU.integrateBorderSegment(CommonBorderPaddingBackground.START, nextCol);
+ gu.resolveBorder(nextGU, CommonBorderPaddingBackground.END);
}
- gu = guEnd;
+ gu = nextGU;
+ col = nextCol;
}
+ gu.integrateBorderSegment(CommonBorderPaddingBackground.END, col);
gu.integrateBorderSegment(CommonBorderPaddingBackground.END, container);
}
protected void setCollapsedBorders() {
createBorder(CommonBorderPaddingBackground.BEFORE);
createBorder(CommonBorderPaddingBackground.AFTER);
- Table table = getTable();
- if (table.hasExplicitColumns()) {
- TableColumn col = table.getColumn(getColumnNumber() - 1);
- createBorder(CommonBorderPaddingBackground.START, col);
- createBorder(CommonBorderPaddingBackground.END, col);
- } else {
- createBorder(CommonBorderPaddingBackground.START);
- createBorder(CommonBorderPaddingBackground.END);
- }
+ createBorder(CommonBorderPaddingBackground.START);
+ createBorder(CommonBorderPaddingBackground.END);
}
/** {@inheritDoc} */
</fo:table-body>
</fo:table>
+ <!-- table 3 -->
+ <fo:block space-before="10pt" space-after="10pt">Between tables</fo:block>
+ <fo:table table-layout="fixed" width="200pt" border-collapse="collapse">
+ <fo:table-column column-width="proportional-column-width(1)"
+ border="6pt solid blue"/>
+ <fo:table-column column-width="proportional-column-width(1)"
+ border="8pt solid red"/>
+ <fo:table-body>
+ <fo:table-row>
+ <fo:table-cell number-columns-spanned="2" border="1pt solid black">
+ <fo:block>Cell 1.1</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row>
+ <fo:table-cell border="1pt solid black">
+ <fo:block>Cell 2.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="1pt solid black">
+ <fo:block>Cell 2.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+
<fo:block>After the tables</fo:block>
</fo:flow>
</fo:page-sequence>
<eval expected="(solid,#ffff00,1000,collapse-inner)" xpath="//flow/block[4]/block[22]/@border-start"/>
<eval expected="(solid,#000000,10000,collapse-outer)" xpath="//flow/block[4]/block[22]/@border-end"/>
+ <!-- table 3 -->
+ <!-- cell 1.1 -->
+ <eval expected="(solid,#0000ff,6000,collapse-outer)" xpath="//flow/block[6]/block[1]/@border-before"/>
+ <eval expected="(solid,#000000,1000,collapse-inner)" xpath="//flow/block[6]/block[1]/@border-after"/>
+ <eval expected="(solid,#0000ff,6000,collapse-outer)" xpath="//flow/block[6]/block[1]/@border-start"/>
+ <eval expected="" xpath="//flow/block[6]/block[1]/@border-end"/>
+ <eval expected="(solid,#ff0000,8000,collapse-outer)" xpath="//flow/block[6]/block[2]/@border-before"/>
+ <eval expected="(solid,#000000,1000,collapse-inner)" xpath="//flow/block[6]/block[2]/@border-after"/>
+ <eval expected="" xpath="//flow/block[6]/block[2]/@border-start"/>
+ <eval expected="(solid,#ff0000,8000,collapse-outer)" xpath="//flow/block[6]/block[2]/@border-end"/>
+ <!-- cell 2.1 -->
+ <eval expected="(solid,#000000,1000,collapse-inner)" xpath="//flow/block[6]/block[4]/@border-before"/>
+ <eval expected="(solid,#0000ff,6000,collapse-outer)" xpath="//flow/block[6]/block[4]/@border-after"/>
+ <eval expected="(solid,#0000ff,6000,collapse-outer)" xpath="//flow/block[6]/block[4]/@border-start"/>
+ <eval expected="(solid,#ff0000,8000,collapse-inner)" xpath="//flow/block[6]/block[4]/@border-end"/>
+ <!-- cell 2.2 -->
+ <eval expected="(solid,#000000,1000,collapse-inner)" xpath="//flow/block[6]/block[5]/@border-before"/>
+ <eval expected="(solid,#ff0000,8000,collapse-outer)" xpath="//flow/block[6]/block[5]/@border-after"/>
+ <eval expected="(solid,#ff0000,8000,collapse-inner)" xpath="//flow/block[6]/block[5]/@border-start"/>
+ <eval expected="(solid,#ff0000,8000,collapse-outer)" xpath="//flow/block[6]/block[5]/@border-end"/>
+
</checks>
</testcase>