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 30 class HorizontalPageBreaksRecord extends WritableRecordData 31 { 32 35 private int[] rowBreaks; 36 37 42 public HorizontalPageBreaksRecord(int[] breaks) 43 { 44 super(Type.HORIZONTALPAGEBREAKS); 45 46 rowBreaks = breaks; 47 } 48 49 54 public byte[] getData() 55 { 56 byte[] data = new byte[rowBreaks.length * 6 + 2]; 57 58 IntegerHelper.getTwoBytes(rowBreaks.length, data, 0); 60 int pos = 2; 61 62 for (int i = 0; i < rowBreaks.length; i++) 63 { 64 IntegerHelper.getTwoBytes(rowBreaks[i], data, pos); 65 IntegerHelper.getTwoBytes(0xff, data, pos+4); 66 pos += 6; 67 } 68 69 return data; 70 } 71 } 72 73 74 | Popular Tags |