aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJeremias Maerki <jeremias@apache.org>2006-03-16 14:15:53 +0000
committerJeremias Maerki <jeremias@apache.org>2006-03-16 14:15:53 +0000
commit4596b5c7e9726ba8fe1dcceff1c403bcd3fadb13 (patch)
treeb7641959face3ee3e23ff31faeaf5defb74061ff /src
parente6d53d8a9c84b6447f3db4b2b36576d418df1a4a (diff)
downloadxmlgraphics-fop-4596b5c7e9726ba8fe1dcceff1c403bcd3fadb13.tar.gz
xmlgraphics-fop-4596b5c7e9726ba8fe1dcceff1c403bcd3fadb13.zip
Fix for ArrayIndexOutOfBoundException in block_white-space_4.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@386339 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r--src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java b/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java
index 3822cbc3a..53c55490d 100644
--- a/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java
+++ b/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java
@@ -744,7 +744,7 @@ public class LineLayoutManager extends InlineStackingLayoutManager
}
if (lastPar != null) {
lastPar.endParagraph();
- ElementListObserver.observe(lastPar, "line", null);
+ ElementListObserver.observe(lastPar, "line", fobj.getId());
if (log.isTraceEnabled()) {
trace.append(" ]");
}
@@ -1641,9 +1641,15 @@ public class LineLayoutManager extends InlineStackingLayoutManager
iEndElement--;
// this returns the same KnuthElement
seqIterator.previous();
- tempElement = (KnuthElement) seqIterator.previous();
+ if (seqIterator.hasPrevious()) {
+ tempElement = (KnuthElement) seqIterator.previous();
+ } else {
+ tempElement = null;
+ }
+ }
+ if (tempElement != null) {
+ lastLM = tempElement.getLayoutManager();
}
- lastLM = tempElement.getLayoutManager();
// ignore KnuthGlue and KnuthPenalty objects
// at the beginning of the line