1 2 17 18 package org.apache.poi.hssf.record.formula; 19 20 import org.apache.poi.hssf.model.Workbook; 21 22 28 29 public class ExpPtg 30 extends Ptg 31 { 32 private final static int SIZE = 5; 33 public final static short sid = 0x1; 34 private byte[] existing = null; 35 36 37 38 public ExpPtg() 39 { 40 } 41 42 43 44 public ExpPtg(byte [] array, int offset) 45 { 46 existing = new byte[this.getSize()]; 47 System.arraycopy(array, offset, existing, 0, this.getSize()); 48 } 49 50 public void writeBytes(byte [] array, int offset) 51 { 52 if (existing != null) { 53 System.arraycopy(existing, 0, array, offset, existing.length); 54 } 55 } 56 57 public int getSize() 58 { 59 return SIZE; 60 } 61 62 public String toFormulaString(Workbook book) 63 { 64 return "NO IDEA SHARED FORMULA EXP PTG"; 65 } 66 67 public byte getDefaultOperandClass() {return Ptg.CLASS_VALUE;} 68 69 public Object clone() { 70 if (this.existing == null) throw new RuntimeException ("NO IDEA SHARED FORMULA EXP PTG"); 72 73 return new ExpPtg(this.existing, 0); 74 } 75 76 } 77 | Popular Tags |