aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/layoutmgr/table/RowGroupLayoutManager.java
diff options
context:
space:
mode:
authorVincent Hennebert <vhennebert@apache.org>2008-02-13 18:11:06 +0000
committerVincent Hennebert <vhennebert@apache.org>2008-02-13 18:11:06 +0000
commit71ecb950fba8d7134c912acda3a75845930099cb (patch)
treeed9a24ff0a999ae534c2757f3845bb8bc8d41ac6 /src/java/org/apache/fop/layoutmgr/table/RowGroupLayoutManager.java
parentea691f9d34c8b1757f36f2dcecf520b3ffe3e27e (diff)
downloadxmlgraphics-fop-71ecb950fba8d7134c912acda3a75845930099cb.tar.gz
xmlgraphics-fop-71ecb950fba8d7134c912acda3a75845930099cb.zip
Added support for breaks before and after table cells
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@627553 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/layoutmgr/table/RowGroupLayoutManager.java')
-rw-r--r--src/java/org/apache/fop/layoutmgr/table/RowGroupLayoutManager.java14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/java/org/apache/fop/layoutmgr/table/RowGroupLayoutManager.java b/src/java/org/apache/fop/layoutmgr/table/RowGroupLayoutManager.java
index 6d66da097..0127f4d81 100644
--- a/src/java/org/apache/fop/layoutmgr/table/RowGroupLayoutManager.java
+++ b/src/java/org/apache/fop/layoutmgr/table/RowGroupLayoutManager.java
@@ -40,6 +40,7 @@ import org.apache.fop.layoutmgr.LayoutContext;
import org.apache.fop.layoutmgr.ListElement;
import org.apache.fop.layoutmgr.MinOptMaxUtil;
import org.apache.fop.traits.MinOptMax;
+import org.apache.fop.util.BreakUtil;
class RowGroupLayoutManager {
@@ -66,11 +67,13 @@ class RowGroupLayoutManager {
*/
int getBreakBefore() {
TableRow rowFO = rowGroup[0].getTableRow();
+ int breakBefore;
if (rowFO == null) {
- return Constants.EN_AUTO;
+ breakBefore = Constants.EN_AUTO;
} else {
- return rowFO.getBreakBefore();
+ breakBefore = rowFO.getBreakBefore();
}
+ return BreakUtil.compareBreakClasses(breakBefore, rowGroup[0].getBreakBefore());
}
/**
@@ -81,11 +84,14 @@ class RowGroupLayoutManager {
*/
int getBreakAfter() {
TableRow rowFO = rowGroup[rowGroup.length - 1].getTableRow();
+ int breakAfter;
if (rowFO == null) {
- return Constants.EN_AUTO;
+ breakAfter = Constants.EN_AUTO;
} else {
- return rowFO.getBreakAfter();
+ breakAfter = rowFO.getBreakAfter();
}
+ return BreakUtil.compareBreakClasses(breakAfter,
+ rowGroup[rowGroup.length - 1].getBreakAfter());
}
public LinkedList getNextKnuthElements(LayoutContext context, int alignment, int bodyType) {