aboutsummaryrefslogtreecommitdiffstats
path: root/src/java
diff options
context:
space:
mode:
authorVincent Hennebert <vhennebert@apache.org>2007-12-13 18:28:56 +0000
committerVincent Hennebert <vhennebert@apache.org>2007-12-13 18:28:56 +0000
commit7ed67aba5bec4a02c3a9ef237e42d6a3d6136808 (patch)
treeac3727a8a449f6aaab178c13209109f7801ac3e2 /src/java
parentecf8547e04c4994fcb5017351ec63203f344cf7e (diff)
downloadxmlgraphics-fop-7ed67aba5bec4a02c3a9ef237e42d6a3d6136808.tar.gz
xmlgraphics-fop-7ed67aba5bec4a02c3a9ef237e42d6a3d6136808.zip
Fixed the handling of columns in the border resolution, especially in case of column-spanning cells
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@603968 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java')
-rw-r--r--src/java/org/apache/fop/fo/flow/table/CollapsingBorderResolver.java14
-rw-r--r--src/java/org/apache/fop/fo/flow/table/TableCell.java11
2 files changed, 13 insertions, 12 deletions
diff --git a/src/java/org/apache/fop/fo/flow/table/CollapsingBorderResolver.java b/src/java/org/apache/fop/fo/flow/table/CollapsingBorderResolver.java
index f92f7bb30..f59019b92 100644
--- a/src/java/org/apache/fop/fo/flow/table/CollapsingBorderResolver.java
+++ b/src/java/org/apache/fop/fo/flow/table/CollapsingBorderResolver.java
@@ -205,14 +205,22 @@ class CollapsingBorderResolver implements BorderResolver {
// 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);
}
diff --git a/src/java/org/apache/fop/fo/flow/table/TableCell.java b/src/java/org/apache/fop/fo/flow/table/TableCell.java
index f85d0e97e..80dbe5e2a 100644
--- a/src/java/org/apache/fop/fo/flow/table/TableCell.java
+++ b/src/java/org/apache/fop/fo/flow/table/TableCell.java
@@ -138,15 +138,8 @@ public class TableCell extends TableFObj {
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} */