1 19 20 package jxl.read.biff; 21 22 import jxl.LabelCell; 23 import jxl.CellType; 24 import jxl.WorkbookSettings; 25 import jxl.biff.IntegerHelper; 26 import jxl.biff.FormattingRecords; 27 import jxl.biff.StringHelper; 28 29 32 class LabelRecord extends CellValue implements LabelCell 33 { 34 37 private int length; 38 39 42 private String string; 43 44 47 private static class Biff7 {}; 48 public static Biff7 biff7 = new Biff7(); 49 50 58 public LabelRecord(Record t, FormattingRecords fr, 59 SheetImpl si, WorkbookSettings ws) 60 { 61 super(t, fr, si); 62 byte[] data = getRecord().getData(); 63 length = IntegerHelper.getInt(data[6], data[7]); 64 65 if (data[8] == 0x0) 66 { 67 string = StringHelper.getString(data, length, 9, ws); 68 } 69 else 70 { 71 string = StringHelper.getUnicodeString(data, length, 9); 72 } 73 } 74 75 84 public LabelRecord(Record t, FormattingRecords fr, SheetImpl si, 85 WorkbookSettings ws, Biff7 dummy) 86 { 87 super(t, fr, si); 88 byte[] data = getRecord().getData(); 89 length = IntegerHelper.getInt(data[6], data[7]); 90 91 string = StringHelper.getString(data, length, 8, ws); 92 } 93 94 99 public String getString() 100 { 101 return string; 102 } 103 104 109 public String getContents() 110 { 111 return string; 112 } 113 114 119 public CellType getType() 120 { 121 return CellType.LABEL; 122 } 123 } 124 | Popular Tags |