Quellcode durchsuchen

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
inlineblock
Jeremias Maerki vor 19 Jahren
Ursprung
Commit
7b64dcd926
1 geänderte Dateien mit 7 neuen und 2 gelöschten Zeilen
  1. 7
    2
      src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java

+ 7
- 2
src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java Datei anzeigen

@@ -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);

Laden…
Abbrechen
Speichern