]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
properly adjusts the max height of table parts
authorKeiron Liddle <keiron@apache.org>
Mon, 5 Mar 2001 04:39:57 +0000 (04:39 +0000)
committerKeiron Liddle <keiron@apache.org>
Mon, 5 Mar 2001 04:39:57 +0000 (04:39 +0000)
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

src/org/apache/fop/fo/flow/Block.java
src/org/apache/fop/fo/flow/Table.java
src/org/apache/fop/fo/flow/TableBody.java
src/org/apache/fop/fo/flow/TableCell.java
src/org/apache/fop/fo/flow/TableRow.java

index 62ff92594f8d7c46054b60f2b6d2e6ae56733279..582a79091d13699ef757ff24abc6067bcaa652da 100644 (file)
@@ -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? */
index 3c4afdf779160d9c932412173f318ab13f1b03c9..1cc52e316095722f0e733862a4cb4b4b57b1a6da 100644 (file)
@@ -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
index c9e6b28d0b7e2f0f59bacf894eee9ced1487cda1..83a7f5f0beae612505e5ff4e32509a1f38830b3d 100644 (file)
@@ -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();
index 311fca76ecf9c0ed818384ea8198f5a507b73baf..097ebd56a702ee682150bb154698f0b10b399f4d 100644 (file)
@@ -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);
index 063eec1d950fc8e6c0beb1cf78d66d8c65deb0a8..83387d450e349262ee4f40909484ebd806c5b7d2 100644 (file)
@@ -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);