diff options
author | Jeremias Maerki <jeremias@apache.org> | 2005-02-09 15:38:15 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2005-02-09 15:38:15 +0000 |
commit | 08fb5bab03609f9513474df98745b6df5c419f4c (patch) | |
tree | 9b12ef82a2af7c18a100626a97820ccd35bd9d2a /src/java/org/apache/fop/fo/flow | |
parent | 62b003446fb39b929141b5ecbfee5e278497be6f (diff) | |
download | xmlgraphics-fop-08fb5bab03609f9513474df98745b6df5c419f4c.tar.gz xmlgraphics-fop-08fb5bab03609f9513474df98745b6df5c419f4c.zip |
No longer fail when no table-columns are defined. The table creates a "default column" which is used to handle any defaults and inheritance.
The columns list is populated with at least the default column.
The first row is not yet inspected for determining column widths as described in fixed table layout. (see comment in code)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@198407 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/fo/flow')
-rw-r--r-- | src/java/org/apache/fop/fo/flow/Table.java | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/java/org/apache/fop/fo/flow/Table.java b/src/java/org/apache/fop/fo/flow/Table.java index ebaa0ce1f..d82a14631 100644 --- a/src/java/org/apache/fop/fo/flow/Table.java +++ b/src/java/org/apache/fop/fo/flow/Table.java @@ -24,6 +24,7 @@ import org.apache.fop.apps.FOPException; import org.apache.fop.fo.FONode; import org.apache.fop.fo.FObj; import org.apache.fop.fo.PropertyList; +import org.apache.fop.fo.StaticPropertyList; import org.apache.fop.fo.properties.CommonAccessibility; import org.apache.fop.fo.properties.CommonAural; import org.apache.fop.fo.properties.CommonBorderPaddingBackground; @@ -73,6 +74,11 @@ public class Table extends FObj { private TableBody tableHeader = null; private TableBody tableFooter = null; + /** + * Default table-column used when no columns are specified. It is used + * to handle inheritance (especially visibility) and defaults properly. */ + private TableColumn defaultColumn; + /** * @param parent FONode that is the parent of this object */ @@ -110,6 +116,12 @@ public class Table extends FObj { tableOmitHeaderAtBreak = pList.get(PR_TABLE_OMIT_HEADER_AT_BREAK).getEnum(); //width = pList.get(PR_WIDTH).getLength(); writingMode = pList.get(PR_WRITING_MODE).getEnum(); + + //Create default column in case no table-columns will be defined. + defaultColumn = new TableColumn(this); + PropertyList colPList = new StaticPropertyList(defaultColumn, pList); + colPList.setWritingMode(); + defaultColumn.bind(colPList); } /** @@ -151,6 +163,11 @@ public class Table extends FObj { return (tableLayout != EN_FIXED); } + /** @return the default table column */ + public TableColumn getDefaultColumn() { + return this.defaultColumn; + } + public List getColumns() { return columns; } |