aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org
diff options
context:
space:
mode:
authorAndreas L. Delmelle <adelmelle@apache.org>2006-02-02 23:25:53 +0000
committerAndreas L. Delmelle <adelmelle@apache.org>2006-02-02 23:25:53 +0000
commit9de5004fa69cc3ea8041355838bb99032f4ffa75 (patch)
treedb805a014655cc1eded29c2ca9fd93d25f9d2afa /src/java/org
parent052e1d0874db629865f18c07fe8f19358e580b00 (diff)
downloadxmlgraphics-fop-9de5004fa69cc3ea8041355838bb99032f4ffa75.tar.gz
xmlgraphics-fop-9de5004fa69cc3ea8041355838bb99032f4ffa75.zip
File missing from http://svn.apache.org/viewcvs?rev=374174&view=rev... Thanks, Manuel! :-)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@374541 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org')
-rw-r--r--src/java/org/apache/fop/layoutmgr/BreakingAlgorithm.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/java/org/apache/fop/layoutmgr/BreakingAlgorithm.java b/src/java/org/apache/fop/layoutmgr/BreakingAlgorithm.java
index 6dc013859..4109836e0 100644
--- a/src/java/org/apache/fop/layoutmgr/BreakingAlgorithm.java
+++ b/src/java/org/apache/fop/layoutmgr/BreakingAlgorithm.java
@@ -363,9 +363,11 @@ public abstract class BreakingAlgorithm {
// index of the first KnuthBox in the sequence
int firstBoxIndex = startIndex;
- while (alignment != org.apache.fop.fo.Constants.EN_CENTER
- && ! ((KnuthElement) par.get(firstBoxIndex)).isBox()) {
- firstBoxIndex++;
+ if (alignment != org.apache.fop.fo.Constants.EN_CENTER) {
+ while (par.size() > firstBoxIndex
+ && ! ((KnuthElement) par.get(firstBoxIndex)).isBox()) {
+ firstBoxIndex++;
+ }
}
// create an active node representing the starting point