diff options
author | Vincent Hennebert <vhennebert@apache.org> | 2007-04-18 08:46:58 +0000 |
---|---|---|
committer | Vincent Hennebert <vhennebert@apache.org> | 2007-04-18 08:46:58 +0000 |
commit | 3839d6c734c46c4a209c2a81df2a1609c18952c9 (patch) | |
tree | 6dcc6b24ceafc7d1ebe913a58e0ec26c21b7bbe9 /src/java/org/apache/fop/layoutmgr | |
parent | 0db11afe48c6548319e0f0890d1c6ac4b0403cce (diff) | |
download | xmlgraphics-fop-3839d6c734c46c4a209c2a81df2a1609c18952c9.tar.gz xmlgraphics-fop-3839d6c734c46c4a209c2a81df2a1609c18952c9.zip |
Replace the array of forced breaks with a single boolean, which should be enough.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@529920 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/layoutmgr')
-rw-r--r-- | src/java/org/apache/fop/layoutmgr/table/TableStepper.java | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/src/java/org/apache/fop/layoutmgr/table/TableStepper.java b/src/java/org/apache/fop/layoutmgr/table/TableStepper.java index 589d00b8f..1415c628a 100644 --- a/src/java/org/apache/fop/layoutmgr/table/TableStepper.java +++ b/src/java/org/apache/fop/layoutmgr/table/TableStepper.java @@ -85,7 +85,7 @@ public class TableStepper { private boolean rowBacktrackForLastStep; private boolean skippedStep; private boolean[] keepWithNextSignals; - private boolean[] forcedBreaks; + private boolean forcedBreak; private int lastMaxPenaltyLength; /** @@ -115,21 +115,15 @@ public class TableStepper { borderAfter = new int[columnCount]; paddingAfter = new int[columnCount]; keepWithNextSignals = new boolean[columnCount]; - forcedBreaks = new boolean[columnCount]; Arrays.fill(end, -1); } private void clearBreakCondition() { - Arrays.fill(forcedBreaks, false); + forcedBreak = false; } private boolean isBreakCondition() { - for (int i = 0; i < columnCount; i++) { - if (forcedBreaks[i]) { - return true; - } - } - return false; + return forcedBreak; } /** @@ -220,7 +214,6 @@ public class TableStepper { widths[column] = 0; startRow[column] = activeRowIndex; keepWithNextSignals[column] = false; - forcedBreaks[column] = false; } else if (gu.isPrimary()) { PrimaryGridUnit pgu = (PrimaryGridUnit)gu; boolean makeBoxForWholeRow = false; @@ -266,7 +259,6 @@ public class TableStepper { widths[column] = 0; startRow[column] = activeRowIndex; keepWithNextSignals[column] = false; - forcedBreaks[column] = false; } } @@ -536,7 +528,7 @@ public class TableStepper { this.lastMaxPenaltyLength = Math.max(this.lastMaxPenaltyLength, el.getW()); if (el.getP() <= -KnuthElement.INFINITE) { log.debug("FORCED break encountered!"); - forcedBreaks[i] = true; + forcedBreak = true; break; } else if (el.getP() < KnuthElement.INFINITE) { //First legal break point |