1 19 20 package jxl.read.biff; 21 22 import common.Logger; 23 import jxl.biff.IntegerHelper; 24 import jxl.biff.RecordData; 25 26 29 class MulBlankRecord extends RecordData 30 { 31 34 private static Logger logger = Logger.getLogger(MulBlankRecord.class); 35 36 39 private int row; 40 43 private int colFirst; 44 47 private int colLast; 48 51 private int numblanks; 52 55 private int[] xfIndices; 56 57 62 public MulBlankRecord(Record t) 63 { 64 super(t); 65 byte[] data = getRecord().getData(); 66 int length = getRecord().getLength(); 67 row = IntegerHelper.getInt(data[0], data[1]); 68 colFirst = IntegerHelper.getInt(data[2], data[3]); 69 colLast = IntegerHelper.getInt(data[length - 2], data[length - 1]); 70 numblanks = colLast - colFirst + 1; 71 xfIndices = new int[numblanks]; 72 73 readBlanks(data); 74 } 75 76 81 private void readBlanks(byte[] data) 82 { 83 int pos = 4; 84 for (int i = 0; i < numblanks; i++) 85 { 86 xfIndices[i] = IntegerHelper.getInt(data[pos], data[pos + 1]); 87 pos += 2; 88 } 89 } 90 91 96 public int getRow() 97 { 98 return row; 99 } 100 101 106 public int getFirstColumn() 107 { 108 return colFirst; 109 } 110 111 116 public int getNumberOfColumns() 117 { 118 return numblanks; 119 } 120 121 126 public int getXFIndex(int index) 127 { 128 return xfIndices[index]; 129 } 130 } 131 132 133 134 135 | Popular Tags |