]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
spanned grid units may have a different table-row element associated with them. This...
authorJeremias Maerki <jeremias@apache.org>
Wed, 11 May 2005 15:06:43 +0000 (15:06 +0000)
committerJeremias Maerki <jeremias@apache.org>
Wed, 11 May 2005 15:06:43 +0000 (15:06 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_KnuthStylePageBreaking@198612 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/layoutmgr/table/GridUnit.java

index e1ae72984d090fee3227eace7c6835f504efdd86..5b1d85d2b7f8cd9810e4861b0fb72fc5101565be 100644 (file)
@@ -49,6 +49,8 @@ public class GridUnit {
     private PrimaryGridUnit primary;
     /** Table cell which occupies this grid unit */
     private TableCell cell;
+    /** Table row which occupied this grid unit (may be null) */
+    private TableRow row;
     /** Table column that this grid unit belongs to */
     private TableColumn column;
     
@@ -89,13 +91,23 @@ public class GridUnit {
     }
     
     public TableRow getRow() {
-        if (getCell().getParent() instanceof TableRow) {
+        if (this.row != null) {
+            return this.row;
+        } else if (getCell().getParent() instanceof TableRow) {
             return (TableRow)getCell().getParent();
         } else {
             return null;
         }
     }
     
+    /**
+     * Sets the table-row FO, if applicable.
+     * @param rowFO the table-row FO
+     */
+    public void setRow(TableRow rowFO) {
+        this.row = rowFO;
+    }
+
     public TableBody getBody() {
         FONode node = getCell();
         while (node != null && !(node instanceof TableBody)) {