pietsch     2002/07/16 13:04:44

  Modified:    src/org/apache/fop/extensions Tag: fop-0_20_2-maintain
                        Label.java
               src/org/apache/fop/fo Tag: fop-0_20_2-maintain XMLObj.java
  Log:
  Fixed some remaining problems with the TextBuffer patch for
  FObjMixed
  Slightly Optimized extensions.Label
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.2.2.1   +8 -5      xml-fop/src/org/apache/fop/extensions/Label.java
  
  Index: Label.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/extensions/Label.java,v
  retrieving revision 1.2
  retrieving revision 1.2.2.1
  diff -u -r1.2 -r1.2.2.1
  --- Label.java        30 Jul 2001 20:29:20 -0000      1.2
  +++ Label.java        16 Jul 2002 20:04:43 -0000      1.2.2.1
  @@ -11,7 +11,7 @@
   
   
   public class Label extends ExtensionObj {
  -    private String _label = "";
  +    private StringBuffer textBuffer;
   
       public static class Maker extends FObj.Maker {
           public FObj make(FObj parent, PropertyList propertyList) {
  @@ -28,12 +28,15 @@
           super(parent, propertyList);
       }
   
  -    protected void addCharacters(char data[], int start, int end) {
  -        _label += new String(data, start, end - start);
  +    protected void addCharacters(char data[], int start, int length) {
  +        if (textBuffer==null) {
  +            textBuffer = new StringBuffer();
  +        }
  +        textBuffer.append(data,start,length);
       }
   
       public String toString() {
  -        return _label;
  +        return textBuffer.toString();
       }
   
   
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.2.2.1   +2 -2      xml-fop/src/org/apache/fop/fo/XMLObj.java
  
  Index: XMLObj.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/XMLObj.java,v
  retrieving revision 1.2
  retrieving revision 1.2.2.1
  diff -u -r1.2 -r1.2.2.1
  --- XMLObj.java       8 Oct 2001 09:56:38 -0000       1.2
  +++ XMLObj.java       16 Jul 2002 20:04:44 -0000      1.2.2.1
  @@ -128,7 +128,7 @@
       }
   
       protected void addCharacters(char data[], int start, int length) {
  -        String str = new String(data, start, length - start);
  +        String str = new String(data, start, length);
           org.w3c.dom.Text text = doc.createTextNode(str);
           element.appendChild(text);
       }
  
  
  

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

Reply via email to