latest updates
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353178 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c4894b4568
commit
4e2ea4d4c4
@ -93,6 +93,11 @@ public class PAPBinTable
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ArrayList getParagraphs()
|
||||||
|
{
|
||||||
|
return _paragraphs;
|
||||||
|
}
|
||||||
|
|
||||||
public void writeTo(HWPFFileSystem sys, int fcMin)
|
public void writeTo(HWPFFileSystem sys, int fcMin)
|
||||||
throws IOException
|
throws IOException
|
||||||
{
|
{
|
||||||
|
@ -204,6 +204,7 @@ public class PAPFormattedDiskPage extends FormattedDiskPage
|
|||||||
byte[] grpprl = papx.getGrpprl();
|
byte[] grpprl = papx.getGrpprl();
|
||||||
|
|
||||||
grpprlOffset -= (grpprl.length + (2 - grpprl.length % 2));
|
grpprlOffset -= (grpprl.length + (2 - grpprl.length % 2));
|
||||||
|
grpprlOffset -= (grpprlOffset % 2);
|
||||||
LittleEndian.putInt(buf, fcOffset, papx.getStart() + fcMin);
|
LittleEndian.putInt(buf, fcOffset, papx.getStart() + fcMin);
|
||||||
buf[bxOffset] = (byte)(grpprlOffset/2);
|
buf[bxOffset] = (byte)(grpprlOffset/2);
|
||||||
System.arraycopy(phe, 0, buf, bxOffset + 1, phe.length);
|
System.arraycopy(phe, 0, buf, bxOffset + 1, phe.length);
|
||||||
@ -233,7 +234,7 @@ public class PAPFormattedDiskPage extends FormattedDiskPage
|
|||||||
|
|
||||||
private ParagraphHeight getParagraphHeight(int index)
|
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);
|
ParagraphHeight phe = new ParagraphHeight(_fkp, pheOffset);
|
||||||
|
|
||||||
|
@ -71,8 +71,7 @@ public class ParagraphHeight
|
|||||||
private BitField clMac = new BitField(0xff00);
|
private BitField clMac = new BitField(0xff00);
|
||||||
private short reserved;
|
private short reserved;
|
||||||
private int dxaCol;
|
private int dxaCol;
|
||||||
private int dymLine;
|
private int dymLineOrHeight;
|
||||||
private int dymHeight;
|
|
||||||
|
|
||||||
public ParagraphHeight(byte[] buf, int offset)
|
public ParagraphHeight(byte[] buf, int offset)
|
||||||
{
|
{
|
||||||
@ -82,9 +81,7 @@ public class ParagraphHeight
|
|||||||
offset += LittleEndian.SHORT_SIZE;
|
offset += LittleEndian.SHORT_SIZE;
|
||||||
dxaCol = LittleEndian.getInt(buf, offset);
|
dxaCol = LittleEndian.getInt(buf, offset);
|
||||||
offset += LittleEndian.INT_SIZE;
|
offset += LittleEndian.INT_SIZE;
|
||||||
dymLine = LittleEndian.getInt(buf, offset);
|
dymLineOrHeight = LittleEndian.getInt(buf, offset);
|
||||||
offset += LittleEndian.INT_SIZE;
|
|
||||||
dymHeight = LittleEndian.getInt(buf, offset);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void write(OutputStream out)
|
public void write(OutputStream out)
|
||||||
@ -103,9 +100,7 @@ public class ParagraphHeight
|
|||||||
offset += LittleEndian.SHORT_SIZE;
|
offset += LittleEndian.SHORT_SIZE;
|
||||||
LittleEndian.putInt(buf, offset, dxaCol);
|
LittleEndian.putInt(buf, offset, dxaCol);
|
||||||
offset += LittleEndian.INT_SIZE;
|
offset += LittleEndian.INT_SIZE;
|
||||||
LittleEndian.putInt(buf, offset, dymLine);
|
LittleEndian.putInt(buf, offset, dymLineOrHeight);
|
||||||
offset += LittleEndian.INT_SIZE;
|
|
||||||
LittleEndian.putInt(buf, offset, dymHeight);
|
|
||||||
|
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user