You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by sa...@apache.org on 2003/06/29 16:19:24 UTC
cvs commit: jakarta-poi/src/scratchpad/src/org/apache/poi/hwpf/model/hdftypes PAPBinTable.java PAPFormattedDiskPage.java ParagraphHeight.java
sackley 2003/06/29 07:19:24
Modified: src/scratchpad/src/org/apache/poi/hwpf/model/hdftypes
PAPBinTable.java PAPFormattedDiskPage.java
ParagraphHeight.java
Log:
latest updates
Revision Changes Path
1.3 +5 -0 jakarta-poi/src/scratchpad/src/org/apache/poi/hwpf/model/hdftypes/PAPBinTable.java
Index: PAPBinTable.java
===================================================================
RCS file: /home/cvs/jakarta-poi/src/scratchpad/src/org/apache/poi/hwpf/model/hdftypes/PAPBinTable.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- PAPBinTable.java 24 Jun 2003 11:32:30 -0000 1.2
+++ PAPBinTable.java 29 Jun 2003 14:19:23 -0000 1.3
@@ -93,6 +93,11 @@
}
}
+ public ArrayList getParagraphs()
+ {
+ return _paragraphs;
+ }
+
public void writeTo(HWPFFileSystem sys, int fcMin)
throws IOException
{
1.4 +2 -1 jakarta-poi/src/scratchpad/src/org/apache/poi/hwpf/model/hdftypes/PAPFormattedDiskPage.java
Index: PAPFormattedDiskPage.java
===================================================================
RCS file: /home/cvs/jakarta-poi/src/scratchpad/src/org/apache/poi/hwpf/model/hdftypes/PAPFormattedDiskPage.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- PAPFormattedDiskPage.java 28 Jun 2003 15:56:46 -0000 1.3
+++ PAPFormattedDiskPage.java 29 Jun 2003 14:19:23 -0000 1.4
@@ -204,6 +204,7 @@
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);
@@ -233,7 +234,7 @@
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);
1.2 +3 -8 jakarta-poi/src/scratchpad/src/org/apache/poi/hwpf/model/hdftypes/ParagraphHeight.java
Index: ParagraphHeight.java
===================================================================
RCS file: /home/cvs/jakarta-poi/src/scratchpad/src/org/apache/poi/hwpf/model/hdftypes/ParagraphHeight.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ParagraphHeight.java 5 Jun 2003 01:58:38 -0000 1.1
+++ ParagraphHeight.java 29 Jun 2003 14:19:23 -0000 1.2
@@ -71,8 +71,7 @@
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)
{
@@ -82,9 +81,7 @@
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)
@@ -103,9 +100,7 @@
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;
}