diff options
Diffstat (limited to 'src/java/org')
-rw-r--r-- | src/java/org/apache/fop/fo/flow/TableFObj.java | 12 | ||||
-rwxr-xr-x | src/java/org/apache/fop/fo/properties/CommonBorderPaddingBackground.java | 5 |
2 files changed, 15 insertions, 2 deletions
diff --git a/src/java/org/apache/fop/fo/flow/TableFObj.java b/src/java/org/apache/fop/fo/flow/TableFObj.java index 54fa15135..f40c46c89 100644 --- a/src/java/org/apache/fop/fo/flow/TableFObj.java +++ b/src/java/org/apache/fop/fo/flow/TableFObj.java @@ -77,6 +77,14 @@ public abstract class TableFObj extends FObj { borderBeforePrecedence = pList.get(PR_BORDER_BEFORE_PRECEDENCE).getNumeric(); borderEndPrecedence = pList.get(PR_BORDER_END_PRECEDENCE).getNumeric(); borderStartPrecedence = pList.get(PR_BORDER_START_PRECEDENCE).getNumeric(); + //Complain if table has separate border-model and fo is not a table or cell + //see: Rec 6.7.4, 6.7.6 - 6.7.9 + if (getNameId() != FO_TABLE && getNameId() != FO_TABLE_CELL + && getTable().isSeparateBorderModel() + && getCommonBorderPaddingBackground().hasBorderInfo()) { + getLogger().warn("Borders on " + getName() + + " non-applicable for table with border-collapse=\"separate\""); + } } /** @@ -85,7 +93,7 @@ public abstract class TableFObj extends FObj { * @return the "border-precedence" value for the given side */ public Numeric getBorderPrecedence(int side) { - switch( side ) { + switch (side) { case CommonBorderPaddingBackground.BEFORE: return borderBeforePrecedence; case CommonBorderPaddingBackground.AFTER: @@ -98,7 +106,7 @@ public abstract class TableFObj extends FObj { return null; } } - + /** * Returns the current column index of the given TableFObj * (overridden for Table, TableBody, TableRow) diff --git a/src/java/org/apache/fop/fo/properties/CommonBorderPaddingBackground.java b/src/java/org/apache/fop/fo/properties/CommonBorderPaddingBackground.java index c4ba929bd..4a92280ff 100755 --- a/src/java/org/apache/fop/fo/properties/CommonBorderPaddingBackground.java +++ b/src/java/org/apache/fop/fo/properties/CommonBorderPaddingBackground.java @@ -366,4 +366,9 @@ public class CommonBorderPaddingBackground implements Cloneable { + getPaddingStart(false, context) + getPaddingEnd(false, context)) > 0); } + /** @return true if there are any borders defined. */ + public boolean hasBorderInfo() { + return (borderInfo[BEFORE] != null || borderInfo[AFTER] != null + || borderInfo[START] != null || borderInfo[END] != null); + } } |