poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject cvs commit: jakarta-poi/src/java/org/apache/poi/hssf/record/formula Area3DPtg.java AreaPtg.java FuncPtg.java FuncVarPtg.java NamePtg.java NameXPtg.java Ref3DPtg.java ReferencePtg.java
Date Tue, 01 Jul 2003 14:47:35 GMT
avik        2003/07/01 07:47:35

  Modified:    src/java/org/apache/poi/hssf/record Tag: REL_2_BRANCH
                        ContinueRecord.java FormulaRecord.java
                        PasswordRecord.java
               src/java/org/apache/poi/hssf/record/formula Tag:
                        REL_2_BRANCH Area3DPtg.java AreaPtg.java
                        FuncPtg.java FuncVarPtg.java NamePtg.java
                        NameXPtg.java Ref3DPtg.java ReferencePtg.java
  Log:
  Bug id 21027
  Patch to fix misc clone issues, submitted by Nial Pemberton .. thanks!
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.5.2.1   +10 -0     jakarta-poi/src/java/org/apache/poi/hssf/record/ContinueRecord.java
  
  Index: ContinueRecord.java
  ===================================================================
  RCS file: /home/cvs/jakarta-poi/src/java/org/apache/poi/hssf/record/ContinueRecord.java,v
  retrieving revision 1.5
  retrieving revision 1.5.2.1
  diff -u -r1.5 -r1.5.2.1
  --- ContinueRecord.java	30 Apr 2003 04:38:48 -0000	1.5
  +++ ContinueRecord.java	1 Jul 2003 14:47:34 -0000	1.5.2.1
  @@ -267,4 +267,14 @@
       protected void fillFields(byte [] ignored_parm1, short ignored_parm2, int ignored_parm3)
       {
       }
  +
  +    /**
  +     * Clone this record.
  +     */
  +    public Object clone() {
  +      ContinueRecord clone = new ContinueRecord();
  +      clone.setData(field_1_data);
  +      return clone;
  +    }
  +
   }
  
  
  
  1.20.2.2  +8 -2      jakarta-poi/src/java/org/apache/poi/hssf/record/FormulaRecord.java
  
  Index: FormulaRecord.java
  ===================================================================
  RCS file: /home/cvs/jakarta-poi/src/java/org/apache/poi/hssf/record/FormulaRecord.java,v
  retrieving revision 1.20.2.1
  retrieving revision 1.20.2.2
  diff -u -r1.20.2.1 -r1.20.2.2
  --- FormulaRecord.java	28 Jun 2003 00:21:47 -0000	1.20.2.1
  +++ FormulaRecord.java	1 Jul 2003 14:47:34 -0000	1.20.2.2
  @@ -557,8 +557,13 @@
                   .append("\n");
               buffer.append("    .xf              = ")
                   .append(Integer.toHexString(getXFIndex())).append("\n");
  -            buffer.append("    .value           = ").append(getValue())
  -                .append("\n");
  +            if (Double.isNaN(this.getValue()) && value_data != null)
  +              buffer.append("    .value (NaN)     = ")
  +                  .append(org.apache.poi.util.HexDump.dump(value_data,0,0))
  +                  .append("\n");
  +            else
  +              buffer.append("    .value           = ").append(getValue())
  +                  .append("\n");
               buffer.append("    .options         = ").append(getOptions())
                   .append("\n");
               buffer.append("    .zero            = ").append(field_6_zero)
  @@ -610,6 +615,7 @@
           Ptg ptg = (Ptg)((Ptg)field_8_parsed_expr.get(i)).clone();        
           rec.field_8_parsed_expr.add(i, ptg);
         }
  +      rec.value_data = value_data;
         rec.all_data = all_data;
         return rec;
       }
  
  
  
  1.4.2.1   +10 -0     jakarta-poi/src/java/org/apache/poi/hssf/record/PasswordRecord.java
  
  Index: PasswordRecord.java
  ===================================================================
  RCS file: /home/cvs/jakarta-poi/src/java/org/apache/poi/hssf/record/PasswordRecord.java,v
  retrieving revision 1.4
  retrieving revision 1.4.2.1
  diff -u -r1.4 -r1.4.2.1
  --- PasswordRecord.java	30 Apr 2003 04:38:47 -0000	1.4
  +++ PasswordRecord.java	1 Jul 2003 14:47:34 -0000	1.4.2.1
  @@ -166,4 +166,14 @@
       {
           return this.sid;
       }
  +
  +    /**
  +     * Clone this record.
  +     */
  +    public Object clone() {
  +      PasswordRecord clone = new PasswordRecord();
  +      clone.setPassword(field_1_password);
  +      return clone;
  +    }
  +
   }
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.13.2.1  +1 -0      jakarta-poi/src/java/org/apache/poi/hssf/record/formula/Area3DPtg.java
  
  Index: Area3DPtg.java
  ===================================================================
  RCS file: /home/cvs/jakarta-poi/src/java/org/apache/poi/hssf/record/formula/Area3DPtg.java,v
  retrieving revision 1.13
  retrieving revision 1.13.2.1
  diff -u -r1.13 -r1.13.2.1
  --- Area3DPtg.java	30 Apr 2003 04:39:02 -0000	1.13
  +++ Area3DPtg.java	1 Jul 2003 14:47:34 -0000	1.13.2.1
  @@ -318,6 +318,7 @@
   		ptg.field_3_last_row = field_3_last_row;
   		ptg.field_4_first_column = field_4_first_column;
   		ptg.field_5_last_column = field_5_last_column;
  +            ptg.setClass(ptgClass);
   		return ptg;
   	}
   
  
  
  
  1.14.2.1  +1 -0      jakarta-poi/src/java/org/apache/poi/hssf/record/formula/AreaPtg.java
  
  Index: AreaPtg.java
  ===================================================================
  RCS file: /home/cvs/jakarta-poi/src/java/org/apache/poi/hssf/record/formula/AreaPtg.java,v
  retrieving revision 1.14
  retrieving revision 1.14.2.1
  diff -u -r1.14 -r1.14.2.1
  --- AreaPtg.java	30 Apr 2003 04:39:02 -0000	1.14
  +++ AreaPtg.java	1 Jul 2003 14:47:34 -0000	1.14.2.1
  @@ -321,6 +321,7 @@
         ptg.field_2_last_row = field_2_last_row;
         ptg.field_3_first_column = field_3_first_column;
         ptg.field_4_last_column = field_4_last_column;
  +      ptg.setClass(ptgClass);
         return ptg;
       }
   
  
  
  
  1.5.2.1   +2 -1      jakarta-poi/src/java/org/apache/poi/hssf/record/formula/FuncPtg.java
  
  Index: FuncPtg.java
  ===================================================================
  RCS file: /home/cvs/jakarta-poi/src/java/org/apache/poi/hssf/record/formula/FuncPtg.java,v
  retrieving revision 1.5
  retrieving revision 1.5.2.1
  diff -u -r1.5 -r1.5.2.1
  --- FuncPtg.java	6 May 2003 15:30:52 -0000	1.5
  +++ FuncPtg.java	1 Jul 2003 14:47:34 -0000	1.5.2.1
  @@ -63,7 +63,8 @@
         FuncPtg ptg = new FuncPtg();
         //ptg.field_1_num_args = field_1_num_args;
         ptg.field_2_fnc_index = field_2_fnc_index;
  -      return ptg;
  +      ptg.setClass(ptgClass);
  +     return ptg;
       }
       
       public int getSize() {
  
  
  
  1.5.2.1   +1 -0      jakarta-poi/src/java/org/apache/poi/hssf/record/formula/FuncVarPtg.java
  
  Index: FuncVarPtg.java
  ===================================================================
  RCS file: /home/cvs/jakarta-poi/src/java/org/apache/poi/hssf/record/formula/FuncVarPtg.java,v
  retrieving revision 1.5
  retrieving revision 1.5.2.1
  diff -u -r1.5 -r1.5.2.1
  --- FuncVarPtg.java	6 May 2003 15:30:52 -0000	1.5
  +++ FuncVarPtg.java	1 Jul 2003 14:47:34 -0000	1.5.2.1
  @@ -52,6 +52,7 @@
         FuncVarPtg ptg = new FuncVarPtg();
         ptg.field_1_num_args = field_1_num_args;
         ptg.field_2_fnc_index = field_2_fnc_index;
  +      ptg.setClass(ptgClass);
         return ptg;
       }
       
  
  
  
  1.6.2.1   +1 -0      jakarta-poi/src/java/org/apache/poi/hssf/record/formula/NamePtg.java
  
  Index: NamePtg.java
  ===================================================================
  RCS file: /home/cvs/jakarta-poi/src/java/org/apache/poi/hssf/record/formula/NamePtg.java,v
  retrieving revision 1.6
  retrieving revision 1.6.2.1
  diff -u -r1.6 -r1.6.2.1
  --- NamePtg.java	30 Apr 2003 04:39:02 -0000	1.6
  +++ NamePtg.java	1 Jul 2003 14:47:34 -0000	1.6.2.1
  @@ -121,6 +121,7 @@
         ptg.field_1_ixti = field_1_ixti;
         ptg.field_2_label_index = field_2_label_index;
         ptg.field_3_zero = field_3_zero;
  +      ptg.setClass(ptgClass);
         return ptg;
       }
   }
  
  
  
  1.1.2.1   +2 -1      jakarta-poi/src/java/org/apache/poi/hssf/record/formula/NameXPtg.java
  
  Index: NameXPtg.java
  ===================================================================
  RCS file: /home/cvs/jakarta-poi/src/java/org/apache/poi/hssf/record/formula/NameXPtg.java,v
  retrieving revision 1.1
  retrieving revision 1.1.2.1
  diff -u -r1.1 -r1.1.2.1
  --- NameXPtg.java	5 May 2003 15:33:14 -0000	1.1
  +++ NameXPtg.java	1 Jul 2003 14:47:34 -0000	1.1.2.1
  @@ -102,7 +102,7 @@
   
       public void writeBytes(byte [] array, int offset)
       {
  -        array[ offset + 0 ] = sid;
  +        array[ offset + 0 ] = (byte)(sid + ptgClass);
           LittleEndian.putShort(array, offset + 1, field_1_ixals);
           LittleEndian.putShort(array,offset+3, field_2_ilbl);
           LittleEndian.putShort(array, offset + 5, field_3_reserved);
  @@ -125,6 +125,7 @@
         ptg.field_1_ixals = field_1_ixals;
         ptg.field_3_reserved = field_3_reserved;
         ptg.field_2_ilbl = field_2_ilbl;
  +      ptg.setClass(ptgClass);
         return ptg;
       }
   }
  
  
  
  1.10.2.2  +1 -0      jakarta-poi/src/java/org/apache/poi/hssf/record/formula/Ref3DPtg.java
  
  Index: Ref3DPtg.java
  ===================================================================
  RCS file: /home/cvs/jakarta-poi/src/java/org/apache/poi/hssf/record/formula/Ref3DPtg.java,v
  retrieving revision 1.10.2.1
  retrieving revision 1.10.2.2
  diff -u -r1.10.2.1 -r1.10.2.2
  --- Ref3DPtg.java	8 Jun 2003 19:40:48 -0000	1.10.2.1
  +++ Ref3DPtg.java	1 Jul 2003 14:47:34 -0000	1.10.2.2
  @@ -210,6 +210,7 @@
        ptg.field_1_index_extern_sheet = field_1_index_extern_sheet;
        ptg.field_2_row = field_2_row;
        ptg.field_3_column = field_3_column;
  +     ptg.setClass(ptgClass);
        return ptg;
      }
   
  
  
  
  1.8.2.1   +1 -0      jakarta-poi/src/java/org/apache/poi/hssf/record/formula/ReferencePtg.java
  
  Index: ReferencePtg.java
  ===================================================================
  RCS file: /home/cvs/jakarta-poi/src/java/org/apache/poi/hssf/record/formula/ReferencePtg.java,v
  retrieving revision 1.8
  retrieving revision 1.8.2.1
  diff -u -r1.8 -r1.8.2.1
  --- ReferencePtg.java	30 Apr 2003 04:39:02 -0000	1.8
  +++ ReferencePtg.java	1 Jul 2003 14:47:34 -0000	1.8.2.1
  @@ -193,6 +193,7 @@
         ReferencePtg ptg = new ReferencePtg();
         ptg.field_1_row = field_1_row;
         ptg.field_2_col = field_2_col;
  +      ptg.setClass(ptgClass);
         return ptg;
       }
   }
  
  
  

Mime
View raw message