From ef50b3925624a844a1a7d053201496857d8b813e Mon Sep 17 00:00:00 2001 From: Karen Lease Date: Tue, 2 Jan 2001 21:40:47 +0000 Subject: [PATCH] Keep is now a compound property 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 | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/org/apache/fop/fo/flow/TableRow.java b/src/org/apache/fop/fo/flow/TableRow.java index a7e7f571d..92a5a967c 100644 --- a/src/org/apache/fop/fo/flow/TableRow.java +++ b/src/org/apache/fop/fo/flow/TableRow.java @@ -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; -- 2.39.5