byte[] grpprl = papx.getGrpprl();
grpprlOffset -= (grpprl.length + (2 - grpprl.length % 2));
+ grpprlOffset -= (grpprlOffset % 2);
LittleEndian.putInt(buf, fcOffset, papx.getStart() + fcMin);
buf[bxOffset] = (byte)(grpprlOffset/2);
System.arraycopy(phe, 0, buf, bxOffset + 1, phe.length);
private ParagraphHeight getParagraphHeight(int index)
{
- int pheOffset = 1 + (2 * LittleEndian.getUnsignedByte(_fkp, _offset + (((_crun + 1) * 4) + (index * 13))));
+ int pheOffset = 1 + (((_crun + 1) * 4) + (index * 13));
ParagraphHeight phe = new ParagraphHeight(_fkp, pheOffset);
private BitField clMac = new BitField(0xff00);
private short reserved;
private int dxaCol;
- private int dymLine;
- private int dymHeight;
+ private int dymLineOrHeight;
public ParagraphHeight(byte[] buf, int offset)
{
offset += LittleEndian.SHORT_SIZE;
dxaCol = LittleEndian.getInt(buf, offset);
offset += LittleEndian.INT_SIZE;
- dymLine = LittleEndian.getInt(buf, offset);
- offset += LittleEndian.INT_SIZE;
- dymHeight = LittleEndian.getInt(buf, offset);
+ dymLineOrHeight = LittleEndian.getInt(buf, offset);
}
public void write(OutputStream out)
offset += LittleEndian.SHORT_SIZE;
LittleEndian.putInt(buf, offset, dxaCol);
offset += LittleEndian.INT_SIZE;
- LittleEndian.putInt(buf, offset, dymLine);
- offset += LittleEndian.INT_SIZE;
- LittleEndian.putInt(buf, offset, dymHeight);
+ LittleEndian.putInt(buf, offset, dymLineOrHeight);
return buf;
}