aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/fo/flow/table/PrimaryGridUnit.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/org/apache/fop/fo/flow/table/PrimaryGridUnit.java')
-rw-r--r--src/java/org/apache/fop/fo/flow/table/PrimaryGridUnit.java9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/java/org/apache/fop/fo/flow/table/PrimaryGridUnit.java b/src/java/org/apache/fop/fo/flow/table/PrimaryGridUnit.java
index 2f2cd940e..ae8db7ba7 100644
--- a/src/java/org/apache/fop/fo/flow/table/PrimaryGridUnit.java
+++ b/src/java/org/apache/fop/fo/flow/table/PrimaryGridUnit.java
@@ -24,6 +24,7 @@ import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.apache.fop.layoutmgr.ElementListUtils;
import org.apache.fop.layoutmgr.table.TableCellLayoutManager;
/**
@@ -142,13 +143,11 @@ public class PrimaryGridUnit extends GridUnit {
return getHalfMaxBeforeBorderWidth() + getHalfMaxAfterBorderWidth();
}
- /** @param value The length of the cell content to remember. */
- public void setContentLength(int value) {
- this.contentLength = value;
- }
-
/** @return the length of the cell content. */
public int getContentLength() {
+ if (contentLength < 0) {
+ contentLength = ElementListUtils.calcContentLength(elements);
+ }
return contentLength;
}