aboutsummaryrefslogtreecommitdiffstats
path: root/src/org/apache
diff options
context:
space:
mode:
authorKeiron Liddle <keiron@apache.org>2001-03-05 04:39:57 +0000
committerKeiron Liddle <keiron@apache.org>2001-03-05 04:39:57 +0000
commit928450b7cb2d899aef957ebec1ebeba91e418fc4 (patch)
tree1ef945d8ab2a4e21e427208bb2b61202e2aa98d3 /src/org/apache
parent32c745130d82702725531583967fab3466bb345a (diff)
downloadxmlgraphics-fop-928450b7cb2d899aef957ebec1ebeba91e418fc4.tar.gz
xmlgraphics-fop-928450b7cb2d899aef957ebec1ebeba91e418fc4.zip
properly adjusts the max height of table parts
when a footnote is added table will not overlap with the footnote git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194138 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/org/apache')
-rw-r--r--src/org/apache/fop/fo/flow/Block.java3
-rw-r--r--src/org/apache/fop/fo/flow/Table.java3
-rw-r--r--src/org/apache/fop/fo/flow/TableBody.java2
-rw-r--r--src/org/apache/fop/fo/flow/TableCell.java2
-rw-r--r--src/org/apache/fop/fo/flow/TableRow.java3
5 files changed, 13 insertions, 0 deletions
diff --git a/src/org/apache/fop/fo/flow/Block.java b/src/org/apache/fop/fo/flow/Block.java
index 62ff92594..582a79091 100644
--- a/src/org/apache/fop/fo/flow/Block.java
+++ b/src/org/apache/fop/fo/flow/Block.java
@@ -257,6 +257,9 @@ public class Block extends FObjMixed {
}
blockArea.end();
+
+ area.setMaxHeight(area.getMaxHeight() - spaceLeft + blockArea.getMaxHeight());
+
area.addChild(blockArea);
/* should this be combined into above? */
diff --git a/src/org/apache/fop/fo/flow/Table.java b/src/org/apache/fop/fo/flow/Table.java
index 3c4afdf77..1cc52e316 100644
--- a/src/org/apache/fop/fo/flow/Table.java
+++ b/src/org/apache/fop/fo/flow/Table.java
@@ -155,6 +155,7 @@ public class Table extends FObj {
area.getIDReferences().configureID(id, area);
}
+ int spaceLeft = area.spaceLeft();
this.areaContainer =
new AreaContainer(propMgr.getFontState(area.getFontInfo()), 0, 0, area.getAllocationWidth(),
area.spaceLeft(), Position.STATIC);
@@ -223,6 +224,7 @@ public class Table extends FObj {
}
addedHeader = true;
tableHeader.resetMarker();
+ area.setMaxHeight(area.getMaxHeight() - spaceLeft + this.areaContainer.getMaxHeight());
}
if (tableFooter != null && !this.omitFooterAtBreak && !addedFooter) {
if ((status = tableFooter.layout(areaContainer)).
@@ -271,6 +273,7 @@ public class Table extends FObj {
} else {
bodyCount++;
}
+ area.setMaxHeight(area.getMaxHeight() - spaceLeft + this.areaContainer.getMaxHeight());
if (tableFooter != null && !this.omitFooterAtBreak) {
// move footer to bottom of area and move up body
// space before and after footer will make this wrong
diff --git a/src/org/apache/fop/fo/flow/TableBody.java b/src/org/apache/fop/fo/flow/TableBody.java
index c9e6b28d0..83a7f5f0b 100644
--- a/src/org/apache/fop/fo/flow/TableBody.java
+++ b/src/org/apache/fop/fo/flow/TableBody.java
@@ -143,6 +143,7 @@ public class TableBody extends FObj {
area.getIDReferences().configureID(id, area);
}
+ int spaceLeft = area.spaceLeft();
this.areaContainer = new AreaContainer(propMgr.getFontState(area.getFontInfo()),
-area.getBorderLeftWidth(),
-area.getBorderTopWidth() + area.getHeight(),
@@ -260,6 +261,7 @@ public class TableBody extends FObj {
endKeepGroup = true;
}
lastRow = row;
+ area.setMaxHeight(area.getMaxHeight() - spaceLeft + this.areaContainer.getMaxHeight());
}
area.addChild(areaContainer);
areaContainer.end();
diff --git a/src/org/apache/fop/fo/flow/TableCell.java b/src/org/apache/fop/fo/flow/TableCell.java
index 311fca76e..097ebd56a 100644
--- a/src/org/apache/fop/fo/flow/TableCell.java
+++ b/src/org/apache/fop/fo/flow/TableCell.java
@@ -163,6 +163,7 @@ public class TableCell extends FObj {
area.getIDReferences().configureID(id,area);
}
+ int spaceLeft = area.spaceLeft();
this.areaContainer =
new AreaContainer(propMgr.getFontState(area.getFontInfo()),
startOffset - area.getBorderLeftWidth(),
@@ -195,6 +196,7 @@ public class TableCell extends FObj {
return new Status(Status.AREA_FULL_SOME);
}
}
+ area.setMaxHeight(area.getMaxHeight() - spaceLeft + this.areaContainer.getMaxHeight());
}
areaContainer.end();
area.addChild(areaContainer);
diff --git a/src/org/apache/fop/fo/flow/TableRow.java b/src/org/apache/fop/fo/flow/TableRow.java
index 063eec1d9..83387d450 100644
--- a/src/org/apache/fop/fo/flow/TableRow.java
+++ b/src/org/apache/fop/fo/flow/TableRow.java
@@ -324,6 +324,7 @@ public class TableRow extends FObj {
area.getIDReferences().configureID(id, area);
}
+ int spaceLeft = area.spaceLeft();
this.areaContainer = new AreaContainer(propMgr.getFontState(area.getFontInfo()),
-area.getBorderLeftWidth(),
-area.getBorderTopWidth(), area.getAllocationWidth(),
@@ -473,6 +474,8 @@ public class TableRow extends FObj {
}
}
+ area.setMaxHeight(area.getMaxHeight() - spaceLeft + this.areaContainer.getMaxHeight());
+
for (int i = 0; i < numChildren; i++) {
TableCell cell = (TableCell) children.elementAt(i);
cell.setRowHeight(largestCellHeight);