xmlgraphics-fop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jerem...@apache.org
Subject svn commit: r230807 - /xmlgraphics/fop/branches/inlineblock/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java
Date Mon, 08 Aug 2005 14:29:53 GMT
Author: jeremias
Date: Mon Aug  8 07:29:49 2005
New Revision: 230807

URL: http://svn.apache.org/viewcvs?rev=230807&view=rev
Log:
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.

Modified:
    xmlgraphics/fop/branches/inlineblock/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java

Modified: xmlgraphics/fop/branches/inlineblock/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/branches/inlineblock/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java?rev=230807&r1=230806&r2=230807&view=diff
==============================================================================
--- xmlgraphics/fop/branches/inlineblock/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java
(original)
+++ xmlgraphics/fop/branches/inlineblock/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java
Mon Aug  8 07:29:49 2005
@@ -596,8 +596,12 @@
                 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 @@
         // 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);



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org


Mime
View raw message