You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by je...@apache.org on 2005/08/30 14:57:47 UTC

svn commit: r264773 - /xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java

Author: jeremias
Date: Tue Aug 30 05:57:44 2005
New Revision: 264773

URL: http://svn.apache.org/viewcvs?rev=264773&view=rev
Log:
Fix for ClassCastException as shown in text-align2 (Reported by Lawrence Michel).
Wrong alignment was taken to remove trailing spaces.

Modified:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java?rev=264773&r1=264772&r2=264773&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java Tue Aug 30 05:57:44 2005
@@ -279,7 +279,7 @@
             KnuthElement removedElement;
             while (this.size() > ignoreAtStart
                    && ((KnuthElement) this.get(this.size() - 1)).isGlue()) {
-                if (textAlignment == EN_CENTER) {
+                if (textAlignmentLast == EN_CENTER) {
                     // centered text: the pattern is
                     //     <glue> <penaly> <glue> <box> <penaly> <glue>
                     removedElement = (KnuthGlue) this.remove(this.size() - 1);
@@ -288,7 +288,7 @@
                     removedElement = (KnuthGlue) this.remove(this.size() - 1);
                     removedElement = (KnuthPenalty) this.remove(this.size() - 1);
                     removedElement = (KnuthGlue) this.remove(this.size() - 1);
-                } else if (textAlignment == EN_START || textAlignment == EN_END) {
+                } else if (textAlignmentLast == EN_START || textAlignmentLast == EN_END) {
                     // left- or right-aligned text: the pattern is
                     //     <glue> <penalty> <glue>
                     removedElement = (KnuthGlue) this.remove(this.size() - 1);
@@ -1411,7 +1411,6 @@
                     break;
                 }
             }
-
             // collect word fragments, ignoring auxiliary elements;
             // each word fragment was created by a different TextLM
             if (firstElement.isBox() && !firstElement.isAuxiliary()) {



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