aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/fo/FOText.java
diff options
context:
space:
mode:
authorGlen Mazza <gmazza@apache.org>2004-03-01 23:50:26 +0000
committerGlen Mazza <gmazza@apache.org>2004-03-01 23:50:26 +0000
commit9af562f46cc1aa7d351f26fe5f8fc528d28661e1 (patch)
tree6d445eac13666c2d63d119c6f1ea738d2e360d9d /src/java/org/apache/fop/fo/FOText.java
parentb2efa6c58ea279fb72de84a06b9ce2742b637c85 (diff)
downloadxmlgraphics-fop-9af562f46cc1aa7d351f26fe5f8fc528d28661e1.tar.gz
xmlgraphics-fop-9af562f46cc1aa7d351f26fe5f8fc528d28661e1.zip
1.) Modified TextLayoutManager to take an additional length
parameter, indicating the maximum valid index of the passed-in character array. 2.) Removed from AddLMVisitor (which calls the above class), the re-fitting of the FOText character array to the size of the maximum valid index. 3.) Various small cleanup issues. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@197402 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/fo/FOText.java')
-rw-r--r--src/java/org/apache/fop/fo/FOText.java13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/java/org/apache/fop/fo/FOText.java b/src/java/org/apache/fop/fo/FOText.java
index 549a0fff0..4e0a84de3 100644
--- a/src/java/org/apache/fop/fo/FOText.java
+++ b/src/java/org/apache/fop/fo/FOText.java
@@ -44,7 +44,12 @@ public class FOText extends FObj {
public char[] ca;
/**
- * the length of the character array containing the text
+ * The actual length of the text to be rendered within ca,
+ * starting from position 0 of the array.
+ *
+ * This value is originally equal to ca.length, but becomes decremented
+ * during whitespace removal by the flow.Block class, via the
+ * TextCharIterator.remove() method below.
*/
public int length;
@@ -87,7 +92,7 @@ public class FOText extends FObj {
/**
*
* @param chars array of chars which contains the text in this object (may
- * be a superset of the text in this object
+ * be a superset of the text in this object)
* @param start starting index into char[] for the text in this object
* @param end ending index into char[] for the text in this object
* @param ti TextInfo object for the text in this object
@@ -163,6 +168,10 @@ public class FOText extends FObj {
} else if (curIndex == length) {
curIndex = --length;
}
+// Temporary until leading space problem in 1.0 fixed
+// System.out.println("\n\nremove called: ca = \"" +
+// new String(ca) + "\", length/node length: " + length
+// + ", " + ca.length);
}