aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org
diff options
context:
space:
mode:
authorJeremias Maerki <jeremias@apache.org>2006-05-15 09:59:59 +0000
committerJeremias Maerki <jeremias@apache.org>2006-05-15 09:59:59 +0000
commitc5f8b9642c009eb912a9543ae27a879c5e9a8b72 (patch)
treecccaa96c13b73016b966434a36337010e4169977 /src/java/org
parent0af60bb3783baacbef97cbf7eb7f67fbe9896841 (diff)
downloadxmlgraphics-fop-c5f8b9642c009eb912a9543ae27a879c5e9a8b72.tar.gz
xmlgraphics-fop-c5f8b9642c009eb912a9543ae27a879c5e9a8b72.zip
Bugfix: tables nested in inline elements caused a NullPointerException.
Furthermore, keep-together handling was not appropriate when a table is nested in an inline (fixes a ClassCastException). Finally, TableContentPosition did not indicate that it generates area which made them be ignored by the InlineLM. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@406596 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org')
-rw-r--r--src/java/org/apache/fop/layoutmgr/table/TableContentLayoutManager.java5
-rw-r--r--src/java/org/apache/fop/layoutmgr/table/TableLayoutManager.java12
2 files changed, 6 insertions, 11 deletions
diff --git a/src/java/org/apache/fop/layoutmgr/table/TableContentLayoutManager.java b/src/java/org/apache/fop/layoutmgr/table/TableContentLayoutManager.java
index 9c3e89780..3c6b7c6f2 100644
--- a/src/java/org/apache/fop/layoutmgr/table/TableContentLayoutManager.java
+++ b/src/java/org/apache/fop/layoutmgr/table/TableContentLayoutManager.java
@@ -1127,6 +1127,11 @@ public class TableContentLayoutManager implements PercentBaseContext {
}
}
+ /** @see org.apache.fop.layoutmgr.Position#generatesAreas() */
+ public boolean generatesAreas() {
+ return true;
+ }
+
/** @see java.lang.Object#toString() */
public String toString() {
StringBuffer sb = new StringBuffer("TableContentPosition:");
diff --git a/src/java/org/apache/fop/layoutmgr/table/TableLayoutManager.java b/src/java/org/apache/fop/layoutmgr/table/TableLayoutManager.java
index a50cf1317..2810401ae 100644
--- a/src/java/org/apache/fop/layoutmgr/table/TableLayoutManager.java
+++ b/src/java/org/apache/fop/layoutmgr/table/TableLayoutManager.java
@@ -61,7 +61,6 @@ public class TableLayoutManager extends BlockStackingLayoutManager
private Block curBlockArea;
- private int referenceBPD;
private double tableUnits;
private boolean autoLayout = true;
@@ -156,7 +155,6 @@ public class TableLayoutManager extends BlockStackingLayoutManager
}
}
- referenceBPD = context.getStackLimit().opt;
referenceIPD = context.getRefIPD();
if (getTable().getInlineProgressionDimension().getOptimum(this).getEnum() != EN_AUTO) {
@@ -449,7 +447,7 @@ public class TableLayoutManager extends BlockStackingLayoutManager
*/
public boolean mustKeepTogether() {
//TODO Keeps will have to be more sophisticated sooner or later
- return ((BlockLevelLayoutManager)getParent()).mustKeepTogether()
+ return super.mustKeepTogether()
|| !getTable().getKeepTogether().getWithinPage().isAuto()
|| !getTable().getKeepTogether().getWithinColumn().isAuto();
}
@@ -495,14 +493,6 @@ public class TableLayoutManager extends BlockStackingLayoutManager
}
}
- /**
- * Returns the BPD of the content area
- * @return the BPD of the content area
- */
- public int getContentAreaBPD() {
- return referenceBPD;
- }
-
/** @see org.apache.fop.layoutmgr.ConditionalElementListener */
public void notifySpace(RelSide side, MinOptMax effectiveLength) {
if (RelSide.BEFORE == side) {