1 19 20 package jxl.write.biff; 21 22 import jxl.biff.Type; 23 import jxl.biff.IntegerHelper; 24 import jxl.biff.StringHelper; 25 import jxl.biff.WritableRecordData; 26 27 31 class CalcModeRecord extends WritableRecordData 32 { 33 36 private CalcMode calculationMode; 37 38 private static class CalcMode 39 { 40 43 int value; 44 45 50 public CalcMode(int m) 51 { 52 value = m; 53 } 54 } 55 56 59 static CalcMode manual = new CalcMode(0); 60 63 static CalcMode automatic = new CalcMode(1); 64 67 static CalcMode automaticNoTables = new CalcMode(-1); 68 69 74 public CalcModeRecord(CalcMode cm) 75 { 76 super(Type.CALCMODE); 77 calculationMode = cm; 78 } 79 80 81 86 public byte[] getData() 87 { 88 byte[] data = new byte[2]; 89 90 IntegerHelper.getTwoBytes(calculationMode.value, data, 0); 91 92 return data; 93 } 94 } 95 96 97 | Popular Tags |