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\"");
+ }
}
/**
* @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:
return null;
}
}
-
+
/**
* Returns the current column index of the given TableFObj
* (overridden for Table, TableBody, TableRow)
+ 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);
+ }
}