}
}
+ /**
+ * Add background to an area. This method is mainly used by table-related layout
+ * managers to add background for column, body or row. Since the area corresponding to
+ * border-separation must be filled with the table's background, for every cell an
+ * additional area with the same dimensions is created to hold the background for the
+ * corresponding column/body/row. An additional shift must then be added to
+ * background-position-horizontal/vertical to ensure the background images are
+ * correctly placed. Indeed the placement of images must be made WRT the
+ * column/body/row and not the cell.
+ *
+ * <p>Note: The area's IPD and BPD must be set before calling this method.</p>
+ *
+ * <p>TODO the regular
+ * {@link #addBackground(Area, CommonBorderPaddingBackground, PercentBaseContext)}
+ * method should be used instead, and a means to retrieve the original area's
+ * dimensions must be found.</p>
+ *
+ * <p>TODO the placement of images in the x- or y-direction will be incorrect if
+ * background-repeat is set for that direction.</p>
+ *
+ * @param area the area to set the traits on
+ * @param backProps the background properties
+ * @param context Property evaluation context
+ * @param ipdShift horizontal shift to affect to the background, in addition to the
+ * value of the background-position-horizontal property
+ * @param bpdShift vertical shift to affect to the background, in addition to the
+ * value of the background-position-vertical property
+ * @param referenceIPD value to use as a reference for percentage calculation
+ * @param referenceBPD value to use as a reference for percentage calculation
+ */
+ public static void addBackground(Area area,
+ CommonBorderPaddingBackground backProps,
+ PercentBaseContext context,
+ int ipdShift, int bpdShift, int referenceIPD, int referenceBPD) {
+ if (!backProps.hasBackground()) {
+ return;
+ }
+ Trait.Background back = new Trait.Background();
+ back.setColor(backProps.backgroundColor);
+
+ if (backProps.getImageInfo() != null) {
+ back.setURL(backProps.backgroundImage);
+ back.setImageInfo(backProps.getImageInfo());
+ back.setRepeat(backProps.backgroundRepeat);
+ if (backProps.backgroundPositionHorizontal != null) {
+ if (back.getRepeat() == Constants.EN_NOREPEAT
+ || back.getRepeat() == Constants.EN_REPEATY) {
+ if (area.getIPD() > 0) {
+ PercentBaseContext refContext = new SimplePercentBaseContext(context,
+ LengthBase.IMAGE_BACKGROUND_POSITION_HORIZONTAL,
+ (referenceIPD - back.getImageInfo().getSize().getWidthMpt()));
+
+ back.setHoriz(ipdShift
+ + backProps.backgroundPositionHorizontal.getValue(refContext));
+ } else {
+ // TODO Area IPD has to be set for this to work
+ log.warn("Horizontal background image positioning ignored"
+ + " because the IPD was not set on the area."
+ + " (Yes, it's a bug in FOP)");
+ }
+ }
+ }
+ if (backProps.backgroundPositionVertical != null) {
+ if (back.getRepeat() == Constants.EN_NOREPEAT
+ || back.getRepeat() == Constants.EN_REPEATX) {
+ if (area.getBPD() > 0) {
+ PercentBaseContext refContext = new SimplePercentBaseContext(context,
+ LengthBase.IMAGE_BACKGROUND_POSITION_VERTICAL,
+ (referenceBPD - back.getImageInfo().getSize().getHeightMpt()));
+ back.setVertical(bpdShift
+ + backProps.backgroundPositionVertical.getValue(refContext));
+ } else {
+ // TODO Area BPD has to be set for this to work
+ log.warn("Vertical background image positioning ignored"
+ + " because the BPD was not set on the area."
+ + " (Yes, it's a bug in FOP)");
+ }
+ }
+ }
+ }
+
+ area.addTrait(Trait.BACKGROUND, back);
+ }
+
/**
* Add background to an area.
* Layout managers that create areas with a background can use this to
back.setHoriz(backProps.backgroundPositionHorizontal.getValue(
new SimplePercentBaseContext(context,
LengthBase.IMAGE_BACKGROUND_POSITION_HORIZONTAL,
- (width - back.getImageInfo().getSize().getHeightMpt())
+ (width - back.getImageInfo().getSize().getWidthMpt())
)
));
} else {
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.apache.fop.area.Block;
import org.apache.fop.fo.flow.table.ConditionalBorder;
import org.apache.fop.fo.flow.table.EffRow;
import org.apache.fop.fo.flow.table.GridUnit;
import org.apache.fop.fo.flow.table.PrimaryGridUnit;
-import org.apache.fop.fo.flow.table.TableRow;
+import org.apache.fop.fo.flow.table.TableBody;
+import org.apache.fop.fo.properties.CommonBorderPaddingBackground;
import org.apache.fop.layoutmgr.ElementListUtils;
import org.apache.fop.layoutmgr.KnuthElement;
import org.apache.fop.layoutmgr.KnuthPossPosIter;
import org.apache.fop.layoutmgr.LayoutContext;
import org.apache.fop.layoutmgr.SpaceResolver;
+import org.apache.fop.layoutmgr.TraitSetter;
import org.apache.fop.traits.BorderProps;
class RowPainter {
private static Log log = LogFactory.getLog(RowPainter.class);
- /** The fo:table-row containing the currently handled grid rows. */
- private TableRow rowFO = null;
private int colCount;
private int currentRowOffset = 0;
/** Currently handled row (= last encountered row). */
private CellPart[] firstCellParts;
private CellPart[] lastCellParts;
+ /** y-offset of the current table part. */
+ private int tablePartOffset = 0;
+ /** See {@link RowPainter#registerPartBackgroundArea(Block)}. */
+ private CommonBorderPaddingBackground tablePartBackground;
+ /** See {@link RowPainter#registerPartBackgroundArea(Block)}. */
+ private List tablePartBackgroundAreas;
+
private TableContentLayoutManager tclm;
RowPainter(TableContentLayoutManager tclm, LayoutContext layoutContext) {
this.firstRowOnPageIndex = -1;
}
+ void startTablePart(TableBody tablePart) {
+ CommonBorderPaddingBackground background = tablePart.getCommonBorderPaddingBackground();
+ if (background.hasBackground()) {
+ tablePartBackground = background;
+ if (tablePartBackgroundAreas == null) {
+ tablePartBackgroundAreas = new ArrayList();
+ }
+ }
+ tablePartOffset = currentRowOffset;
+ }
+
+ /**
+ * Signals that the end of the current table part is reached.
+ *
+ * @param lastInBody true if the part is the last table-body element to be displayed
+ * on the current page. In which case all the cells must be flushed even if they
+ * aren't finished, plus the proper collapsed borders must be selected (trailing
+ * instead of normal, or rest if the cell is unfinished)
+ * @param lastOnPage true if the part is the last to be displayed on the current page.
+ * In which case collapsed after borders for the cells on the last row must be drawn
+ * in the outer mode
+ */
+ void endTablePart(boolean lastInBody, boolean lastOnPage) {
+ addAreasAndFlushRow(lastInBody, lastOnPage);
+
+ if (tablePartBackground != null) {
+ TableLayoutManager tableLM = tclm.getTableLM();
+ for (Iterator iter = tablePartBackgroundAreas.iterator(); iter.hasNext();) {
+ Block backgroundArea = (Block) iter.next();
+ TraitSetter.addBackground(backgroundArea, tablePartBackground, tableLM,
+ -backgroundArea.getXOffset(), tablePartOffset - backgroundArea.getYOffset(),
+ tableLM.getContentAreaIPD(), currentRowOffset - tablePartOffset);
+ }
+ tablePartBackground = null;
+ tablePartBackgroundAreas.clear();
+ }
+ }
+
int getAccumulatedBPD() {
return currentRowOffset;
}
currentRow = row;
}
}
- rowFO = currentRow.getTableRow();
if (firstRowIndex < 0) {
firstRowIndex = currentRow.getIndex();
if (firstRowOnPageIndex < 0) {
* displayed on the current page. In which case collapsed after borders must be drawn
* in the outer mode
*/
- void addAreasAndFlushRow(boolean lastInPart, boolean lastOnPage) {
+ private void addAreasAndFlushRow(boolean lastInPart, boolean lastOnPage) {
if (log.isDebugEnabled()) {
log.debug("Remembering yoffset for row " + currentRow.getIndex() + ": "
+ currentRowOffset);
}
// Then add areas for cells finishing on the current row
- tclm.addRowBackgroundArea(rowFO, actualRowHeight, layoutContext.getRefIPD(),
- currentRowOffset);
for (int i = 0; i < colCount; i++) {
GridUnit currentGU = currentRow.getGridUnit(i);
if (!currentGU.isEmpty() && currentGU.getColSpanIndex() == 0
* Determine the index of the first row of this cell that will be displayed on the
* current page.
*/
- int startRowIndex = Math.max(pgu.getRowIndex(), firstRowIndex);
int currentRowIndex = currentRow.getIndex();
+ int startRowIndex;
+ int firstRowHeight;
+ if (pgu.getRowIndex() >= firstRowIndex) {
+ startRowIndex = pgu.getRowIndex();
+ if (startRowIndex < currentRowIndex) {
+ firstRowHeight = getRowOffset(startRowIndex + 1) - getRowOffset(startRowIndex);
+ } else {
+ firstRowHeight = rowHeight;
+ }
+ } else {
+ startRowIndex = firstRowIndex;
+ firstRowHeight = 0;
+ }
/*
* In collapsing-border model, if the cell spans over several columns/rows then
cellLM.addAreas(new KnuthPossPosIter(pgu.getElements(), startPos, endPos + 1),
layoutContext, spannedGridRowHeights, startRowIndex - pgu.getRowIndex(),
currentRowIndex - pgu.getRowIndex(), borderBeforeWhich, borderAfterWhich,
- startRowIndex == firstRowOnPageIndex, lastOnPage);
+ startRowIndex == firstRowOnPageIndex, lastOnPage, this, firstRowHeight);
+ }
+
+
+ /**
+ * Registers the given area, that will be used to render the part of
+ * table-header/footer/body background covered by a table-cell. If percentages are
+ * used to place the background image, the final bpd of the (fraction of) table part
+ * that will be rendered on the current page must be known. The traits can't then be
+ * set when the areas for the cell are created since at that moment this bpd is yet
+ * unknown. So they will instead be set in
+ * {@link #addAreasAndFlushRow(boolean, boolean)}.
+ *
+ * @param backgroundArea the block of the cell's dimensions that will hold the part
+ * background
+ */
+ void registerPartBackgroundArea(Block backgroundArea) {
+ tclm.getTableLM().addBackgroundArea(backgroundArea);
+ tablePartBackgroundAreas.add(backgroundArea);
}
/**
}
// TODO get rid of that
+ /** Signals that the first table-body instance has started. */
void startBody() {
Arrays.fill(firstCellOnPage, true);
}
// TODO get rid of that
+ /** Signals that the last table-body instance has ended. */
void endBody() {
Arrays.fill(firstCellOnPage, false);
}
import org.apache.fop.area.Block;
import org.apache.fop.area.Trait;
import org.apache.fop.datatypes.PercentBaseContext;
-import org.apache.fop.fo.FONode;
import org.apache.fop.fo.flow.table.ConditionalBorder;
import org.apache.fop.fo.flow.table.GridUnit;
import org.apache.fop.fo.flow.table.PrimaryGridUnit;
import org.apache.fop.fo.flow.table.Table;
+import org.apache.fop.fo.flow.table.TableBody;
import org.apache.fop.fo.flow.table.TableCell;
+import org.apache.fop.fo.flow.table.TableColumn;
+import org.apache.fop.fo.flow.table.TableRow;
import org.apache.fop.fo.properties.CommonBorderPaddingBackground;
import org.apache.fop.fo.properties.CommonBorderPaddingBackground.BorderInfo;
import org.apache.fop.layoutmgr.AreaAdditionUtil;
private int xoffset;
private int yoffset;
private int cellIPD;
- private int rowHeight;
+ private int totalHeight;
private int usedBPD;
private int borderAndPaddingBPD;
private boolean emptyCell = true;
* @return the table owning this cell
*/
public Table getTable() {
- FONode node = fobj.getParent();
- while (!(node instanceof Table)) {
- node = node.getParent();
- }
- return (Table)node;
+ return getTableCell().getTable();
}
* @param h the height of cell
*/
public void setTotalHeight(int h) {
- rowHeight = h;
+ totalHeight = h;
}
/**
* which case collapsed before borders must be drawn in the outer mode
* @param lastOnPage true if the cell will be the very last one on the page, in which
* case collapsed after borders must be drawn in the outer mode
+ * @param painter painter
+ * @param firstRowHeight height of the first row spanned by this cell (may be zero if
+ * this row is placed on a previous page). Used to calculate the placement of the
+ * row's background image if any
*/
public void addAreas(PositionIterator parentIter,
LayoutContext layoutContext,
int borderBeforeWhich,
int borderAfterWhich,
boolean firstOnPage,
- boolean lastOnPage) {
+ boolean lastOnPage,
+ RowPainter painter,
+ int firstRowHeight) {
getParentArea(null);
getPSLM().addIDToPage(getTableCell().getId());
int borderBeforeWidth = primaryGridUnit.getBeforeBorderWidth(startRow, borderBeforeWhich);
int borderAfterWidth = primaryGridUnit.getAfterBorderWidth(endRow, borderAfterWhich);
+
+ CommonBorderPaddingBackground padding = primaryGridUnit.getCell()
+ .getCommonBorderPaddingBackground();
+ int cellBPD = totalHeight - borderBeforeWidth - borderAfterWidth;
+ cellBPD -= padding.getPaddingBefore(borderBeforeWhich == ConditionalBorder.REST, this);
+ cellBPD -= padding.getPaddingAfter(borderAfterWhich == ConditionalBorder.REST, this);
+
+ addBackgroundAreas(painter, firstRowHeight, borderBeforeWidth, cellBPD);
+
if (isSeparateBorderModel()) {
if (!emptyCell || getTableCell().showEmptyCells()) {
if (borderBeforeWidth > 0) {
}
}
- CommonBorderPaddingBackground padding = primaryGridUnit.getCell()
- .getCommonBorderPaddingBackground();
TraitSetter.addPadding(curBlockArea,
padding,
borderBeforeWhich == ConditionalBorder.REST,
borderAfterWhich == ConditionalBorder.REST,
false, false, this);
- int cellBPD = rowHeight - borderBeforeWidth - borderAfterWidth;
- cellBPD -= padding.getPaddingBefore(borderBeforeWhich == ConditionalBorder.REST, this);
- cellBPD -= padding.getPaddingAfter(borderAfterWhich == ConditionalBorder.REST, this);
-
//Handle display-align
if (usedBPD < cellBPD) {
if (getTableCell().getDisplayAlign() == EN_CENTER) {
curBlockArea.setBPD(cellBPD);
// Add background after we know the BPD
- if (isSeparateBorderModel()) {
- if (!emptyCell || getTableCell().showEmptyCells()) {
- TraitSetter.addBackground(curBlockArea,
- getTableCell().getCommonBorderPaddingBackground(),
- this);
- }
- } else {
+ if (!isSeparateBorderModel() || !emptyCell || getTableCell().showEmptyCells()) {
TraitSetter.addBackground(curBlockArea,
- getTableCell().getCommonBorderPaddingBackground(),
- this);
+ getTableCell().getCommonBorderPaddingBackground(), this);
}
flush();
curBlockArea = null;
}
+ /** Adds background areas for the column, body and row, if any. */
+ private void addBackgroundAreas(RowPainter painter, int firstRowHeight, int borderBeforeWidth,
+ int cellBPD) {
+ TableColumn column = getTable().getColumn(primaryGridUnit.getColIndex());
+ if (column.getCommonBorderPaddingBackground().hasBackground()) {
+ Block colBackgroundArea = getBackgroundArea(cellBPD, borderBeforeWidth);
+ ((TableLayoutManager) parentLM).registerColumnBackgroundArea(column, colBackgroundArea,
+ -startIndent);
+ }
+
+ TableBody body = primaryGridUnit.getTableBody();
+ if (body.getCommonBorderPaddingBackground().hasBackground()) {
+ painter.registerPartBackgroundArea(getBackgroundArea(cellBPD, borderBeforeWidth));
+ }
+
+ TableRow row = primaryGridUnit.getRow();
+ if (row != null && row.getCommonBorderPaddingBackground().hasBackground()) {
+ Block rowBackgroundArea = getBackgroundArea(cellBPD, borderBeforeWidth);
+ ((TableLayoutManager) parentLM).addBackgroundArea(rowBackgroundArea);
+ TraitSetter.addBackground(rowBackgroundArea, row.getCommonBorderPaddingBackground(),
+ (TableLayoutManager) parentLM,
+ -xoffset - startIndent, -borderBeforeWidth,
+ parentLM.getContentAreaIPD(), firstRowHeight);
+ }
+ }
+
private void addBorder(Block[][] blocks, int i, int j, Integer side, BorderInfo border,
boolean outer) {
if (blocks[i][j] == null) {
block.setBPD(block.getBPD() + amount);
}
+ private Block getBackgroundArea(int bpd, int borderBeforeWidth) {
+ Block block = new Block();
+ TraitSetter.setProducerID(block, getTable().getId());
+ block.setPositioning(Block.ABSOLUTE);
+ block.setIPD(cellIPD);
+ block.setBPD(bpd);
+ block.setXOffset(xoffset + startIndent);
+ block.setYOffset(yoffset + borderBeforeWidth);
+ return block;
+ }
+
/**
* Return an Area which can contain the passed childArea. The childArea
* may not yet have any content, but it has essential traits set.
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.fop.area.Block;
-import org.apache.fop.area.Trait;
import org.apache.fop.datatypes.PercentBaseContext;
import org.apache.fop.fo.Constants;
import org.apache.fop.fo.FObj;
import org.apache.fop.fo.flow.table.PrimaryGridUnit;
import org.apache.fop.fo.flow.table.Table;
import org.apache.fop.fo.flow.table.TableBody;
-import org.apache.fop.fo.flow.table.TableRow;
import org.apache.fop.layoutmgr.BreakElement;
import org.apache.fop.layoutmgr.ElementListUtils;
import org.apache.fop.layoutmgr.KnuthBox;
import org.apache.fop.layoutmgr.ListElement;
import org.apache.fop.layoutmgr.Position;
import org.apache.fop.layoutmgr.PositionIterator;
-import org.apache.fop.layoutmgr.TraitSetter;
import org.apache.fop.layoutmgr.SpaceResolver.SpaceHandlingBreakPosition;
import org.apache.fop.util.BreakUtil;
this.usedBPD = 0;
RowPainter painter = new RowPainter(this, layoutContext);
- List positions = new java.util.ArrayList();
+ List tablePositions = new ArrayList();
List headerElements = null;
List footerElements = null;
Position firstPos = null;
//ignore for now, see special handling below if break is at a penalty
//Only if the last position in this part/page us such a position it will be used
} else if (pos instanceof TableContentPosition) {
- positions.add(pos);
+ tablePositions.add(pos);
} else {
if (log.isDebugEnabled()) {
log.debug("Ignoring position: " + pos);
if (headerElements != null) {
//header positions for the last part are the second-to-last element and need to
//be handled first before all other TableContentPositions
- PositionIterator nestedIter = new KnuthPossPosIter(headerElements);
- iterateAndPaintPositions(nestedIter, painter, false);
+ addHeaderFooterAreas(headerElements, tableLM.getTable().getTableHeader(), painter,
+ false);
}
- //Iterate over all steps
- Iterator posIter = positions.iterator();
- painter.startBody();
- // Here we are sure that posIter iterates only over TableContentPosition instances
- iterateAndPaintPositions(posIter, painter, footerElements == null);
- painter.endBody();
+ if (tablePositions.isEmpty()) {
+ // TODO make sure this actually never happens
+ log.error("tablePositions empty."
+ + " Please send your FO file to fop-users@xmlgraphics.apache.org");
+ } else {
+ // Here we are sure that posIter iterates only over TableContentPosition instances
+ addBodyAreas(tablePositions.iterator(), painter, footerElements == null);
+ }
if (footerElements != null) {
//Positions for footers are simply added at the end
- PositionIterator nestedIter = new KnuthPossPosIter(footerElements);
- iterateAndPaintPositions(nestedIter, painter, true);
+ addHeaderFooterAreas(footerElements, tableLM.getTable().getTableFooter(), painter,
+ true);
}
this.usedBPD += painter.getAccumulatedBPD();
}
}
+ private void addHeaderFooterAreas(List elements, TableBody part, RowPainter painter,
+ boolean lastOnPage) {
+ List lst = new ArrayList(elements.size());
+ for (Iterator iter = new KnuthPossPosIter(elements); iter.hasNext();) {
+ Position pos = (Position) iter.next();
+ /*
+ * Unlike for the body the Positions associated to the glues generated by
+ * TableStepper haven't been removed yet.
+ */
+ if (pos instanceof TableContentPosition) {
+ lst.add((TableContentPosition) pos);
+ }
+ }
+ addTablePartAreas(lst, painter, part, true, true, true, lastOnPage);
+ }
+
/**
- * Iterates over a part of the table (header, footer, body) and paints the related
- * elements.
+ * Iterates over the positions corresponding to the table's body (which may contain
+ * several table-body elements!) and adds the corresponding areas.
*
- * @param iterator iterator over Position elements. Those positions correspond to the
- * elements of the table present on the current page
+ * @param iterator iterator over TableContentPosition elements. Those positions
+ * correspond to the elements of the body present on the current page
* @param painter
- * @param lastOnPage true if the corresponding part will be the last on the page
- * (either body or footer, obviously)
+ * @param lastOnPage true if the table has no footer (then the last line of the table
+ * that will be present on the page belongs to the body)
*/
- private void iterateAndPaintPositions(Iterator iterator, RowPainter painter,
+ private void addBodyAreas(Iterator iterator, RowPainter painter,
boolean lastOnPage) {
+ painter.startBody();
List lst = new ArrayList();
- boolean firstPos = false;
- TableBody body = null;
+ TableContentPosition pos = (TableContentPosition) iterator.next();
+ boolean isFirstPos = pos.getFlag(TableContentPosition.FIRST_IN_ROWGROUP)
+ && pos.getRow().getFlag(EffRow.FIRST_IN_PART);
+ TableBody body = pos.getTableBody();
+ lst.add(pos);
while (iterator.hasNext()) {
- Position pos = (Position)iterator.next();
- if (pos instanceof TableContentPosition) {
- TableContentPosition tcpos = (TableContentPosition)pos;
- lst.add(tcpos);
- CellPart part = (CellPart)tcpos.cellParts.get(0);
- if (body == null) {
- body = part.pgu.getTableBody();
- }
- if (tcpos.getFlag(TableContentPosition.FIRST_IN_ROWGROUP)
- && tcpos.getRow().getFlag(EffRow.FIRST_IN_PART)) {
- firstPos = true;
-
- }
- if (tcpos.getFlag(TableContentPosition.LAST_IN_ROWGROUP)
- && tcpos.getRow().getFlag(EffRow.LAST_IN_PART)) {
- log.trace("LAST_IN_ROWGROUP + LAST_IN_PART");
- handleMarkersAndPositions(lst, body, firstPos, true, painter);
- //reset
- firstPos = false;
- body = null;
- lst.clear();
- }
+ pos = (TableContentPosition) iterator.next();
+ if (pos.getTableBody() != body) {
+ addTablePartAreas(lst, painter, body, isFirstPos, true, false, false);
+ isFirstPos = true;
+ lst.clear();
+ body = pos.getTableBody();
}
+ lst.add(pos);
}
- if (body != null) {
- // Entering this block means that the end of the current table-part hasn't
- // been reached (otherwise it would have been caught by the test above). So
- // lastPos is necessarily false
- handleMarkersAndPositions(lst, body, firstPos, false, painter);
- }
- painter.addAreasAndFlushRow(true, lastOnPage);
- }
-
- private void handleMarkersAndPositions(List positions, TableBody body, boolean firstPos,
- boolean lastPos, RowPainter painter) {
- getTableLM().getCurrentPV().addMarkers(body.getMarkers(),
- true, firstPos, lastPos);
- int size = positions.size();
- for (int i = 0; i < size; i++) {
- painter.handleTableContentPosition((TableContentPosition)positions.get(i));
- }
- getTableLM().getCurrentPV().addMarkers(body.getMarkers(),
- false, firstPos, lastPos);
+ boolean isLastPos = pos.getFlag(TableContentPosition.LAST_IN_ROWGROUP)
+ && pos.getRow().getFlag(EffRow.LAST_IN_PART);
+ addTablePartAreas(lst, painter, body, isFirstPos, isLastPos, true, lastOnPage);
+ painter.endBody();
}
/**
- * Get the area for a row for background.
- * @param row the table-row object or null
- * @return the row area or null if there's no background to paint
+ * Adds the areas corresponding to a single fo:table-header/footer/body element.
*/
- Block getRowArea(TableRow row) {
- if (row == null || !row.getCommonBorderPaddingBackground().hasBackground()) {
- return null;
- } else {
- Block block = new Block();
- block.addTrait(Trait.IS_REFERENCE_AREA, Boolean.TRUE);
- block.setPositioning(Block.ABSOLUTE);
- return block;
+ private void addTablePartAreas(List positions, RowPainter painter, TableBody body,
+ boolean isFirstPos, boolean isLastPos, boolean lastInBody, boolean lastOnPage) {
+ getTableLM().getCurrentPV().addMarkers(body.getMarkers(),
+ true, isFirstPos, isLastPos);
+ painter.startTablePart(body);
+ for (Iterator iter = positions.iterator(); iter.hasNext();) {
+ painter.handleTableContentPosition((TableContentPosition) iter.next());
}
+ getTableLM().getCurrentPV().addMarkers(body.getMarkers(),
+ false, isFirstPos, isLastPos);
+ painter.endTablePart(lastInBody, lastOnPage);
}
- /**
- * Adds the area for the row background if any.
- * @param row row for which to generate the background
- * @param bpd block-progression-dimension of the row
- * @param ipd inline-progression-dimension of the row
- * @param yoffset Y offset at which to paint
- */
- void addRowBackgroundArea(TableRow row, int bpd, int ipd, int yoffset) {
- //Add row background if any
- Block rowBackground = getRowArea(row);
- if (rowBackground != null) {
- rowBackground.setBPD(bpd);
- rowBackground.setIPD(ipd);
- rowBackground.setXOffset(this.startXOffset);
- rowBackground.setYOffset(yoffset);
- getTableLM().addChildArea(rowBackground);
- TraitSetter.addBackground(rowBackground,
- row.getCommonBorderPaddingBackground(), getTableLM());
- }
- }
-
-
/**
* Sets the overall starting x-offset. Used for proper placement of cells.
* @param startXOffset starting x-offset (table's start-indent)
import java.util.List;
import org.apache.fop.fo.flow.table.EffRow;
+import org.apache.fop.fo.flow.table.TableBody;
import org.apache.fop.layoutmgr.LayoutManager;
import org.apache.fop.layoutmgr.Position;
return row;
}
+ TableBody getTableBody() {
+ return ((CellPart) cellParts.get(0)).pgu.getTableBody();
+ }
+
/**
* Returns a flag for this GridUnit.
* @param which the requested flag
package org.apache.fop.layoutmgr.table;
+import java.util.ArrayList;
import java.util.Iterator;
import java.util.LinkedList;
+import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
private int halfBorderSeparationBPD;
private int halfBorderSeparationIPD;
-
+
+ /** See {@link TableLayoutManager#registerColumnBackgroundArea(TableColumn, Block, int)}. */
+ private List columnBackgroundAreas;
+
+ /**
+ * Temporary holder of column background informations for a table-cell's area.
+ *
+ * @see TableLayoutManager#registerColumnBackgroundArea(TableColumn, Block, int)
+ */
+ private static final class ColumnBackgroundInfo {
+ private TableColumn column;
+ private Block backgroundArea;
+ private int xShift;
+
+ private ColumnBackgroundInfo(TableColumn column, Block backgroundArea, int xShift) {
+ this.column = column;
+ this.backgroundArea = backgroundArea;
+ this.xShift = xShift;
+ }
+ }
+
/**
* Create a new table layout manager.
* @param node the table FO
resetSpaces();
return returnList;
}
-
+
+ /**
+ * Registers the given area, that will be used to render the part of column background
+ * covered by a table-cell. If percentages are used to place the background image, the
+ * final bpd of the (fraction of) table that will be rendered on the current page must
+ * be known. The traits can't then be set when the areas for the cell are created
+ * since at that moment this bpd is yet unknown. So they will instead be set in
+ * TableLM's {@link #addAreas(PositionIterator, LayoutContext)} method.
+ *
+ * @param column the table-column element from which the cell gets background
+ * informations
+ * @param backgroundArea the block of the cell's dimensions that will hold the column
+ * background
+ * @param xShift additional amount by which the image must be shifted to be correctly
+ * placed (to counterbalance the cell's start border)
+ */
+ void registerColumnBackgroundArea(TableColumn column, Block backgroundArea, int xShift) {
+ addBackgroundArea(backgroundArea);
+ if (columnBackgroundAreas == null) {
+ columnBackgroundAreas = new ArrayList();
+ }
+ columnBackgroundAreas.add(new ColumnBackgroundInfo(column, backgroundArea, xShift));
+ }
+
/**
* The table area is a reference area that contains areas for
* columns, bodies, rows and the contents are in cells.
curBlockArea.setBPD(tableHeight);
+ if (columnBackgroundAreas != null) {
+ for (Iterator iter = columnBackgroundAreas.iterator(); iter.hasNext();) {
+ ColumnBackgroundInfo b = (ColumnBackgroundInfo) iter.next();
+ TraitSetter.addBackground(b.backgroundArea,
+ b.column.getCommonBorderPaddingBackground(), this,
+ b.xShift, -b.backgroundArea.getYOffset(),
+ b.column.getColumnWidth().getValue(this), tableHeight);
+ }
+ columnBackgroundAreas.clear();
+ }
+
if (getTable().isSeparateBorderModel()) {
TraitSetter.addBorders(curBlockArea,
getTable().getCommonBorderPaddingBackground(),
}
}
+ /**
+ * Adds the given area to this layout manager's area, without updating the used bpd.
+ *
+ * @param background an area
+ */
+ void addBackgroundArea(Block background) {
+ curBlockArea.addChildArea(background);
+ }
+
/** {@inheritDoc} */
public int negotiateBPDAdjustment(int adj, KnuthElement lastElement) {
// TODO Auto-generated method stub
</p>
</section>
</notes>
+ <action context="Layout" dev="VH" type="add" importance="high">
+ Added support for background on fo:table-column and fo:table-header/footer/body elements.
+ </action>
+ <action context="Layout" dev="VH" type="fix">
+ Fixed the rendering of the area of a table corresponding to border-separation, which must
+ be filled with the background of the table, and not the rows.
+ </action>
+ <action context="Layout" dev="VH" type="fix">
+ Improved conformance: even if a table-cell spans several rows its background must
+ correspond to the first row spanned.
+ </action>
<action context="Renderers" dev="JM" type="fix" due-to="Gordon Cooke">
Slight improvement for thin lines in Java2D/AWT output.
</action>
<!-- 1. table not broken -->
<eval expected="92200" xpath="//pageViewport[1]//flow/block[2]/@bpd"/>
+ <!-- Cell 1.2 -->
<!-- Block for yellow background -->
<eval expected="48600" xpath="//pageViewport[1]//flow/block[2]/block[1]/@bpd"/>
- <!-- Cell 1.2 -->
<eval expected="48600" xpath="//pageViewport[1]//flow/block[2]/block[2]/@bpd"/>
<eval expected="15000" xpath="//pageViewport[1]//flow/block[2]/block[2]/block[1]/@space-after"/>
<eval expected="0" xpath="count(//pageViewport[1]//flow/block[2]/block[2]/block[2]/@space-before)"/>
- <!-- Block for grey background -->
- <eval expected="43600" xpath="//pageViewport[1]//flow/block[2]/block[3]/@bpd"/>
<!-- Cell 1.1 -->
+ <!-- Block for yellow background -->
+ <eval expected="92200" xpath="//pageViewport[1]//flow/block[2]/block[3]/@bpd"/>
<eval expected="20000" xpath="//pageViewport[1]//flow/block[2]/block[4]/block[1]/@space-after"/>
<eval expected="0" xpath="count(//pageViewport[1]//flow/block[2]/block[4]/block[2]/@space-before)"/>
<!-- Cell 2.2 -->
+ <!-- Block for grey background -->
<eval expected="43600" xpath="//pageViewport[1]//flow/block[2]/block[5]/@bpd"/>
- <eval expected="0" xpath="count(//pageViewport[1]//flow/block[2]/block[5]/block[1]/@space-after)"/>
- <eval expected="10000" xpath="//pageViewport[1]//flow/block[2]/block[5]/block[2]/@space-before"/>
+ <eval expected="43600" xpath="//pageViewport[1]//flow/block[2]/block[6]/@bpd"/>
+ <eval expected="0" xpath="count(//pageViewport[1]//flow/block[2]/block[6]/block[1]/@space-after)"/>
+ <eval expected="10000" xpath="//pageViewport[1]//flow/block[2]/block[6]/block[2]/@space-before"/>
<!-- 2. Cells 1.1 and 1.2 split -->
<!-- First page -->
<eval expected="31800" xpath="//pageViewport[2]//flow/block[2]/@bpd"/>
+ <!-- Cell 1.1 Line 1 -->
<!-- Block for yellow background -->
<eval expected="31800" xpath="//pageViewport[2]//flow/block[2]/block[1]/@bpd"/>
- <!-- Cell 1.1 Line 1 -->
<eval expected="0" xpath="count(//pageViewport[2]//flow/block[2]/block[2]/block[1]/@space-after)"/>
<!-- Cell 1.2 Line 1 -->
- <eval expected="15000" xpath="//pageViewport[2]//flow/block[2]/block[3]/block[1]/@space-after"/>
+ <!-- Block for yellow background -->
+ <eval expected="31800" xpath="//pageViewport[2]//flow/block[2]/block[3]/@bpd"/>
+ <eval expected="15000" xpath="//pageViewport[2]//flow/block[2]/block[4]/block[1]/@space-after"/>
<!-- Second page -->
<eval expected="60400" xpath="//pageViewport[3]//flow/block[1]/@bpd"/>
+ <!-- Cell 1.2 Line 2 -->
<!-- Block for yellow background -->
<eval expected="16800" xpath="//pageViewport[3]//flow/block[1]/block[1]/@bpd"/>
- <!-- Cell 1.2 Line 2 -->
<eval expected="16800" xpath="//pageViewport[3]//flow/block[1]/block[2]/@bpd"/>
<eval expected="0" xpath="count(//pageViewport[3]//flow/block[1]/block[2]/@space-before)"/>
- <!-- Block for grey background -->
- <eval expected="43600" xpath="//pageViewport[3]//flow/block[1]/block[3]/@bpd"/>
<!-- Cell 1.1 Line 2 -->
+ <!-- Block for yellow background -->
+ <eval expected="60400" xpath="//pageViewport[3]//flow/block[1]/block[3]/@bpd"/>
<eval expected="16800" xpath="//pageViewport[3]//flow/block[1]/block[4]/block[1]/@bpd"/>
<eval expected="10000" xpath="//pageViewport[3]//flow/block[1]/block[4]/block[1]/@space-before"/>
<!-- Cell 2.2 -->
+ <!-- Block for grey background -->
<eval expected="43600" xpath="//pageViewport[3]//flow/block[1]/block[5]/@bpd"/>
- <eval expected="0" xpath="count(//pageViewport[3]//flow/block[1]/block[5]/block[1]/@space-after)"/>
- <eval expected="10000" xpath="//pageViewport[3]//flow/block[1]/block[5]/block[2]/@space-before"/>
+ <eval expected="43600" xpath="//pageViewport[3]//flow/block[1]/block[6]/@bpd"/>
+ <eval expected="0" xpath="count(//pageViewport[3]//flow/block[1]/block[6]/block[1]/@space-after)"/>
+ <eval expected="10000" xpath="//pageViewport[3]//flow/block[1]/block[6]/block[2]/@space-before"/>
<!-- 3. Cell 1.1 split, cell 1.2 not -->
<!-- First page -->
<eval expected="48600" xpath="//pageViewport[4]//flow/block[2]/@bpd"/>
+ <!-- Cell 1.1 Line 1 -->
<!-- Block for yellow background -->
<eval expected="48600" xpath="//pageViewport[4]//flow/block[2]/block[1]/@bpd"/>
- <!-- Cell 1.1 Line 1 -->
<eval expected="0" xpath="count(//pageViewport[4]//flow/block[2]/block[2]/block[1]/@space-after)"/>
<!-- Cell 1.2 Line 1 -->
- <eval expected="15000" xpath="//pageViewport[4]//flow/block[2]/block[3]/block[1]/@space-after"/>
- <eval expected="0" xpath="count(//pageViewport[4]//flow/block[2]/block[3]/block[2]/@space-before)"/>
+ <!-- Block for yellow background -->
+ <eval expected="48600" xpath="//pageViewport[4]//flow/block[2]/block[3]/@bpd"/>
+ <eval expected="15000" xpath="//pageViewport[4]//flow/block[2]/block[4]/block[1]/@space-after"/>
+ <eval expected="0" xpath="count(//pageViewport[4]//flow/block[2]/block[4]/block[2]/@space-before)"/>
<!-- Second page -->
<eval expected="43600" xpath="//pageViewport[5]//flow/block[1]/@bpd"/>
- <!-- Block for grey background -->
- <eval expected="43600" xpath="//pageViewport[5]//flow/block[1]/block[1]/@bpd"/>
<!-- Cell 1.1 Line 2 -->
+ <!-- Block for yellow background -->
+ <eval expected="43600" xpath="//pageViewport[5]//flow/block[1]/block[1]/@bpd"/>
<eval expected="16800" xpath="//pageViewport[5]//flow/block[1]/block[2]/block[1]/@bpd"/>
<eval expected="10000" xpath="//pageViewport[5]//flow/block[1]/block[2]/block[1]/@space-before"/>
<!-- Cell 2.2 -->
+ <!-- Block for grey background -->
<eval expected="43600" xpath="//pageViewport[5]//flow/block[1]/block[3]/@bpd"/>
- <eval expected="0" xpath="count(//pageViewport[5]//flow/block[1]/block[3]/block[1]/@space-after)"/>
- <eval expected="10000" xpath="//pageViewport[5]//flow/block[1]/block[3]/block[2]/@space-before"/>
+ <eval expected="43600" xpath="//pageViewport[5]//flow/block[1]/block[4]/@bpd"/>
+ <eval expected="0" xpath="count(//pageViewport[5]//flow/block[1]/block[4]/block[1]/@space-after)"/>
+ <eval expected="10000" xpath="//pageViewport[5]//flow/block[1]/block[4]/block[2]/@space-before"/>
<!-- 4. Cell 2.2 split -->
<!-- First page -->
<eval expected="65400" xpath="//pageViewport[6]//flow/block[2]/@bpd"/>
+ <!-- Cell 1.2 -->
<!-- Block for yellow background -->
<eval expected="48600" xpath="//pageViewport[6]//flow/block[2]/block[1]/@bpd"/>
- <!-- Cell 1.2 -->
<eval expected="48600" xpath="//pageViewport[6]//flow/block[2]/block[2]/@bpd"/>
<eval expected="15000" xpath="//pageViewport[6]//flow/block[2]/block[2]/block[1]/@space-after"/>
<eval expected="0" xpath="count(//pageViewport[6]//flow/block[2]/block[2]/block[2]/@space-before)"/>
- <!-- Block for grey background -->
- <eval expected="16800" xpath="//pageViewport[6]//flow/block[2]/block[3]/@bpd"/>
<!-- Cell 1.1 -->
+ <!-- Block for yellow background -->
+ <eval expected="65400" xpath="//pageViewport[6]//flow/block[2]/block[3]/@bpd"/>
<eval expected="20000" xpath="//pageViewport[6]//flow/block[2]/block[4]/block[1]/@space-after"/>
<eval expected="0" xpath="count(//pageViewport[6]//flow/block[2]/block[4]/block[2]/@space-before)"/>
<!-- Cell 2.2 Line 1 -->
+ <!-- Block for grey background -->
<eval expected="16800" xpath="//pageViewport[6]//flow/block[2]/block[5]/@bpd"/>
- <eval expected="0" xpath="count(//pageViewport[6]//flow/block[2]/block[5]/block[1]/@space-after)"/>
+ <eval expected="16800" xpath="//pageViewport[6]//flow/block[2]/block[6]/@bpd"/>
+ <eval expected="0" xpath="count(//pageViewport[6]//flow/block[2]/block[6]/block[1]/@space-after)"/>
<!-- Second page -->
<eval expected="26800" xpath="//pageViewport[7]//flow/block[1]/@bpd"/>
- <!-- Block for grey background -->
+ <!-- Block for yellow background -->
<eval expected="26800" xpath="//pageViewport[7]//flow/block[1]/block[1]/@bpd"/>
<!-- Cell 2.2 Line 2 -->
+ <!-- Block for grey background -->
<eval expected="26800" xpath="//pageViewport[7]//flow/block[1]/block[3]/@bpd"/>
- <eval expected="10000" xpath="//pageViewport[7]//flow/block[1]/block[3]/block[1]/@space-before"/>
+ <eval expected="26800" xpath="//pageViewport[7]//flow/block[1]/block[4]/@bpd"/>
+ <eval expected="10000" xpath="//pageViewport[7]//flow/block[1]/block[4]/block[1]/@space-before"/>
</checks>
</testcase>
<eval expected="header" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[2]/block[1]/lineArea"/>
<eval expected="180000" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[2]/@ipda"/>
<!--eval expected="14400" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[2]/@bpda"/-->
- <true xpath="contains(//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[3]/block[1]/lineArea, '1')"/>
- <eval expected="180000" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[3]/@ipda"/>
- <!--eval expected="14400" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[3]/@bpda"/-->
+ <true xpath="contains(//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[4]/block[1]/lineArea, '1')"/>
+ <eval expected="180000" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[4]/@ipda"/>
+ <!--eval expected="14400" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[4]/@bpda"/-->
- <eval expected="cell1" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[4]/block[1]/lineArea"/>
- <eval expected="cell2" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[5]/block[1]/lineArea"/>
- <eval expected="cell3" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[6]/block[1]/lineArea"/>
- <eval expected="cell4" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[7]/block[1]/lineArea"/>
- <eval expected="cell5" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[8]/block[1]/lineArea"/>
- <eval expected="cell6" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[9]/block[1]/lineArea"/>
+ <eval expected="cell1" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[5]/block[1]/lineArea"/>
+ <eval expected="cell2" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[6]/block[1]/lineArea"/>
+ <eval expected="cell3" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[7]/block[1]/lineArea"/>
+ <eval expected="cell4" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[8]/block[1]/lineArea"/>
+ <eval expected="cell5" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[9]/block[1]/lineArea"/>
+ <eval expected="cell6" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[10]/block[1]/lineArea"/>
- <true xpath="not(boolean(//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[11]))"/>
+ <true xpath="not(boolean(//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[12]))"/>
<!-- page 2 -->
<eval expected="header" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[2]/block[1]/lineArea"/>
<eval expected="180000" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[2]/@ipda"/>
<!--eval expected="14400" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[2]/@bpda"/-->
- <true xpath="contains(//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[3]/block[1]/lineArea, '2')"/>
- <eval expected="180000" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[3]/@ipda"/>
- <!--eval expected="14400" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[3]/@bpda"/-->
+ <true xpath="contains(//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[4]/block[1]/lineArea, '2')"/>
+ <eval expected="180000" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[4]/@ipda"/>
+ <!--eval expected="14400" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[4]/@bpda"/-->
- <eval expected="cell7" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[4]/block[1]/lineArea"/>
- <eval expected="cell8" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[5]/block[1]/lineArea"/>
+ <eval expected="cell7" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[5]/block[1]/lineArea"/>
+ <eval expected="cell8" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[6]/block[1]/lineArea"/>
- <eval expected="footer" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[7]/block[1]/lineArea"/>
- <eval expected="180000" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[7]/@ipda"/>
- <!--eval expected="14400" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[7]/@bpda"/-->
- <true xpath="contains(//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[8]/block[1]/lineArea, '2')"/>
+ <eval expected="footer" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[8]/block[1]/lineArea"/>
<eval expected="180000" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[8]/@ipda"/>
<!--eval expected="14400" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[8]/@bpda"/-->
+ <true xpath="contains(//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[10]/block[1]/lineArea, '2')"/>
+ <eval expected="180000" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[10]/@ipda"/>
+ <!--eval expected="14400" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[10]/@bpda"/-->
</checks>
</testcase>
<fo:page-sequence master-reference="normal" white-space-collapse="true">
<fo:flow flow-name="xsl-region-body">
<fo:table table-layout="fixed" width="100%" table-omit-header-at-break="true">
- <fo:table-column number-columns-repeated="2"/>
+ <fo:table-column number-columns-repeated="2" column-width="proportional-column-width(1)"/>
<fo:table-header>
<fo:table-row background-color="yellow">
<fo:table-cell>
<eval expected="header" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[2]/block[1]/lineArea"/>
<eval expected="180000" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[2]/@ipda"/>
<!--eval expected="14400" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[2]/@bpda"/-->
- <true xpath="contains(//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[3]/block[1]/lineArea, '1')"/>
- <eval expected="180000" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[3]/@ipda"/>
- <!--eval expected="14400" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[3]/@bpda"/-->
+ <true xpath="contains(//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[4]/block[1]/lineArea, '1')"/>
+ <eval expected="180000" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[4]/@ipda"/>
+ <!--eval expected="14400" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[4]/@bpda"/-->
- <eval expected="cell1" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[4]/block[1]/lineArea"/>
- <eval expected="cell2" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[5]/block[1]/lineArea"/>
- <eval expected="cell3" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[6]/block[1]/lineArea"/>
- <eval expected="cell4" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[7]/block[1]/lineArea"/>
- <eval expected="cell5" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[8]/block[1]/lineArea"/>
- <eval expected="cell6" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[9]/block[1]/lineArea"/>
+ <eval expected="cell1" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[5]/block[1]/lineArea"/>
+ <eval expected="cell2" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[6]/block[1]/lineArea"/>
+ <eval expected="cell3" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[7]/block[1]/lineArea"/>
+ <eval expected="cell4" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[8]/block[1]/lineArea"/>
+ <eval expected="cell5" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[9]/block[1]/lineArea"/>
+ <eval expected="cell6" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[10]/block[1]/lineArea"/>
- <eval expected="footer" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[11]/block[1]/lineArea"/>
- <eval expected="180000" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[11]/@ipda"/>
- <!--eval expected="14400" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[11]/@bpda"/-->
- <true xpath="contains(//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[12]/block[1]/lineArea, '1')"/>
+ <eval expected="footer" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[12]/block[1]/lineArea"/>
<eval expected="180000" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[12]/@ipda"/>
<!--eval expected="14400" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[12]/@bpda"/-->
+ <true xpath="contains(//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[14]/block[1]/lineArea, '1')"/>
+ <eval expected="180000" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[14]/@ipda"/>
+ <!--eval expected="14400" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[14]/@bpda"/-->
<!-- page 2 -->
<eval expected="cell7" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[1]/block[1]/lineArea"/>
<eval expected="footer" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[4]/block[1]/lineArea"/>
<eval expected="180000" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[4]/@ipda"/>
<!--eval expected="14400" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[4]/@bpda"/-->
- <true xpath="contains(//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[5]/block[1]/lineArea, '2')"/>
- <eval expected="180000" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[5]/@ipda"/>
- <!--eval expected="14400" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[5]/@bpda"/-->
+ <true xpath="contains(//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[6]/block[1]/lineArea, '2')"/>
+ <eval expected="180000" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[6]/@ipda"/>
+ <!--eval expected="14400" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[6]/@bpda"/-->
</checks>
</testcase>
<fo:page-sequence master-reference="normal" white-space-collapse="true">
<fo:flow flow-name="xsl-region-body">
<fo:table table-layout="fixed" width="100%">
- <fo:table-column number-columns-repeated="2"/>
+ <fo:table-column number-columns-repeated="2" column-width="proportional-column-width(1)"/>
<fo:table-header>
<fo:table-row background-color="yellow">
<fo:table-cell>
<!-- header row background -->
<eval expected="color=#ffff00" xpath="//flow/block[1]/block[1]/@background"/>
- <eval expected="360000" xpath="//flow/block[1]/block[1]/@ipda"/>
+ <eval expected="180000" xpath="//flow/block[1]/block[1]/@ipda"/>
<eval expected="14400" xpath="//flow/block[1]/block[1]/@bpda"/>
+ <eval expected="" xpath="//flow/block[1]/block[1]/@left-offset"/>
+ <eval expected="color=#ffff00" xpath="//flow/block[1]/block[3]/@background"/>
+ <eval expected="180000" xpath="//flow/block[1]/block[3]/@ipda"/>
+ <eval expected="14400" xpath="//flow/block[1]/block[3]/@bpda"/>
+ <eval expected="180000" xpath="//flow/block[1]/block[3]/@left-offset"/>
<eval expected="header1" xpath="//flow/block[1]/block[2]/block[1]/lineArea"/>
<eval expected="180000" xpath="//flow/block[1]/block[2]/@ipda"/>
<eval expected="14400" xpath="//flow/block[1]/block[2]/@bpda"/>
- <eval expected="header2" xpath="//flow/block[1]/block[3]/block[1]/lineArea"/>
- <eval expected="180000" xpath="//flow/block[1]/block[3]/@ipda"/>
- <eval expected="14400" xpath="//flow/block[1]/block[3]/@bpda"/>
+ <eval expected="header2" xpath="//flow/block[1]/block[4]/block[1]/lineArea"/>
+ <eval expected="180000" xpath="//flow/block[1]/block[4]/@ipda"/>
+ <eval expected="14400" xpath="//flow/block[1]/block[4]/@bpda"/>
- <eval expected="cell1" xpath="//flow/block[1]/block[4]/block[1]/lineArea"/>
- <eval expected="cell2" xpath="//flow/block[1]/block[5]/block[1]/lineArea"/>
- <eval expected="cell3" xpath="//flow/block[1]/block[6]/block[1]/lineArea"/>
- <eval expected="cell4" xpath="//flow/block[1]/block[7]/block[1]/lineArea"/>
+ <eval expected="cell1" xpath="//flow/block[1]/block[5]/block[1]/lineArea"/>
+ <eval expected="cell2" xpath="//flow/block[1]/block[6]/block[1]/lineArea"/>
+ <eval expected="cell3" xpath="//flow/block[1]/block[7]/block[1]/lineArea"/>
+ <eval expected="cell4" xpath="//flow/block[1]/block[8]/block[1]/lineArea"/>
<!-- footer row background -->
- <eval expected="color=#ffa500" xpath="//flow/block[1]/block[8]/@background"/>
- <eval expected="360000" xpath="//flow/block[1]/block[8]/@ipda"/>
- <eval expected="14400" xpath="//flow/block[1]/block[8]/@bpda"/>
-
- <eval expected="footer1" xpath="//flow/block[1]/block[9]/block[1]/lineArea"/>
+ <eval expected="color=#ffa500" xpath="//flow/block[1]/block[9]/@background"/>
<eval expected="180000" xpath="//flow/block[1]/block[9]/@ipda"/>
<eval expected="14400" xpath="//flow/block[1]/block[9]/@bpda"/>
- <eval expected="footer2" xpath="//flow/block[1]/block[10]/block[1]/lineArea"/>
+ <eval expected="" xpath="//flow/block[1]/block[9]/@left-offset"/>
+ <eval expected="color=#ffa500" xpath="//flow/block[1]/block[11]/@background"/>
+ <eval expected="180000" xpath="//flow/block[1]/block[11]/@ipda"/>
+ <eval expected="14400" xpath="//flow/block[1]/block[11]/@bpda"/>
+ <eval expected="180000" xpath="//flow/block[1]/block[11]/@left-offset"/>
+
+ <eval expected="footer1" xpath="//flow/block[1]/block[10]/block[1]/lineArea"/>
<eval expected="180000" xpath="//flow/block[1]/block[10]/@ipda"/>
<eval expected="14400" xpath="//flow/block[1]/block[10]/@bpda"/>
+ <eval expected="footer2" xpath="//flow/block[1]/block[12]/block[1]/lineArea"/>
+ <eval expected="180000" xpath="//flow/block[1]/block[12]/@ipda"/>
+ <eval expected="14400" xpath="//flow/block[1]/block[12]/@bpda"/>
</checks>
</testcase>
<fo:page-sequence master-reference="normal" white-space-collapse="true">
<fo:flow flow-name="xsl-region-body">
<fo:table table-layout="fixed" width="100%">
- <fo:table-column number-columns-repeated="2"/>
+ <fo:table-column number-columns-repeated="2" column-width="proportional-column-width(1)"/>
<fo:table-header>
<fo:table-row background-color="yellow">
<fo:table-cell>
<eval expected="header" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[2]/block[1]/lineArea"/>
<eval expected="180000" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[2]/@ipda"/>
<!--eval expected="14400" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[2]/@bpda"/-->
- <true xpath="contains(//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[3]/block[1]/lineArea, '1')"/>
- <eval expected="180000" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[3]/@ipda"/>
- <!--eval expected="14400" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[3]/@bpda"/-->
+ <true xpath="contains(//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[4]/block[1]/lineArea, '1')"/>
+ <eval expected="180000" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[4]/@ipda"/>
+ <!--eval expected="14400" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[4]/@bpda"/-->
- <eval expected="cell1" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[4]/block[1]/lineArea"/>
- <eval expected="cell2" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[5]/block[1]/lineArea"/>
- <eval expected="cell3" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[6]/block[1]/lineArea"/>
- <eval expected="cell4" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[7]/block[1]/lineArea"/>
- <eval expected="cell5" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[8]/block[1]/lineArea"/>
- <eval expected="cell6" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[9]/block[1]/lineArea"/>
+ <eval expected="cell1" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[5]/block[1]/lineArea"/>
+ <eval expected="cell2" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[6]/block[1]/lineArea"/>
+ <eval expected="cell3" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[7]/block[1]/lineArea"/>
+ <eval expected="cell4" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[8]/block[1]/lineArea"/>
+ <eval expected="cell5" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[9]/block[1]/lineArea"/>
+ <eval expected="cell6" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[10]/block[1]/lineArea"/>
- <eval expected="footer" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[11]/block[1]/lineArea"/>
- <eval expected="180000" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[11]/@ipda"/>
- <!--eval expected="14400" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[11]/@bpda"/-->
- <true xpath="contains(//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[12]/block[1]/lineArea, '1')"/>
+ <eval expected="footer" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[12]/block[1]/lineArea"/>
<eval expected="180000" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[12]/@ipda"/>
<!--eval expected="14400" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[12]/@bpda"/-->
+ <true xpath="contains(//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[14]/block[1]/lineArea, '1')"/>
+ <eval expected="180000" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[14]/@ipda"/>
+ <!--eval expected="14400" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[14]/@bpda"/-->
<!-- page 2 -->
<eval expected="header" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[2]/block[1]/lineArea"/>
<eval expected="180000" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[2]/@ipda"/>
<!--eval expected="14400" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[2]/@bpda"/-->
- <true xpath="contains(//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[3]/block[1]/lineArea, '2')"/>
- <eval expected="180000" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[3]/@ipda"/>
- <!--eval expected="14400" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[3]/@bpda"/-->
+ <true xpath="contains(//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[4]/block[1]/lineArea, '2')"/>
+ <eval expected="180000" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[4]/@ipda"/>
+ <!--eval expected="14400" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[4]/@bpda"/-->
- <eval expected="cell7" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[4]/block[1]/lineArea"/>
- <eval expected="cell8" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[5]/block[1]/lineArea"/>
+ <eval expected="cell7" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[5]/block[1]/lineArea"/>
+ <eval expected="cell8" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[6]/block[1]/lineArea"/>
- <eval expected="footer" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[7]/block[1]/lineArea"/>
- <eval expected="180000" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[7]/@ipda"/>
- <!--eval expected="14400" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[7]/@bpda"/-->
- <true xpath="contains(//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[8]/block[1]/lineArea, '2')"/>
+ <eval expected="footer" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[8]/block[1]/lineArea"/>
<eval expected="180000" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[8]/@ipda"/>
<!--eval expected="14400" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[8]/@bpda"/-->
+ <true xpath="contains(//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[10]/block[1]/lineArea, '2')"/>
+ <eval expected="180000" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[10]/@ipda"/>
+ <!--eval expected="14400" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[10]/@bpda"/-->
</checks>
</testcase>
</fo:layout-master-set>
<fo:page-sequence master-reference="normal" white-space-collapse="true">
<fo:flow flow-name="xsl-region-body">
- <fo:table table-layout="fixed">
- <fo:table-column column-number="1" />
- <fo:table-column column-number="2" />
- <fo:table-column column-number="3" />
+ <fo:table table-layout="fixed" width="100%">
+ <fo:table-column number-columns-repeated="3" column-width="proportional-column-width(1)"/>
<fo:table-header>
<fo:table-row>
<fo:table-cell>
</fo:root>
</fo>
<checks>
- <eval expected="360000" xpath="//flow/block/block[4]/@ipd"/>
+ <eval expected="120000" xpath="//flow/block/block[4]/@ipd"/>
<eval expected="72000" xpath="//flow/block/block[4]/@bpd"/>
<eval expected="color=#ffff00,url=../../resources/images/bgimg300dpi.jpg,repeat=no-repeat,horiz=156960,vertical=12960" xpath="//flow/block/block[4]/@background"/>
+ <eval expected="" xpath="//flow/block/block[4]/@left-offset"/>
+
+ <eval expected="120000" xpath="//flow/block/block[6]/@ipd"/>
+ <eval expected="72000" xpath="//flow/block/block[6]/@bpd"/>
+ <eval expected="color=#ffff00,url=../../resources/images/bgimg300dpi.jpg,repeat=no-repeat,horiz=36960,vertical=12960" xpath="//flow/block/block[6]/@background"/>
+ <eval expected="120000" xpath="//flow/block/block[6]/@left-offset"/>
+
+ <eval expected="120000" xpath="//flow/block/block[8]/@ipd"/>
+ <eval expected="72000" xpath="//flow/block/block[8]/@bpd"/>
+ <eval expected="color=#ffff00,url=../../resources/images/bgimg300dpi.jpg,repeat=no-repeat,horiz=-83040,vertical=12960" xpath="//flow/block/block[8]/@background"/>
+ <eval expected="240000" xpath="//flow/block/block[8]/@left-offset"/>
+
</checks>
</testcase>
<eval expected="14400" xpath="//flow/block[1]/block[2]/@bpd"/>
<!-- row 2 -->
- <eval expected="360000" xpath="//flow/block[1]/block[3]/@ipd"/>
- <eval expected="20000" xpath="//flow/block[1]/block[3]/@bpd"/> <!-- background-area generated for the row -->
+ <eval expected="144000" xpath="//flow/block[1]/block[3]/@ipd"/> <!-- background-area generated for the row -->
+ <eval expected="20000" xpath="//flow/block[1]/block[3]/@bpd"/>
<eval expected="color=#ffff00" xpath="//flow/block[1]/block[3]/@background"/>
+ <eval expected="" xpath="//flow/block[1]/block[3]/@left-offset"/>
<eval expected="144000" xpath="//flow/block[1]/block[4]/@ipd"/>
<eval expected="20000" xpath="//flow/block[1]/block[4]/@bpd"/>
- <eval expected="216000" xpath="//flow/block[1]/block[5]/@ipd"/>
+ <eval expected="216000" xpath="//flow/block[1]/block[5]/@ipd"/> <!-- background-area generated for the row -->
<eval expected="20000" xpath="//flow/block[1]/block[5]/@bpd"/>
+ <eval expected="color=#ffff00" xpath="//flow/block[1]/block[5]/@background"/>
+ <eval expected="144000" xpath="//flow/block[1]/block[5]/@left-offset"/>
+ <eval expected="216000" xpath="//flow/block[1]/block[6]/@ipd"/>
+ <eval expected="20000" xpath="//flow/block[1]/block[6]/@bpd"/>
<!-- row 3 -->
- <eval expected="360000" xpath="//flow/block[1]/block[6]/@ipd"/>
- <eval expected="20000" xpath="//flow/block[1]/block[6]/@bpd"/> <!-- background-area generated for the row -->
- <eval expected="color=#ffa500" xpath="//flow/block[1]/block[6]/@background"/>
- <eval expected="144000" xpath="//flow/block[1]/block[7]/@ipd"/>
+ <eval expected="144000" xpath="//flow/block[1]/block[7]/@ipd"/> <!-- background-area generated for the row -->
<eval expected="20000" xpath="//flow/block[1]/block[7]/@bpd"/>
- <eval expected="216000" xpath="//flow/block[1]/block[8]/@ipd"/>
+ <eval expected="color=#ffa500" xpath="//flow/block[1]/block[7]/@background"/>
+ <eval expected="" xpath="//flow/block[1]/block[7]/@left-offset"/>
+ <eval expected="144000" xpath="//flow/block[1]/block[8]/@ipd"/>
<eval expected="20000" xpath="//flow/block[1]/block[8]/@bpd"/>
+ <eval expected="216000" xpath="//flow/block[1]/block[9]/@ipd"/> <!-- background-area generated for the row -->
+ <eval expected="20000" xpath="//flow/block[1]/block[9]/@bpd"/>
+ <eval expected="color=#ffa500" xpath="//flow/block[1]/block[9]/@background"/>
+ <eval expected="144000" xpath="//flow/block[1]/block[9]/@left-offset"/>
+ <eval expected="216000" xpath="//flow/block[1]/block[10]/@ipd"/>
+ <eval expected="20000" xpath="//flow/block[1]/block[10]/@bpd"/>
<!-- row 4 -->
- <eval expected="144000" xpath="//flow/block[1]/block[9]/@ipd"/>
- <eval expected="14400" xpath="//flow/block[1]/block[9]/@bpd"/>
- <eval expected="216000" xpath="//flow/block[1]/block[10]/@ipd"/>
- <eval expected="14400" xpath="//flow/block[1]/block[10]/@bpd"/>
+ <eval expected="144000" xpath="//flow/block[1]/block[11]/@ipd"/>
+ <eval expected="14400" xpath="//flow/block[1]/block[11]/@bpd"/>
+ <eval expected="216000" xpath="//flow/block[1]/block[12]/@ipd"/>
+ <eval expected="14400" xpath="//flow/block[1]/block[12]/@bpd"/>
</checks>
</testcase>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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 backgrounds on table elements.
+ </p>
+ </info>
+ <variables>
+ <table>../../resources/images/fop-logo-gray-8bit.png</table>
+ <col>../../resources/images/bgimg72dpi.jpg</col>
+ <body>../../resources/images/fop-logo-color-24bit.png</body>
+ <row>../../../examples/fo/graphics/asf-logo.png</row>
+ <headFoot>../../../examples/fo/graphics/asf-logo.png</headFoot>
+ <header>../../resources/images/box1.png</header>
+ </variables>
+ <fo>
+ <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
+ <fo:layout-master-set>
+ <fo:simple-page-master master-name="page" page-height="10in" page-width="5in" margin="0.5in">
+ <fo:region-body/>
+ </fo:simple-page-master>
+ </fo:layout-master-set>
+
+ <fo:page-sequence master-reference="page" font-size="8pt" line-height="10pt">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block space-after="10pt">Before the table.</fo:block>
+ <fo:table width="100%" table-layout="fixed"
+ border-collapse="separate" border-separation="4pt" padding="2pt"
+ background-color="#F0F0F0" background-image="##table" background-repeat="no-repeat"
+ background-position-horizontal="center" background-position-vertical="center"
+ border="4pt solid black">
+ <fo:table-column column-width="proportional-column-width(1)"
+ background-color="yellow" background-image="##col" background-repeat="no-repeat"
+ background-position-horizontal="center" background-position-vertical="center"/>
+ <fo:table-column column-width="proportional-column-width(1)"
+ background-image="##col" background-repeat="no-repeat"
+ background-position-horizontal="center" background-position-vertical="center"/>
+ <fo:table-header background-image="##headFoot" background-repeat="no-repeat"
+ background-position-horizontal="center" background-position-vertical="center">
+ <fo:table-cell border="2pt solid blue">
+ <fo:block>Header 1.1</fo:block>
+ <fo:block>Header 1.1</fo:block>
+ <fo:block>Header 1.1</fo:block>
+ <fo:block>Header 1.1</fo:block>
+ <fo:block>Header 1.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="2pt solid blue" background-color="yellow"
+ background-image="##header" background-repeat="no-repeat"
+ background-position-horizontal="center" background-position-vertical="center">
+ <fo:block>Header 1.2</fo:block>
+ <fo:block>Header 1.2</fo:block>
+ <fo:block>Header 1.2</fo:block>
+ <fo:block>Header 1.2</fo:block>
+ <fo:block>Header 1.2</fo:block>
+ </fo:table-cell>
+ </fo:table-header>
+ <fo:table-footer background-image="##headFoot" background-repeat="no-repeat"
+ background-position-horizontal="center" background-position-vertical="center">
+ <fo:table-cell border="2pt solid blue">
+ <fo:block>Footer 1.1</fo:block>
+ <fo:block>Footer 1.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="2pt solid blue">
+ <fo:block>Footer 1.2</fo:block>
+ <fo:block>Footer 1.2</fo:block>
+ </fo:table-cell>
+ </fo:table-footer>
+ <fo:table-body>
+ <fo:table-row background-image="##row" background-repeat="no-repeat"
+ background-position-horizontal="center" background-position-vertical="center">
+ <fo:table-cell border="2pt solid red" number-rows-spanned="2">
+ <fo:block>Cell 1.1</fo:block>
+ <fo:block>Cell 1.1</fo:block>
+ <fo:block>Cell 1.1</fo:block>
+ <fo:block>Cell 1.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell color="orange">
+ <fo:block>Cell 1.2</fo:block>
+ <fo:block>Cell 1.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row background-image="##row" background-repeat="no-repeat"
+ background-position-horizontal="center" background-position-vertical="center">
+ <fo:table-cell border="2pt solid red" color="orange">
+ <fo:block>Cell 2.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row background-image="##row" background-repeat="no-repeat"
+ background-position-horizontal="center" background-position-vertical="center">
+ <fo:table-cell border="2pt solid red" number-columns-spanned="2">
+ <fo:block>Cell 3.1</fo:block>
+ <fo:block>Cell 3.1</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row background-image="##row" background-repeat="no-repeat"
+ background-position-horizontal="center" background-position-vertical="center">
+ <fo:table-cell border="2pt solid red">
+ <fo:block>Cell 4.1</fo:block>
+ <fo:block>Cell 4.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell color="orange">
+ <fo:block>Cell 4.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ <fo:table-body background-image="##body" background-repeat="no-repeat"
+ background-position-horizontal="center" background-position-vertical="center">
+ <fo:table-row>
+ <fo:table-cell border="2pt solid red" number-rows-spanned="2">
+ <fo:block>Cell 5.1</fo:block>
+ <fo:block>Cell 5.1</fo:block>
+ <fo:block>Cell 5.1</fo:block>
+ <fo:block>Cell 5.1</fo:block>
+ <fo:block>Cell 5.1 Line 5</fo:block>
+ <fo:block>Cell 5.1</fo:block>
+ <fo:block>Cell 5.1</fo:block>
+ <fo:block>Cell 5.1</fo:block>
+ <fo:block>Cell 5.1</fo:block>
+ <fo:block>Cell 5.1 Line 10</fo:block>
+ <fo:block>Cell 5.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell color="orange">
+ <fo:block>Cell 5.2</fo:block>
+ <fo:block>Cell 5.2</fo:block>
+ <fo:block>Cell 5.2</fo:block>
+ <fo:block>Cell 5.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row>
+ <fo:table-cell border="2pt solid red" color="orange">
+ <fo:block>Cell 6.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ </fo:flow>
+ </fo:page-sequence>
+ </fo:root>
+
+ </fo>
+ <checks>
+ <!-- table background -->
+ <eval expected="color=#f0f0f0,url=../../resources/images/fop-logo-gray-8bit.png,repeat=no-repeat,horiz=53480,vertical=108960"
+ xpath="//flow/block[2]/@background"/>
+
+ <!-- column background, header 1.1 -->
+ <eval expected="136000" xpath="//flow/block[2]/block[1]/@ipd"/>
+ <eval expected="50000" xpath="//flow/block[2]/block[1]/@bpd"/>
+ <eval expected="4000" xpath="//flow/block[2]/block[1]/@top-offset"/>
+ <eval expected="4000" xpath="//flow/block[2]/block[1]/@left-offset"/>
+ <eval xpath="//flow/block[2]/block[1]/@background"
+ expected="color=#ffff00,url=../../resources/images/bgimg72dpi.jpg,repeat=no-repeat,horiz=-28000,vertical=54000"/>
+
+ <!-- table-header background, header 1.1 -->
+ <eval expected="136000" xpath="//flow/block[2]/block[2]/@ipd"/>
+ <eval expected="50000" xpath="//flow/block[2]/block[2]/@bpd"/>
+ <eval expected="4000" xpath="//flow/block[2]/block[2]/@top-offset"/>
+ <eval expected="4000" xpath="//flow/block[2]/block[2]/@left-offset"/>
+ <eval xpath="//flow/block[2]/block[2]/@background"
+ expected="url=../../../examples/fo/graphics/asf-logo.png,repeat=no-repeat,horiz=76633,vertical=5877"/>
+
+
+ <!-- column background, header 1.2 -->
+ <eval expected="136000" xpath="//flow/block[2]/block[4]/@ipd"/>
+ <eval expected="50000" xpath="//flow/block[2]/block[4]/@bpd"/>
+ <eval expected="4000" xpath="//flow/block[2]/block[4]/@top-offset"/>
+ <eval expected="148000" xpath="//flow/block[2]/block[4]/@left-offset"/>
+ <eval xpath="//flow/block[2]/block[4]/@background"
+ expected="url=../../resources/images/bgimg72dpi.jpg,repeat=no-repeat,horiz=-28000,vertical=54000"/>
+
+ <!-- table-header background, header 1.2 -->
+ <eval expected="136000" xpath="//flow/block[2]/block[5]/@ipd"/>
+ <eval expected="50000" xpath="//flow/block[2]/block[5]/@bpd"/>
+ <eval expected="4000" xpath="//flow/block[2]/block[5]/@top-offset"/>
+ <eval expected="148000" xpath="//flow/block[2]/block[5]/@left-offset"/>
+ <eval xpath="//flow/block[2]/block[5]/@background"
+ expected="url=../../../examples/fo/graphics/asf-logo.png,repeat=no-repeat,horiz=-67367,vertical=5877"/>
+
+ <!-- header 1.2 background -->
+ <eval expected="136000" xpath="//flow/block[2]/block[6]/@ipd"/>
+ <eval expected="50000" xpath="//flow/block[2]/block[6]/@bpd"/>
+ <eval expected="2000" xpath="//flow/block[2]/block[6]/@top-offset"/>
+ <eval expected="148000" xpath="//flow/block[2]/block[6]/@left-offset"/>
+ <eval xpath="//flow/block[2]/block[6]/@background"
+ expected="color=#ffff00,url=../../resources/images/box1.png,repeat=no-repeat,horiz=47995,vertical=4995"/>
+
+
+ <!-- column background, cell 1.2 -->
+ <eval expected="140000" xpath="//flow/block[2]/block[7]/@ipd"/>
+ <eval expected="20000" xpath="//flow/block[2]/block[7]/@bpd"/>
+ <eval expected="60000" xpath="//flow/block[2]/block[7]/@top-offset"/>
+ <eval expected="146000" xpath="//flow/block[2]/block[7]/@left-offset"/>
+ <eval xpath="//flow/block[2]/block[7]/@background"
+ expected="url=../../resources/images/bgimg72dpi.jpg,repeat=no-repeat,horiz=-26000,vertical=-2000"/>
+
+ <!-- table-row background, cell 1.2 -->
+ <eval expected="140000" xpath="//flow/block[2]/block[8]/@ipd"/>
+ <eval expected="20000" xpath="//flow/block[2]/block[8]/@bpd"/>
+ <eval expected="60000" xpath="//flow/block[2]/block[8]/@top-offset"/>
+ <eval expected="146000" xpath="//flow/block[2]/block[8]/@left-offset"/>
+ <eval xpath="//flow/block[2]/block[8]/@background"
+ expected="url=../../../examples/fo/graphics/asf-logo.png,repeat=no-repeat,horiz=-65367,vertical=-9122"/>
+
+
+ <!-- column background, cell 1.1 -->
+ <eval expected="136000" xpath="//flow/block[2]/block[10]/@ipd"/>
+ <eval expected="40000" xpath="//flow/block[2]/block[10]/@bpd"/>
+ <eval expected="62000" xpath="//flow/block[2]/block[10]/@top-offset"/>
+ <eval expected="4000" xpath="//flow/block[2]/block[10]/@left-offset"/>
+ <eval xpath="//flow/block[2]/block[10]/@background"
+ expected="color=#ffff00,url=../../resources/images/bgimg72dpi.jpg,repeat=no-repeat,horiz=-28000,vertical=-4000"/>
+
+ <!-- table-row background, cell 1.1 -->
+ <eval expected="136000" xpath="//flow/block[2]/block[11]/@ipd"/>
+ <eval expected="40000" xpath="//flow/block[2]/block[11]/@bpd"/>
+ <eval expected="62000" xpath="//flow/block[2]/block[11]/@top-offset"/>
+ <eval expected="4000" xpath="//flow/block[2]/block[11]/@left-offset"/>
+ <eval xpath="//flow/block[2]/block[11]/@background"
+ expected="url=../../../examples/fo/graphics/asf-logo.png,repeat=no-repeat,horiz=76633,vertical=-11122"/>
+
+
+ <!-- column background, cell 2.2 -->
+ <eval expected="136000" xpath="//flow/block[2]/block[13]/@ipd"/>
+ <eval expected="16000" xpath="//flow/block[2]/block[13]/@bpd"/>
+ <eval expected="86000" xpath="//flow/block[2]/block[13]/@top-offset"/>
+ <eval expected="148000" xpath="//flow/block[2]/block[13]/@left-offset"/>
+ <eval xpath="//flow/block[2]/block[13]/@background"
+ expected="url=../../resources/images/bgimg72dpi.jpg,repeat=no-repeat,horiz=-28000,vertical=-28000"/>
+
+ <!-- table-row background, cell 2.2 -->
+ <eval expected="136000" xpath="//flow/block[2]/block[14]/@ipd"/>
+ <eval expected="16000" xpath="//flow/block[2]/block[14]/@bpd"/>
+ <eval expected="86000" xpath="//flow/block[2]/block[14]/@top-offset"/>
+ <eval expected="148000" xpath="//flow/block[2]/block[14]/@left-offset"/>
+ <eval xpath="//flow/block[2]/block[14]/@background"
+ expected="url=../../../examples/fo/graphics/asf-logo.png,repeat=no-repeat,horiz=-67367,vertical=-11122"/>
+
+
+ <!-- column background, cell 3.1 -->
+ <eval expected="280000" xpath="//flow/block[2]/block[16]/@ipd"/>
+ <eval expected="20000" xpath="//flow/block[2]/block[16]/@bpd"/>
+ <eval expected="110000" xpath="//flow/block[2]/block[16]/@top-offset"/>
+ <eval expected="4000" xpath="//flow/block[2]/block[16]/@left-offset"/>
+ <eval xpath="//flow/block[2]/block[16]/@background"
+ expected="color=#ffff00,url=../../resources/images/bgimg72dpi.jpg,repeat=no-repeat,horiz=-28000,vertical=-52000"/>
+
+ <!-- table-row background, cell 3.1 -->
+ <eval expected="280000" xpath="//flow/block[2]/block[17]/@ipd"/>
+ <eval expected="20000" xpath="//flow/block[2]/block[17]/@bpd"/>
+ <eval expected="110000" xpath="//flow/block[2]/block[17]/@top-offset"/>
+ <eval expected="4000" xpath="//flow/block[2]/block[17]/@left-offset"/>
+ <eval xpath="//flow/block[2]/block[17]/@background"
+ expected="url=../../../examples/fo/graphics/asf-logo.png,repeat=no-repeat,horiz=76633,vertical=-9122"/>
+
+
+ <!-- column background, cell 4.1 -->
+ <eval expected="136000" xpath="//flow/block[2]/block[19]/@ipd"/>
+ <eval expected="20000" xpath="//flow/block[2]/block[19]/@bpd"/>
+ <eval expected="138000" xpath="//flow/block[2]/block[19]/@top-offset"/>
+ <eval expected="4000" xpath="//flow/block[2]/block[19]/@left-offset"/>
+ <eval xpath="//flow/block[2]/block[19]/@background"
+ expected="color=#ffff00,url=../../resources/images/bgimg72dpi.jpg,repeat=no-repeat,horiz=-28000,vertical=-80000"/>
+
+ <!-- table-row background, cell 4.1 -->
+ <eval expected="136000" xpath="//flow/block[2]/block[20]/@ipd"/>
+ <eval expected="20000" xpath="//flow/block[2]/block[20]/@bpd"/>
+ <eval expected="138000" xpath="//flow/block[2]/block[20]/@top-offset"/>
+ <eval expected="4000" xpath="//flow/block[2]/block[20]/@left-offset"/>
+ <eval xpath="//flow/block[2]/block[20]/@background"
+ expected="url=../../../examples/fo/graphics/asf-logo.png,repeat=no-repeat,horiz=76633,vertical=-9122"/>
+
+
+ <!-- column background, cell 4.2 -->
+ <eval expected="140000" xpath="//flow/block[2]/block[22]/@ipd"/>
+ <eval expected="24000" xpath="//flow/block[2]/block[22]/@bpd"/>
+ <eval expected="136000" xpath="//flow/block[2]/block[22]/@top-offset"/>
+ <eval expected="146000" xpath="//flow/block[2]/block[22]/@left-offset"/>
+ <eval xpath="//flow/block[2]/block[22]/@background"
+ expected="url=../../resources/images/bgimg72dpi.jpg,repeat=no-repeat,horiz=-26000,vertical=-78000"/>
+
+ <!-- table-row background, cell 4.2 -->
+ <eval expected="140000" xpath="//flow/block[2]/block[23]/@ipd"/>
+ <eval expected="24000" xpath="//flow/block[2]/block[23]/@bpd"/>
+ <eval expected="136000" xpath="//flow/block[2]/block[23]/@top-offset"/>
+ <eval expected="146000" xpath="//flow/block[2]/block[23]/@left-offset"/>
+ <eval xpath="//flow/block[2]/block[23]/@background"
+ expected="url=../../../examples/fo/graphics/asf-logo.png,repeat=no-repeat,horiz=-65367,vertical=-7122"/>
+
+
+ <!-- column background, cell 5.2 -->
+ <eval expected="140000" xpath="//flow/block[2]/block[25]/@ipd"/>
+ <eval expected="40000" xpath="//flow/block[2]/block[25]/@bpd"/>
+ <eval expected="164000" xpath="//flow/block[2]/block[25]/@top-offset"/>
+ <eval expected="146000" xpath="//flow/block[2]/block[25]/@left-offset"/>
+ <eval xpath="//flow/block[2]/block[25]/@background"
+ expected="url=../../resources/images/bgimg72dpi.jpg,repeat=no-repeat,horiz=-26000,vertical=-106000"/>
+
+ <!-- table-body background, cell 5.2 -->
+ <eval expected="140000" xpath="//flow/block[2]/block[26]/@ipd"/>
+ <eval expected="40000" xpath="//flow/block[2]/block[26]/@bpd"/>
+ <eval expected="164000" xpath="//flow/block[2]/block[26]/@top-offset"/>
+ <eval expected="146000" xpath="//flow/block[2]/block[26]/@left-offset"/>
+ <eval xpath="//flow/block[2]/block[26]/@background"
+ expected="url=../../resources/images/fop-logo-color-24bit.png,repeat=no-repeat,horiz=-94513,vertical=9964"/>
+
+
+ <!-- column background, cell 5.1 -->
+ <eval expected="136000" xpath="//flow/block[2]/block[28]/@ipd"/>
+ <eval expected="110000" xpath="//flow/block[2]/block[28]/@bpd"/>
+ <eval expected="166000" xpath="//flow/block[2]/block[28]/@top-offset"/>
+ <eval expected="4000" xpath="//flow/block[2]/block[28]/@left-offset"/>
+ <eval xpath="//flow/block[2]/block[28]/@background"
+ expected="color=#ffff00,url=../../resources/images/bgimg72dpi.jpg,repeat=no-repeat,horiz=-28000,vertical=-108000"/>
+
+ <!-- table-body background, cell 5.1 -->
+ <eval expected="136000" xpath="//flow/block[2]/block[29]/@ipd"/>
+ <eval expected="110000" xpath="//flow/block[2]/block[29]/@bpd"/>
+ <eval expected="166000" xpath="//flow/block[2]/block[29]/@top-offset"/>
+ <eval expected="4000" xpath="//flow/block[2]/block[29]/@left-offset"/>
+ <eval xpath="//flow/block[2]/block[29]/@background"
+ expected="url=../../resources/images/fop-logo-color-24bit.png,repeat=no-repeat,horiz=47487,vertical=7964"/>
+
+
+ <!-- column background, cell 6.2 -->
+ <eval expected="136000" xpath="//flow/block[2]/block[31]/@ipd"/>
+ <eval expected="66000" xpath="//flow/block[2]/block[31]/@bpd"/>
+ <eval expected="210000" xpath="//flow/block[2]/block[31]/@top-offset"/>
+ <eval expected="148000" xpath="//flow/block[2]/block[31]/@left-offset"/>
+ <eval xpath="//flow/block[2]/block[31]/@background"
+ expected="url=../../resources/images/bgimg72dpi.jpg,repeat=no-repeat,horiz=-28000,vertical=-152000"/>
+
+ <!-- table-body background, cell 6.2 -->
+ <eval expected="136000" xpath="//flow/block[2]/block[32]/@ipd"/>
+ <eval expected="66000" xpath="//flow/block[2]/block[32]/@bpd"/>
+ <eval expected="210000" xpath="//flow/block[2]/block[32]/@top-offset"/>
+ <eval expected="148000" xpath="//flow/block[2]/block[32]/@left-offset"/>
+ <eval xpath="//flow/block[2]/block[32]/@background"
+ expected="url=../../resources/images/fop-logo-color-24bit.png,repeat=no-repeat,horiz=-96513,vertical=-36036"/>
+
+
+ <!-- column background, footer 1.1 -->
+ <eval expected="136000" xpath="//flow/block[2]/block[34]/@ipd"/>
+ <eval expected="20000" xpath="//flow/block[2]/block[34]/@bpd"/>
+ <eval expected="284000" xpath="//flow/block[2]/block[34]/@top-offset"/>
+ <eval expected="4000" xpath="//flow/block[2]/block[34]/@left-offset"/>
+ <eval xpath="//flow/block[2]/block[34]/@background"
+ expected="color=#ffff00,url=../../resources/images/bgimg72dpi.jpg,repeat=no-repeat,horiz=-28000,vertical=-226000"/>
+
+ <!-- table-footer background, footer 1.1 -->
+ <eval expected="136000" xpath="//flow/block[2]/block[35]/@ipd"/>
+ <eval expected="20000" xpath="//flow/block[2]/block[35]/@bpd"/>
+ <eval expected="284000" xpath="//flow/block[2]/block[35]/@top-offset"/>
+ <eval expected="4000" xpath="//flow/block[2]/block[35]/@left-offset"/>
+ <eval xpath="//flow/block[2]/block[35]/@background"
+ expected="url=../../../examples/fo/graphics/asf-logo.png,repeat=no-repeat,horiz=76633,vertical=-9122"/>
+
+
+ <!-- column background, footer 1.2 -->
+ <eval expected="136000" xpath="//flow/block[2]/block[37]/@ipd"/>
+ <eval expected="20000" xpath="//flow/block[2]/block[37]/@bpd"/>
+ <eval expected="284000" xpath="//flow/block[2]/block[37]/@top-offset"/>
+ <eval expected="148000" xpath="//flow/block[2]/block[37]/@left-offset"/>
+ <eval xpath="//flow/block[2]/block[37]/@background"
+ expected="url=../../resources/images/bgimg72dpi.jpg,repeat=no-repeat,horiz=-28000,vertical=-226000"/>
+
+ <!-- table-footer background, footer 1.2 -->
+ <eval expected="136000" xpath="//flow/block[2]/block[38]/@ipd"/>
+ <eval expected="20000" xpath="//flow/block[2]/block[38]/@bpd"/>
+ <eval expected="284000" xpath="//flow/block[2]/block[38]/@top-offset"/>
+ <eval expected="148000" xpath="//flow/block[2]/block[38]/@left-offset"/>
+ <eval xpath="//flow/block[2]/block[38]/@background"
+ expected="url=../../../examples/fo/graphics/asf-logo.png,repeat=no-repeat,horiz=-67367,vertical=-9122"/>
+
+ </checks>
+</testcase>