]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Keep is now a compound property
authorKaren Lease <klease@apache.org>
Tue, 2 Jan 2001 21:40:47 +0000 (21:40 +0000)
committerKaren Lease <klease@apache.org>
Tue, 2 Jan 2001 21:40:47 +0000 (21:40 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@193942 13f79535-47bb-0310-9956-ffa450edef68

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

index a7e7f571d3c811e6f8de2345a1ad7bf1e517a7f5..92a5a967c8a5edf0cc223f536484ae39beda83a8 100644 (file)
@@ -314,10 +314,8 @@ public class TableRow extends FObj {
             this.borderRightStyle =
               this.properties.get("border-right-style").getEnum();
         }
-        this.keepWithNext = this.properties.get(
-                              "keep-with-next").getNumber().intValue();
-        this.keepWithPrevious = this.properties.get(
-                                  "keep-with-previous").getNumber().intValue();
+        this.keepWithNext = getKeepValue("keep-with-next.within-column");
+        this.keepWithPrevious = getKeepValue("keep-with-previous.within-column");
         this.paddingTop =
           this.properties.get("padding").getLength().mvalue();
         this.paddingLeft = this.paddingTop;
@@ -337,6 +335,14 @@ public class TableRow extends FObj {
         setup = true;
     }
 
+    private int getKeepValue(String sPropName) {
+        Property p= this.properties.get(sPropName);
+        Number n = p.getNumber();
+        if (n != null)
+            return n.intValue();
+        else return p.getEnum();
+    }
+
     public Status layout(Area area) throws FOPException {
         boolean configID = false;