diff options
author | Jeremias Maerki <jeremias@apache.org> | 2005-05-25 19:16:00 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2005-05-25 19:16:00 +0000 |
commit | a4bbb9175e15edeae6aad447f1fabd06e0d1a8d9 (patch) | |
tree | 25b511b5cc427fc35b49f6e843449128c6d4dd10 /src/java/org/apache/fop/layoutmgr/list | |
parent | 5675f8f08a2ee013f8a23a166923251cbf37231b (diff) | |
download | xmlgraphics-fop-a4bbb9175e15edeae6aad447f1fabd06e0d1a8d9.tar.gz xmlgraphics-fop-a4bbb9175e15edeae6aad447f1fabd06e0d1a8d9.zip |
A glue at the beginning of the element list can't be a legal break point. Fixes an ArrayIndexOutOfBounds when there's a space-before at the beginning of the list.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@198689 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/layoutmgr/list')
-rw-r--r-- | src/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java b/src/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java index 05efd5548..06da89d4b 100644 --- a/src/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java @@ -304,10 +304,12 @@ public class ListItemLayoutManager extends BlockStackingLayoutManager { break; } } else if (el.isGlue()) { - KnuthElement prev = (KnuthElement)elementLists[i].get(end[i] - 1); - if (prev.isBox()) { - //Second legal break point - break; + if (end[i] > 0) { + KnuthElement prev = (KnuthElement)elementLists[i].get(end[i] - 1); + if (prev.isBox()) { + //Second legal break point + break; + } } partialHeights[i] += el.getW(); } else { |