]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Don't ignore linefeeds when building Knuth elements.
authorJeremias Maerki <jeremias@apache.org>
Wed, 2 Feb 2005 15:03:55 +0000 (15:03 +0000)
committerJeremias Maerki <jeremias@apache.org>
Wed, 2 Feb 2005 15:03:55 +0000 (15:03 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@198365 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/layoutmgr/TextLayoutManager.java

index bc78e15db2cd34e61dcb663e6b701e3a646bd888..186b9c08985ad262dd0acf5e8531fa67dd8218a8 100644 (file)
@@ -788,16 +788,13 @@ public class TextLayoutManager extends AbstractLayoutManager
                 iThisStart = iNextStart;
                 iTempStart = iNextStart;
                 MinOptMax wordIPD = new MinOptMax(0);
-                for (;
-                     iTempStart < textArray.length
-                     && textArray[iTempStart] != SPACE
-                     && textArray[iTempStart] != NBSPACE;
-                     iTempStart ++) {
-                    // ignore newline characters
-                    if (textArray[iTempStart] != NEWLINE) {
-                        wordIPD.add
-                            (new MinOptMax(fs.getCharWidth(textArray[iTempStart])));
-                    }
+                for (; iTempStart < textArray.length
+                        && textArray[iTempStart] != SPACE
+                        && textArray[iTempStart] != NBSPACE
+                        && textArray[iTempStart] != NEWLINE;
+                        iTempStart++) {
+                    wordIPD.add(
+                        new MinOptMax(fs.getCharWidth(textArray[iTempStart])));
                 }
                 wordIPD.add(MinOptMax.multiply(letterSpaceIPD, (iTempStart - iThisStart - 1)));
                 vecAreaInfo.add