diff options
author | Jeremias Maerki <jeremias@apache.org> | 2005-08-08 14:29:49 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2005-08-08 14:29:49 +0000 |
commit | 7b64dcd92692ae430fba6376a251243627cfe03f (patch) | |
tree | 32789e56754c786e24d5a05746bf91662ead2a9c | |
parent | e3c695d89ae33ef23b1dcafdfdcb52ee6e0f90f9 (diff) | |
download | xmlgraphics-fop-7b64dcd92692ae430fba6376a251243627cfe03f.tar.gz xmlgraphics-fop-7b64dcd92692ae430fba6376a251243627cfe03f.zip |
Bugfix: Remove empty sequence at the end.
Bugfix: Don't check the "sequence" variable but the "returnList" variable for size() > 0. This ate up text.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/inlineblock@230807 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java b/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java index 77a70e9bf..77d560df1 100644 --- a/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java @@ -596,8 +596,12 @@ public class TextLayoutManager extends LeafNodeLayoutManager { iNextStart = iTempStart; } } // end of while + if (((List)returnList.getLast()).size() == 0) { + //Remove an empty sequence because of a trailing newline + returnList.removeLast(); + } setFinished(true); - if (sequence.size() > 0) { + if (returnList.size() > 0) { return returnList; } else { return null; @@ -609,7 +613,8 @@ public class TextLayoutManager extends LeafNodeLayoutManager { // look at the Position stored in the first element in oldList // which is always a box ListIterator oldListIterator = oldList.listIterator(); - LeafPosition pos = (LeafPosition) ((KnuthBox) oldListIterator.next()).getPosition(); + KnuthElement el = (KnuthElement)oldListIterator.next(); + LeafPosition pos = (LeafPosition) ((KnuthBox) el).getPosition(); AreaInfo ai = (AreaInfo) vecAreaInfo.get(pos.getLeafPos()); ai.iLScount ++; ai.ipdArea.add(letterSpaceIPD); |