first commit
This commit is contained in:
26
hrmsEjb/jxl/write/biff/HorizontalPageBreaksRecord.java
Normal file
26
hrmsEjb/jxl/write/biff/HorizontalPageBreaksRecord.java
Normal file
@@ -0,0 +1,26 @@
|
||||
package jxl.write.biff;
|
||||
|
||||
import jxl.biff.IntegerHelper;
|
||||
import jxl.biff.Type;
|
||||
import jxl.biff.WritableRecordData;
|
||||
|
||||
class HorizontalPageBreaksRecord extends WritableRecordData {
|
||||
private int[] rowBreaks;
|
||||
|
||||
public HorizontalPageBreaksRecord(int[] breaks) {
|
||||
super(Type.HORIZONTALPAGEBREAKS);
|
||||
this.rowBreaks = breaks;
|
||||
}
|
||||
|
||||
public byte[] getData() {
|
||||
byte[] data = new byte[this.rowBreaks.length * 6 + 2];
|
||||
IntegerHelper.getTwoBytes(this.rowBreaks.length, data, 0);
|
||||
int pos = 2;
|
||||
for (int i = 0; i < this.rowBreaks.length; i++) {
|
||||
IntegerHelper.getTwoBytes(this.rowBreaks[i], data, pos);
|
||||
IntegerHelper.getTwoBytes(255, data, pos + 4);
|
||||
pos += 6;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user