From 9af562f46cc1aa7d351f26fe5f8fc528d28661e1 Mon Sep 17 00:00:00 2001 From: Glen Mazza Date: Mon, 1 Mar 2004 23:50:26 +0000 Subject: 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 --- src/java/org/apache/fop/fo/FOText.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src/java/org/apache/fop/fo/FOText.java') 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); } -- cgit v1.2.3