1 2 17 18 23 package org.apache.poi.hssf.record.formula; 24 25 import java.util.List ; 26 27 import org.apache.poi.hssf.model.Workbook; 28 29 35 36 public class AddPtg 37 extends OperationPtg 38 { 39 public final static int SIZE = 1; 40 public final static byte sid = 0x03; 41 42 private final static String ADD = "+"; 43 44 45 46 public AddPtg() 47 { 48 } 49 50 public AddPtg(byte [] data, int offset) 51 { 52 53 } 55 56 57 public void writeBytes(byte [] array, int offset) 58 { 59 array[ offset + 0 ] = sid; 60 } 61 62 public int getSize() 63 { 64 return SIZE; 65 } 66 67 public int getType() 68 { 69 return TYPE_BINARY; 70 } 71 72 public int getNumberOfOperands() 73 { 74 return 2; 75 } 76 77 78 public String toFormulaString(Workbook book) 79 { 80 return "+"; 81 } 82 83 84 public String toFormulaString(String [] operands) { 85 StringBuffer buffer = new StringBuffer (); 86 87 buffer.append(operands[ 0 ]); 88 buffer.append(ADD); 89 buffer.append(operands[ 1 ]); 90 return buffer.toString(); 91 } 92 93 public byte getDefaultOperandClass() {return Ptg.CLASS_VALUE;} 94 95 public Object clone() { 96 return new AddPtg(); 97 } 98 99 } 100 | Popular Tags |