remove unused parameters

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1144923 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sergey Vladimirov 2011-07-10 18:04:17 +00:00
parent b0407b8048
commit 365134f1bd
5 changed files with 24 additions and 17 deletions

View File

@ -221,7 +221,7 @@ public final class HWPFDocument extends HWPFDocumentCore
// Now load the rest of the properties, which need to be adjusted // Now load the rest of the properties, which need to be adjusted
// for where text really begin // 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); _pbt = new PAPBinTable(_mainStream, _tableStream, _dataStream, _fib.getFcPlcfbtePapx(), _fib.getLcbPlcfbtePapx(), cpMin, _tpt, true);
// Read FSPA and Escher information // Read FSPA and Escher information

View File

@ -51,21 +51,20 @@ public class CHPBinTable
* Constructor used to read a binTable in from a Word document. * Constructor used to read a binTable in from a Word document.
* *
* @deprecated Use * @deprecated Use
* {@link #CHPBinTable(byte[],byte[],int,int,int,TextPieceTable,boolean)} * {@link #CHPBinTable(byte[],byte[],int,int,TextPieceTable,boolean)}
* instead * instead
*/ */
public CHPBinTable( byte[] documentStream, byte[] tableStream, int offset, public CHPBinTable( byte[] documentStream, byte[] tableStream, int offset,
int size, int fcMin, TextPieceTable tpt ) 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. * Constructor used to read a binTable in from a Word document.
*/ */
public CHPBinTable( byte[] documentStream, byte[] tableStream, int offset, public CHPBinTable( byte[] documentStream, byte[] tableStream, int offset,
int size, int fcMin, TextPieceTable tpt, int size, TextPieceTable tpt, boolean ignoreChpxWithoutTextPieces )
boolean ignoreChpxWithoutTextPieces )
{ {
/* /*
* Page 35: * Page 35:
@ -87,7 +86,7 @@ public class CHPBinTable
int pageOffset = POIFSConstants.SMALLER_BIG_BLOCK_SIZE * pageNum; int pageOffset = POIFSConstants.SMALLER_BIG_BLOCK_SIZE * pageNum;
CHPFormattedDiskPage cfkp = new CHPFormattedDiskPage(documentStream, CHPFormattedDiskPage cfkp = new CHPFormattedDiskPage(documentStream,
pageOffset, fcMin, tpt, ignoreChpxWithoutTextPieces); pageOffset, tpt, ignoreChpxWithoutTextPieces);
int fkpSize = cfkp.size(); int fkpSize = cfkp.size();
@ -243,7 +242,7 @@ public class CHPBinTable
CHPFormattedDiskPage cfkp = new CHPFormattedDiskPage(); CHPFormattedDiskPage cfkp = new CHPFormattedDiskPage();
cfkp.fill(overflow); cfkp.fill(overflow);
byte[] bufFkp = cfkp.toByteArray( tpt, fcMin ); byte[] bufFkp = cfkp.toByteArray( tpt );
docStream.write(bufFkp); docStream.write(bufFkp);
overflow = cfkp.getOverflow(); overflow = cfkp.getOverflow();

View File

@ -55,24 +55,22 @@ public final class CHPFormattedDiskPage extends FormattedDiskPage
* read from a Word file). * read from a Word file).
* *
* @deprecated Use * @deprecated Use
* {@link #CHPFormattedDiskPage(byte[],int,int,TextPieceTable,boolean)} * {@link #CHPFormattedDiskPage(byte[],int,TextPieceTable,boolean)}
* instead * instead
*/ */
@SuppressWarnings( "unused" )
public CHPFormattedDiskPage( byte[] documentStream, int offset, int fcMin, public CHPFormattedDiskPage( byte[] documentStream, int offset, int fcMin,
TextPieceTable tpt ) TextPieceTable tpt )
{ {
this( documentStream, offset, fcMin, tpt, true ); this( documentStream, offset, tpt, true );
} }
/** /**
* This constructs a CHPFormattedDiskPage from a raw fkp (512 byte array * This constructs a CHPFormattedDiskPage from a raw fkp (512 byte array
* read from a Word file). * read from a Word file).
*
* @param ignoreChpxWithoutTextPieces
* TODO
*/ */
public CHPFormattedDiskPage( byte[] documentStream, int offset, int fcMin, public CHPFormattedDiskPage( byte[] documentStream, int offset, TextPieceTable tpt,
TextPieceTable tpt, boolean ignoreChpxWithoutTextPieces ) boolean ignoreChpxWithoutTextPieces )
{ {
super(documentStream, offset); super(documentStream, offset);
@ -128,7 +126,17 @@ public final class CHPFormattedDiskPage extends FormattedDiskPage
return chpx; return chpx;
} }
/**
* @deprecated Use {@link #toByteArray(CharIndexTranslator)} instead
*/
@Deprecated
@SuppressWarnings( "unused" )
protected byte[] toByteArray(CharIndexTranslator translator, int fcMin) protected byte[] toByteArray(CharIndexTranslator translator, int fcMin)
{
return toByteArray( translator );
}
protected byte[] toByteArray(CharIndexTranslator translator)
{ {
byte[] buf = new byte[512]; byte[] buf = new byte[512];
int size = _chpxList.size(); int size = _chpxList.size();

View File

@ -60,7 +60,7 @@ public final class OldCHPBinTable extends CHPBinTable
int pageOffset = POIFSConstants.SMALLER_BIG_BLOCK_SIZE * pageNum; int pageOffset = POIFSConstants.SMALLER_BIG_BLOCK_SIZE * pageNum;
CHPFormattedDiskPage cfkp = new CHPFormattedDiskPage(documentStream, CHPFormattedDiskPage cfkp = new CHPFormattedDiskPage(documentStream,
pageOffset, fcMin, tpt, true); pageOffset, tpt, true);
int fkpSize = cfkp.size(); int fkpSize = cfkp.size();

View File

@ -46,7 +46,7 @@ public final class TestCHPBinTable
byte[] tableStream = _hWPFDocFixture._tableStream; byte[] tableStream = _hWPFDocFixture._tableStream;
int fcMin = fib.getFcMin(); 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(); HWPFFileSystem fileSys = new HWPFFileSystem();
@ -57,7 +57,7 @@ public final class TestCHPBinTable
byte[] newTableStream = tableOut.toByteArray(); byte[] newTableStream = tableOut.toByteArray();
byte[] newMainStream = mainOut.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 oldTextRuns = _cHPBinTable._textRuns;
ArrayList newTextRuns = newBinTable._textRuns; ArrayList newTextRuns = newBinTable._textRuns;