}
}
+ public ArrayList getTextRuns()
+ {
+ return _textRuns;
+ }
+
public void writeTo(HWPFFileSystem sys, int fcMin)
throws IOException
{
ArrayList overflow = _textRuns;
- byte[] intHolder = new byte[4];
do
{
PropertyNode startingProp = (PropertyNode)overflow.get(0);
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));
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.
ArrayList overflow = _paragraphs;
- byte[] intHolder = new byte[4];
do
{
PropertyNode startingProp = (PropertyNode)overflow.get(0);
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));
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.
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);
return super.getBuf();
}
+ public boolean equals(Object o)
+ {
+ if (super.equals(o))
+ {
+ return _phe.equals(((PAPX)o)._phe);
+ }
+ return false;
+ }
}
return buf;
}
+ public boolean equals(Object o)
+ {
+ ParagraphHeight ph = (ParagraphHeight)o;
+
+ return infoField == ph.infoField && reserved == ph.reserved &&
+ dxaCol == ph.dxaCol && dymLineOrHeight == ph.dymLineOrHeight;
+ }
}
return 8;
}
+ public boolean equals(Object o)
+ {
+ PieceDescriptor pd = (PieceDescriptor)o;
+
+ return descriptor == pd.descriptor && prm == pd.prm && unicode == pd.unicode;
+ }
}
{
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;
+ }
}
}
+ 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;
+ }
}