gmazza      2004/02/26 19:21:59

  Modified:    src/java/org/apache/fop/fo FOText.java FObjMixed.java
  Log:
  Some simplification of FOText object.
  
  Revision  Changes    Path
  1.13      +7 -9      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.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- FOText.java       17 Jan 2004 19:29:46 -0000      1.12
  +++ FOText.java       27 Feb 2004 03:21:59 -0000      1.13
  @@ -74,7 +74,6 @@
        * the character array containing the text
        */
       public char[] ca;
  -    public int start;
   
       /**
        * the length of the character array containing the text
  @@ -121,17 +120,16 @@
        *
        * @param chars array of chars which contains the text in this object (may
        * be a superset of the text in this object
  -     * @param s starting index into char[] for the text in this object
  -     * @param e ending index into char[] for 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
        * @param parent FONode that is the parent of this object
        */
  -    public FOText(char[] chars, int s, int e, TextInfo ti, FONode parent) {
  +    public FOText(char[] chars, int start, int end, TextInfo ti, FONode parent) {
           super(parent);
  -        this.start = 0;
  -        this.ca = new char[e - s];
  -        System.arraycopy(chars, s, ca, 0, e - s);
  -        this.length = e - s;
  +        length = end - start;
  +        this.ca = new char[length];
  +        System.arraycopy(chars, start, ca, 0, length);
           textInfo = ti;
           createBlockPointers();
           textTransform();
  @@ -152,7 +150,7 @@
               return true;
           }
   
  -        for (int i = start; i < start + length; i++) {
  +        for (int i = 0; i < length; i++) {
               char ch = ca[i];
               if (!((ch == ' ')
                       || (ch == '\n')
  
  
  
  1.19      +1 -1      xml-fop/src/java/org/apache/fop/fo/FObjMixed.java
  
  Index: FObjMixed.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/FObjMixed.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- FObjMixed.java    26 Dec 2003 22:11:17 -0000      1.18
  +++ FObjMixed.java    27 Feb 2004 03:21:59 -0000      1.19
  @@ -87,7 +87,7 @@
           ft.setName("text");
           
           /* characters() processing empty for FOTreeHandler, not empty for RTF & 
MIFHandlers */
  -        getFOTreeControl().getFOInputHandler().characters(ft.ca, ft.start, 
ft.length);
  +        getFOTreeControl().getFOInputHandler().characters(ft.ca, 0, ft.length);
   
           addChild(ft);
       }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to