diff options
author | Glen Mazza <gmazza@apache.org> | 2004-04-06 22:50:44 +0000 |
---|---|---|
committer | Glen Mazza <gmazza@apache.org> | 2004-04-06 22:50:44 +0000 |
commit | a384db0b1c91bf7f75c5ce8cf8ca621b18206e1e (patch) | |
tree | 564ccbfdd1b30e7a3c4ec562ffd49cfa14c94485 /src/java/org/apache | |
parent | 4137a75bd6946e5e04c90aa78998af18ade7430e (diff) | |
download | xmlgraphics-fop-a384db0b1c91bf7f75c5ce8cf8ca621b18206e1e.tar.gz xmlgraphics-fop-a384db0b1c91bf7f75c5ce8cf8ca621b18206e1e.zip |
Comments added.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@197492 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache')
-rw-r--r-- | src/java/org/apache/fop/fo/FOText.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/java/org/apache/fop/fo/FOText.java b/src/java/org/apache/fop/fo/FOText.java index ad203a5ab..37a032d20 100644 --- a/src/java/org/apache/fop/fo/FOText.java +++ b/src/java/org/apache/fop/fo/FOText.java @@ -443,6 +443,14 @@ public class FOText extends FObj { private class TextCharIterator extends AbstractCharIterator { private int curIndex = 0; + + /* Current space removal process: just increment the startIndex + to "remove" leading spaces from ca, until an unremoved character + is found. Then perform arraycopy's to remove extra spaces + between words. nextCharCalled is used to determine if an + unremoved character has already been found--if its value > 2 + than it means that has occurred (it is reset to zero each time we + remove a space via incrementing the startIndex.) */ private int nextCharCalled = 0; public boolean hasNext() { @@ -476,7 +484,8 @@ public class FOText extends FObj { // System.out.println("removeB: " + new String(ca, startIndex, endIndex - startIndex)); } else if (curIndex == endIndex) { // System.out.println("removeC: " + new String(ca, startIndex, endIndex - startIndex)); - curIndex = --endIndex; + endIndex--; + curIndex--; } } |