aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache
diff options
context:
space:
mode:
authorAndreas L. Delmelle <adelmelle@apache.org>2005-09-23 19:33:04 +0000
committerAndreas L. Delmelle <adelmelle@apache.org>2005-09-23 19:33:04 +0000
commit85d86accdbe79182fbfdea5407e96e9d3de0be47 (patch)
tree70c284bba29fd5870fc45be23e90d27f16db8aac /src/java/org/apache
parent0af742ffbc9e8c5d9dc67c24f1a196f49f3f8063 (diff)
downloadxmlgraphics-fop-85d86accdbe79182fbfdea5407e96e9d3de0be47.tar.gz
xmlgraphics-fop-85d86accdbe79182fbfdea5407e96e9d3de0be47.zip
Added warning for non-applicable borders in case of separate border-model
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@291194 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache')
-rw-r--r--src/java/org/apache/fop/fo/flow/TableFObj.java12
-rwxr-xr-xsrc/java/org/apache/fop/fo/properties/CommonBorderPaddingBackground.java5
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);
+ }
}