sackley 2003/07/01 16:57:08
Modified: src/scratchpad/src/org/apache/poi/hwpf/model/hdftypes
TextPiece.java TextPieceTable.java
PieceDescriptor.java ParagraphHeight.java PAPX.java
PAPBinTable.java PAPFormattedDiskPage.java
CHPFormattedDiskPage.java CHPBinTable.java
Log:
latest update
Revision Changes Path
1.3 +10 -0
jakarta-poi/src/scratchpad/src/org/apache/poi/hwpf/model/hdftypes/TextPiece.java
Index: TextPiece.java
===================================================================
RCS file:
/home/cvs/jakarta-poi/src/scratchpad/src/org/apache/poi/hwpf/model/hdftypes/TextPiece.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- TextPiece.java 24 Jun 2003 11:32:30 -0000 1.2
+++ TextPiece.java 1 Jul 2003 23:57:06 -0000 1.3
@@ -92,4 +92,14 @@
{
return _pd;
}
+
+ public boolean equals(Object o)
+ {
+ if (super.equals(o))
+ {
+ TextPiece tp = (TextPiece)o;
+ return tp._usesUnicode == _usesUnicode && _pd.equals(tp._pd);
+ }
+ return false;
+ }
}
1.3 +18 -0
jakarta-poi/src/scratchpad/src/org/apache/poi/hwpf/model/hdftypes/TextPieceTable.java
Index: TextPieceTable.java
===================================================================
RCS file:
/home/cvs/jakarta-poi/src/scratchpad/src/org/apache/poi/hwpf/model/hdftypes/TextPieceTable.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- TextPieceTable.java 24 Jun 2003 11:32:30 -0000 1.2
+++ TextPieceTable.java 1 Jul 2003 23:57:07 -0000 1.3
@@ -147,5 +147,23 @@
}
+ public boolean equals(Object o)
+ {
+ TextPieceTable tpt = (TextPieceTable)o;
+
+ int size = tpt._textPieces.size();
+ if (size == _textPieces.size())
+ {
+ for (int x = 0; x < size; x++)
+ {
+ if (!tpt._textPieces.get(x).equals(_textPieces.get(x)))
+ {
+ return false;
+ }
+ }
+ return true;
+ }
+ return false;
+ }
}
1.3 +6 -0
jakarta-poi/src/scratchpad/src/org/apache/poi/hwpf/model/hdftypes/PieceDescriptor.java
Index: PieceDescriptor.java
===================================================================
RCS file:
/home/cvs/jakarta-poi/src/scratchpad/src/org/apache/poi/hwpf/model/hdftypes/PieceDescriptor.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- PieceDescriptor.java 24 Jun 2003 11:32:30 -0000 1.2
+++ PieceDescriptor.java 1 Jul 2003 23:57:07 -0000 1.3
@@ -135,4 +135,10 @@
return 8;
}
+ public boolean equals(Object o)
+ {
+ PieceDescriptor pd = (PieceDescriptor)o;
+
+ return descriptor == pd.descriptor && prm == pd.prm && unicode == pd.unicode;
+ }
}
1.3 +7 -0
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.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ParagraphHeight.java 29 Jun 2003 14:19:23 -0000 1.2
+++ ParagraphHeight.java 1 Jul 2003 23:57:07 -0000 1.3
@@ -105,4 +105,11 @@
return buf;
}
+ public boolean equals(Object o)
+ {
+ ParagraphHeight ph = (ParagraphHeight)o;
+
+ return infoField == ph.infoField && reserved == ph.reserved &&
+ dxaCol == ph.dxaCol && dymLineOrHeight == ph.dymLineOrHeight;
+ }
}
1.2 +8 -0
jakarta-poi/src/scratchpad/src/org/apache/poi/hwpf/model/hdftypes/PAPX.java
Index: PAPX.java
===================================================================
RCS file:
/home/cvs/jakarta-poi/src/scratchpad/src/org/apache/poi/hwpf/model/hdftypes/PAPX.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- PAPX.java 5 Jun 2003 01:58:38 -0000 1.1
+++ PAPX.java 1 Jul 2003 23:57:07 -0000 1.2
@@ -82,5 +82,13 @@
return super.getBuf();
}
+ public boolean equals(Object o)
+ {
+ if (super.equals(o))
+ {
+ return _phe.equals(((PAPX)o)._phe);
+ }
+ return false;
+ }
}
1.4 +2 -2
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.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- PAPBinTable.java 29 Jun 2003 14:19:23 -0000 1.3
+++ PAPBinTable.java 1 Jul 2003 23:57:07 -0000 1.4
@@ -126,7 +126,6 @@
ArrayList overflow = _paragraphs;
- byte[] intHolder = new byte[4];
do
{
PropertyNode startingProp = (PropertyNode)overflow.get(0);
@@ -142,9 +141,10 @@
int end = endingFc;
if (overflow != null)
{
- end = ((PropertyNode)overflow.get(0)).getEnd();
+ end = ((PropertyNode)overflow.get(0)).getStart();
}
+ byte[] intHolder = new byte[4];
LittleEndian.putInt(intHolder, pageNum++);
binTable.addProperty(new PropertyNode(start, end, intHolder));
1.5 +2 -2
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.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- PAPFormattedDiskPage.java 29 Jun 2003 14:19:23 -0000 1.4
+++ PAPFormattedDiskPage.java 1 Jul 2003 23:57:07 -0000 1.5
@@ -187,7 +187,7 @@
if (index != size)
{
_overFlow = new ArrayList();
- _overFlow.addAll(index, _papxList);
+ _overFlow.addAll(_papxList.subList(index, size));
}
// index should equal number of papxs that will be in this fkp now.
@@ -234,7 +234,7 @@
private ParagraphHeight getParagraphHeight(int index)
{
- int pheOffset = 1 + (((_crun + 1) * 4) + (index * 13));
+ int pheOffset = _offset + 1 + (((_crun + 1) * 4) + (index * 13));
ParagraphHeight phe = new ParagraphHeight(_fkp, pheOffset);
1.4 +1 -1
jakarta-poi/src/scratchpad/src/org/apache/poi/hwpf/model/hdftypes/CHPFormattedDiskPage.java
Index: CHPFormattedDiskPage.java
===================================================================
RCS file:
/home/cvs/jakarta-poi/src/scratchpad/src/org/apache/poi/hwpf/model/hdftypes/CHPFormattedDiskPage.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- CHPFormattedDiskPage.java 28 Jun 2003 15:56:46 -0000 1.3
+++ CHPFormattedDiskPage.java 1 Jul 2003 23:57:07 -0000 1.4
@@ -178,7 +178,7 @@
if (index != size)
{
_overFlow = new ArrayList();
- _overFlow.addAll(index, _chpxList);
+ _overFlow.addAll(_chpxList.subList(index, size));
}
// index should equal number of CHPXs that will be in this fkp now.
1.3 +7 -2
jakarta-poi/src/scratchpad/src/org/apache/poi/hwpf/model/hdftypes/CHPBinTable.java
Index: CHPBinTable.java
===================================================================
RCS file:
/home/cvs/jakarta-poi/src/scratchpad/src/org/apache/poi/hwpf/model/hdftypes/CHPBinTable.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- CHPBinTable.java 24 Jun 2003 11:32:30 -0000 1.2
+++ CHPBinTable.java 1 Jul 2003 23:57:07 -0000 1.3
@@ -94,6 +94,11 @@
}
}
+ public ArrayList getTextRuns()
+ {
+ return _textRuns;
+ }
+
public void writeTo(HWPFFileSystem sys, int fcMin)
throws IOException
{
@@ -122,7 +127,6 @@
ArrayList overflow = _textRuns;
- byte[] intHolder = new byte[4];
do
{
PropertyNode startingProp = (PropertyNode)overflow.get(0);
@@ -138,9 +142,10 @@
int end = endingFc;
if (overflow != null)
{
- end = ((PropertyNode)overflow.get(0)).getEnd();
+ end = ((PropertyNode)overflow.get(0)).getStart();
}
+ byte[] intHolder = new byte[4];
LittleEndian.putInt(intHolder, pageNum++);
binTable.addProperty(new PropertyNode(start, end, intHolder));
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]