]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Fix body positioning; remove widow and orhpan handling for rows
authorKaren Lease <klease@apache.org>
Fri, 20 Apr 2001 21:00:31 +0000 (21:00 +0000)
committerKaren Lease <klease@apache.org>
Fri, 20 Apr 2001 21:00:31 +0000 (21:00 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194219 13f79535-47bb-0310-9956-ffa450edef68

src/org/apache/fop/fo/flow/TableBody.java

index edb774fbe89b77704f9aae6caf43677fb2bd0f84..408be1e560bc51c8b6df71a926705012de678b47 100644 (file)
@@ -153,7 +153,7 @@ public class TableBody extends FObj {
                                 */
                                this.areaContainer =
                                                new AreaContainer(propMgr.getFontState(area.getFontInfo()),
-                                                                                                                       0,area.getHeight(),
+                                                                                                                       0,area.getContentHeight(),
                                                                                                                        area.getContentWidth(), // IPD
                                                                                                                        area.spaceLeft(),
                                                                                                                        Position.RELATIVE);
@@ -220,38 +220,38 @@ public class TableBody extends FObj {
                                                                                }
                                                                }
                                                                this.marker = i;
-                                                               if ((i != 0) &&
+                                                               if ((i != 0) &&
                                                                                                (status.getCode() == Status.AREA_FULL_NONE)) {
                                                                                status = new Status(Status.AREA_FULL_SOME);
                                                                }
-                                                               if (i < widows && numChildren >= widows) {
-                                                                               resetMarker();
-                                                                               return new Status(Status.AREA_FULL_NONE);
-                                                               }
-                                                               if (numChildren <= orphans) {
-                                                                               resetMarker();
-                                                                               return new Status(Status.AREA_FULL_NONE);
-                                                               }
-                                                               if (numChildren - i < orphans && numChildren >= orphans) {
-                                                                               for (int count = i;
-                                                                                                               count > numChildren - orphans - 1; count--) {
-                                                                                               row = (TableRow) children.elementAt(count);
-                                                                                               row.removeLayout(areaContainer);
-                                                                                               i--;
-                                                                               }
-                                                                               if (i < widows && numChildren >= widows) {
-                                                                                               resetMarker();
-                                                                                               return new Status(Status.AREA_FULL_NONE);
-                                                                               }
-                                                                               this.marker = i;
-                                                                               area.addChild(areaContainer);
-                                                                               //areaContainer.end();
-
-                                                                               area.increaseHeight(areaContainer.getHeight());
-                                                                               area.setAbsoluteHeight(
-                                                                                       areaContainer.getAbsoluteHeight());
-                                                                               return new Status(Status.AREA_FULL_SOME);
-                                                               }
+//                                                             if (i < widows && numChildren >= widows) {
+//                                                                             resetMarker();
+//                                                                             return new Status(Status.AREA_FULL_NONE);
+//                                                             }
+//                                                             if (numChildren <= orphans) {
+//                                                                             resetMarker();
+//                                                                             return new Status(Status.AREA_FULL_NONE);
+//                                                             }
+//                                                             if (numChildren - i < orphans && numChildren >= orphans) {
+//                                                                             for (int count = i;
+//                                                                                                             count > numChildren - orphans - 1; count--) {
+//                                                                                             row = (TableRow) children.elementAt(count);
+//                                                                                             row.removeLayout(areaContainer);
+//                                                                                             i--;
+//                                                                             }
+//                                                                             if (i < widows && numChildren >= widows) {
+//                                                                                             resetMarker();
+//                                                                                             return new Status(Status.AREA_FULL_NONE);
+//                                                                             }
+//                                                                             this.marker = i;
+//                                                                             area.addChild(areaContainer);
+//                                                                             //areaContainer.end();
+
+//                                                                             area.increaseHeight(areaContainer.getHeight());
+//                                                                             area.setAbsoluteHeight(
+//                                                                                     areaContainer.getAbsoluteHeight());
+//                                                                             return new Status(Status.AREA_FULL_SOME);
+//                                                             }
                                                                if (!((i == 0) &&
                                                                                                (areaContainer.getContentHeight() <= 0))) {
                                                                                area.addChild(areaContainer);