]> source.dussan.org Git - poi.git/commitdiff
remove unused parameters
authorSergey Vladimirov <sergey@apache.org>
Sun, 10 Jul 2011 18:04:17 +0000 (18:04 +0000)
committerSergey Vladimirov <sergey@apache.org>
Sun, 10 Jul 2011 18:04:17 +0000 (18:04 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1144923 13f79535-47bb-0310-9956-ffa450edef68

src/scratchpad/src/org/apache/poi/hwpf/HWPFDocument.java
src/scratchpad/src/org/apache/poi/hwpf/model/CHPBinTable.java
src/scratchpad/src/org/apache/poi/hwpf/model/CHPFormattedDiskPage.java
src/scratchpad/src/org/apache/poi/hwpf/model/OldCHPBinTable.java
src/scratchpad/testcases/org/apache/poi/hwpf/model/TestCHPBinTable.java

index 69013820952604e2c1b993b6d23dff8d1fb2b0a2..a7090d419e2abc17017029a4368191d47928f8c9 100644 (file)
@@ -221,7 +221,7 @@ public final class HWPFDocument extends HWPFDocumentCore
 
     // 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
index 3097e000482f1fb793abcf47dfbcc41a66d06d03..c03a4040b83a46f67ec1ba116dab9dbf69b74738 100644 (file)
@@ -51,21 +51,20 @@ public class CHPBinTable
      * 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:
@@ -87,7 +86,7 @@ public class CHPBinTable
       int pageOffset = POIFSConstants.SMALLER_BIG_BLOCK_SIZE * pageNum;
 
       CHPFormattedDiskPage cfkp = new CHPFormattedDiskPage(documentStream,
-        pageOffset, fcMin, tpt, ignoreChpxWithoutTextPieces);
+        pageOffset, tpt, ignoreChpxWithoutTextPieces);
 
       int fkpSize = cfkp.size();
 
@@ -243,7 +242,7 @@ public class CHPBinTable
       CHPFormattedDiskPage cfkp = new CHPFormattedDiskPage();
       cfkp.fill(overflow);
 
-            byte[] bufFkp = cfkp.toByteArray( tpt, fcMin );
+            byte[] bufFkp = cfkp.toByteArray( tpt );
       docStream.write(bufFkp);
       overflow = cfkp.getOverflow();
 
index 68615dd4ff15116fad4895aad3a8c2335da6a9a1..ed5dae220b1573e4670d0726e2a6fa9b0fa81bce 100644 (file)
@@ -55,24 +55,22 @@ public final class CHPFormattedDiskPage extends FormattedDiskPage
      * 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);
 
@@ -128,7 +126,17 @@ public final class CHPFormattedDiskPage extends FormattedDiskPage
         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();
index c1f25dbb37ff62678fc09d6b25c380b6db5634b0..3f43c2f1bb6a0d311ef20c5a7558b71d164a8b54 100644 (file)
@@ -60,7 +60,7 @@ public final class OldCHPBinTable extends CHPBinTable
       int pageOffset = POIFSConstants.SMALLER_BIG_BLOCK_SIZE * pageNum;
 
       CHPFormattedDiskPage cfkp = new CHPFormattedDiskPage(documentStream,
-        pageOffset, fcMin, tpt, true);
+        pageOffset, tpt, true);
 
       int fkpSize = cfkp.size();
 
index c2b8789011f6b6d45071c80cc1e61625f7e40a24..e2aeeb46cb47ca15a03931883606e915853dd757 100644 (file)
@@ -46,7 +46,7 @@ public final class TestCHPBinTable
     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();
 
@@ -57,7 +57,7 @@ public final class TestCHPBinTable
     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;