// Now load the rest of the properties, which need to be adjusted
// for where text really begin
- _cbt = new CHPBinTable(_mainStream, _tableStream, _fib.getFcPlcfbteChpx(), _fib.getLcbPlcfbteChpx(), cpMin, _tpt, true);
+ _cbt = new CHPBinTable(_mainStream, _tableStream, _fib.getFcPlcfbteChpx(), _fib.getLcbPlcfbteChpx(), _tpt, true);
_pbt = new PAPBinTable(_mainStream, _tableStream, _dataStream, _fib.getFcPlcfbtePapx(), _fib.getLcbPlcfbtePapx(), cpMin, _tpt, true);
// Read FSPA and Escher information
* Constructor used to read a binTable in from a Word document.
*
* @deprecated Use
- * {@link #CHPBinTable(byte[],byte[],int,int,int,TextPieceTable,boolean)}
+ * {@link #CHPBinTable(byte[],byte[],int,int,TextPieceTable,boolean)}
* instead
*/
public CHPBinTable( byte[] documentStream, byte[] tableStream, int offset,
int size, int fcMin, TextPieceTable tpt )
{
- this( documentStream, tableStream, offset, size, fcMin, tpt, true );
+ this( documentStream, tableStream, offset, size, tpt, true );
}
/**
* Constructor used to read a binTable in from a Word document.
*/
public CHPBinTable( byte[] documentStream, byte[] tableStream, int offset,
- int size, int fcMin, TextPieceTable tpt,
- boolean ignoreChpxWithoutTextPieces )
+ int size, TextPieceTable tpt, boolean ignoreChpxWithoutTextPieces )
{
/*
* Page 35:
int pageOffset = POIFSConstants.SMALLER_BIG_BLOCK_SIZE * pageNum;
CHPFormattedDiskPage cfkp = new CHPFormattedDiskPage(documentStream,
- pageOffset, fcMin, tpt, ignoreChpxWithoutTextPieces);
+ pageOffset, tpt, ignoreChpxWithoutTextPieces);
int fkpSize = cfkp.size();
CHPFormattedDiskPage cfkp = new CHPFormattedDiskPage();
cfkp.fill(overflow);
- byte[] bufFkp = cfkp.toByteArray( tpt, fcMin );
+ byte[] bufFkp = cfkp.toByteArray( tpt );
docStream.write(bufFkp);
overflow = cfkp.getOverflow();
* read from a Word file).
*
* @deprecated Use
- * {@link #CHPFormattedDiskPage(byte[],int,int,TextPieceTable,boolean)}
+ * {@link #CHPFormattedDiskPage(byte[],int,TextPieceTable,boolean)}
* instead
*/
+ @SuppressWarnings( "unused" )
public CHPFormattedDiskPage( byte[] documentStream, int offset, int fcMin,
TextPieceTable tpt )
{
- this( documentStream, offset, fcMin, tpt, true );
+ this( documentStream, offset, tpt, true );
}
/**
* This constructs a CHPFormattedDiskPage from a raw fkp (512 byte array
* read from a Word file).
- *
- * @param ignoreChpxWithoutTextPieces
- * TODO
*/
- public CHPFormattedDiskPage( byte[] documentStream, int offset, int fcMin,
- TextPieceTable tpt, boolean ignoreChpxWithoutTextPieces )
+ public CHPFormattedDiskPage( byte[] documentStream, int offset, TextPieceTable tpt,
+ boolean ignoreChpxWithoutTextPieces )
{
super(documentStream, offset);
return chpx;
}
+ /**
+ * @deprecated Use {@link #toByteArray(CharIndexTranslator)} instead
+ */
+ @Deprecated
+ @SuppressWarnings( "unused" )
protected byte[] toByteArray(CharIndexTranslator translator, int fcMin)
+ {
+ return toByteArray( translator );
+ }
+
+ protected byte[] toByteArray(CharIndexTranslator translator)
{
byte[] buf = new byte[512];
int size = _chpxList.size();
int pageOffset = POIFSConstants.SMALLER_BIG_BLOCK_SIZE * pageNum;
CHPFormattedDiskPage cfkp = new CHPFormattedDiskPage(documentStream,
- pageOffset, fcMin, tpt, true);
+ pageOffset, tpt, true);
int fkpSize = cfkp.size();
byte[] tableStream = _hWPFDocFixture._tableStream;
int fcMin = fib.getFcMin();
- _cHPBinTable = new CHPBinTable(mainStream, tableStream, fib.getFcPlcfbteChpx(), fib.getLcbPlcfbteChpx(), fcMin, fakeTPT, false);
+ _cHPBinTable = new CHPBinTable(mainStream, tableStream, fib.getFcPlcfbteChpx(), fib.getLcbPlcfbteChpx(), fakeTPT, false);
HWPFFileSystem fileSys = new HWPFFileSystem();
byte[] newTableStream = tableOut.toByteArray();
byte[] newMainStream = mainOut.toByteArray();
- CHPBinTable newBinTable = new CHPBinTable(newMainStream, newTableStream, 0, newTableStream.length, 0, fakeTPT, false);
+ CHPBinTable newBinTable = new CHPBinTable(newMainStream, newTableStream, 0, newTableStream.length, fakeTPT, false);
ArrayList oldTextRuns = _cHPBinTable._textRuns;
ArrayList newTextRuns = newBinTable._textRuns;