gmazza 2004/04/06 15:50:44
Modified: src/java/org/apache/fop/fo FOText.java
Log:
Comments added.
Revision Changes Path
1.19 +10 -1 xml-fop/src/java/org/apache/fop/fo/FOText.java
Index: FOText.java
===================================================================
RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/FOText.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- FOText.java 4 Apr 2004 06:29:44 -0000 1.18
+++ FOText.java 6 Apr 2004 22:50:44 -0000 1.19
@@ -443,6 +443,14 @@
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 @@
// 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--;
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]