]> source.dussan.org Git - poi.git/commitdiff
bug 59170: remove deprecated methods
authorJaven O'Neal <onealj@apache.org>
Wed, 15 Jun 2016 03:26:58 +0000 (03:26 +0000)
committerJaven O'Neal <onealj@apache.org>
Wed, 15 Jun 2016 03:26:58 +0000 (03:26 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1748483 13f79535-47bb-0310-9956-ffa450edef68

29 files changed:
.project
src/java/org/apache/poi/hssf/extractor/EventBasedExcelExtractor.java
src/java/org/apache/poi/hssf/extractor/ExcelExtractor.java
src/java/org/apache/poi/hssf/model/InternalSheet.java
src/java/org/apache/poi/hssf/model/LinkTable.java
src/java/org/apache/poi/hssf/util/CellRangeAddress.java [deleted file]
src/java/org/apache/poi/hssf/util/CellRangeAddress8Bit.java
src/java/org/apache/poi/hssf/util/CellRangeAddressList.java [deleted file]
src/java/org/apache/poi/util/LittleEndian.java
src/scratchpad/src/org/apache/poi/hdgf/chunks/ChunkHeader.java
src/scratchpad/src/org/apache/poi/hslf/record/CString.java
src/scratchpad/src/org/apache/poi/hslf/record/ExControlAtom.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/ComplexFileTable.java
src/scratchpad/src/org/apache/poi/hwpf/model/Ffn.java
src/scratchpad/src/org/apache/poi/hwpf/model/FontTable.java
src/scratchpad/src/org/apache/poi/hwpf/model/FormattedDiskPage.java
src/scratchpad/src/org/apache/poi/hwpf/model/Hyphenation.java
src/scratchpad/src/org/apache/poi/hwpf/model/PAPBinTable.java
src/scratchpad/src/org/apache/poi/hwpf/model/PAPFormattedDiskPage.java
src/scratchpad/src/org/apache/poi/hwpf/model/PAPX.java
src/scratchpad/src/org/apache/poi/hwpf/model/SectionTable.java
src/scratchpad/src/org/apache/poi/hwpf/sprm/ParagraphSprmCompressor.java
src/scratchpad/src/org/apache/poi/hwpf/sprm/SectionSprmCompressor.java
src/scratchpad/src/org/apache/poi/hwpf/sprm/SprmUtils.java
src/scratchpad/src/org/apache/poi/hwpf/usermodel/Range.java
src/scratchpad/testcases/org/apache/poi/hwpf/model/TestPlexOfCps.java
src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java

index 274051f30a2f52337a304b42d9ca2c21a980fe7b..5617510959da7f152561982dee24a33bf8d7c4be 100644 (file)
--- a/.project
+++ b/.project
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <projectDescription>
-       <name>ApachePOI</name>
+       <name>ApachePOI-bug57840</name>
        <comment></comment>
        <projects>
        </projects>
index 859309fc0c5a19fc9918f70e9f069d497ad73709..115d9b1d8716d9319578f070b574607c269ab9a8 100644 (file)
@@ -65,15 +65,6 @@ public class EventBasedExcelExtractor extends POIOLE2TextExtractor implements or
     boolean _includeSheetNames = true;
     boolean _formulasNotResults = false;
 
-    /**
-     * @deprecated Use {@link #EventBasedExcelExtractor(DirectoryNode)} instead
-     */
-    @Deprecated
-    public EventBasedExcelExtractor( DirectoryNode dir, POIFSFileSystem fs )
-    {
-        this( dir );
-    }
-
     public EventBasedExcelExtractor( DirectoryNode dir )
     {
         super( (POIDocument)null );
index cbe1e4d4430c43737c46cf69c2ed5ed7c6b58218..d6046845bc6bcf0d469a7b3bb57586697a1df9e0 100644 (file)
@@ -69,14 +69,7 @@ public class ExcelExtractor extends POIOLE2TextExtractor implements org.apache.p
        public ExcelExtractor(POIFSFileSystem fs) throws IOException {
                this(fs.getRoot());
        }
-       /**
-     * @deprecated Use {@link #ExcelExtractor(DirectoryNode)} instead
-     */
-    @Deprecated
-    public ExcelExtractor(DirectoryNode dir, POIFSFileSystem fs) throws IOException {
-        this( dir );
-    }
-    public ExcelExtractor(DirectoryNode dir) throws IOException {
+       public ExcelExtractor(DirectoryNode dir) throws IOException {
                this(new HSSFWorkbook(dir, true));
        }
 
index 1cbc004c816756bbed9455752b3c91b14eca74e3..76de9513620f7c4d8b9bd7f740ec778a29dbb491 100644 (file)
@@ -779,25 +779,6 @@ public final class InternalSheet {
        return _rowsAggregate.getCellValueIterator();
     }
 
-    /**
-     * Get all the value records (from LOC). Records will be returned from the first
-     *  record (starting at LOC) which is a value record.
-     *
-     * <P>
-     * This method is "loc" sensitive.  Meaning you need to set LOC to where you
-     * want it to start searching.  If you don't know do this: setLoc(getDimsLoc).
-     * When adding several rows you can just start at the last one by leaving loc
-     * at what this sets it to.  For this method, set loc to dimsloc to start with,
-     * subsequent calls will return values in (physical) sequence or NULL when you get to the end.
-     *
-     * @return Array of CellValueRecordInterface representing the remaining value records
-     * @deprecated use {@link #getCellValueIterator()} instead
-     */
-    @Deprecated
-    public CellValueRecordInterface[] getValueRecords() {
-        return _rowsAggregate.getValueRecords();
-    }
-
     /**
      * get the NEXT RowRecord (from LOC).  The first record that is a Row record
      * (starting at LOC) will be returned.
index cc228b3dfd13b5b105140c73301463ffabcf49e2..f6f75692cec1f531a2b272cbb14e65830d90e28d 100644 (file)
@@ -488,14 +488,6 @@ final class LinkTable {
         return _externSheetRecord.getLastSheetIndexFromRefIndex(extRefIndex);
     }
 
-       /**
-        * @deprecated Was prevously used for removing sheets, which we now do differently 
-        */
-       @Deprecated
-    public void updateIndexToInternalSheet(int extRefIndex, int offset) {
-        _externSheetRecord.adjustIndex(extRefIndex, offset);
-    }
-
        public void removeSheet(int sheetIdx) {
                _externSheetRecord.removeSheet(sheetIdx);
        }
diff --git a/src/java/org/apache/poi/hssf/util/CellRangeAddress.java b/src/java/org/apache/poi/hssf/util/CellRangeAddress.java
deleted file mode 100644 (file)
index a59fa5e..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/* ====================================================================
-   Licensed to the Apache Software Foundation (ASF) under one or more
-   contributor license agreements.  See the NOTICE file distributed with
-   this work for additional information regarding copyright ownership.
-   The ASF licenses this file to You under the Apache License, Version 2.0
-   (the "License"); you may not use this file except in compliance with
-   the License.  You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
-==================================================================== */
-
-package org.apache.poi.hssf.util;
-
-import org.apache.poi.hssf.record.RecordInputStream;
-import org.apache.poi.hssf.record.SelectionRecord;
-
-/**
- * See OOO documentation: excelfileformat.pdf sec 2.5.14 - 'Cell Range Address'<p/>
- *
- * Note - {@link SelectionRecord} uses the BIFF5 version of this structure
- * @deprecated use {@link org.apache.poi.ss.util.CellRangeAddress}
- */
-public class CellRangeAddress extends org.apache.poi.ss.util.CellRangeAddress {
-
-       public CellRangeAddress(int firstRow, int lastRow, int firstCol, int lastCol) {
-               super(firstRow, lastRow, firstCol, lastCol);
-       }
-       public CellRangeAddress(RecordInputStream in) {
-               super(in);
-       }
-}
index 83f79b996a526beab87b83ff4d32ea61ca907cc9..8ec6733aafc4c88f272faba6d3746fe11020b722 100644 (file)
@@ -47,13 +47,6 @@ public final class CellRangeAddress8Bit extends CellRangeAddressBase {
                return in.readUShort();
        }
 
-       /**
-        * @deprecated use {@link #serialize(LittleEndianOutput)}
-        */
-       public int serialize(int offset, byte[] data) {
-               serialize(new LittleEndianByteArrayOutputStream(data, offset, ENCODED_SIZE));
-               return ENCODED_SIZE;
-       }
        public void serialize(LittleEndianOutput out) {
                out.writeShort(getFirstRow());
                out.writeShort(getLastRow());
diff --git a/src/java/org/apache/poi/hssf/util/CellRangeAddressList.java b/src/java/org/apache/poi/hssf/util/CellRangeAddressList.java
deleted file mode 100644 (file)
index d715eee..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-/* ====================================================================
-   Licensed to the Apache Software Foundation (ASF) under one or more
-   contributor license agreements.  See the NOTICE file distributed with
-   this work for additional information regarding copyright ownership.
-   The ASF licenses this file to You under the Apache License, Version 2.0
-   (the "License"); you may not use this file except in compliance with
-   the License.  You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
-==================================================================== */
-
-package org.apache.poi.hssf.util;
-
-import org.apache.poi.hssf.record.RecordInputStream;
-
-/**
- * Implementation of the cell range address lists,like is described
- * in OpenOffice.org's Excel Documentation: excelfileformat.pdf sec 2.5.14 -
- * 'Cell Range Address List'
- * 
- * In BIFF8 there is a common way to store absolute cell range address lists in
- * several records (not formulas). A cell range address list consists of a field
- * with the number of ranges and the list of the range addresses. Each cell
- * range address (called an ADDR structure) contains 4 16-bit-values.
- * </p>
- * 
- * @deprecated use {@link org.apache.poi.ss.util.CellRangeAddressList}
- */
-public class CellRangeAddressList extends org.apache.poi.ss.util.CellRangeAddressList {
-       public CellRangeAddressList(int firstRow, int lastRow, int firstCol, int lastCol) {
-               super(firstRow,lastRow,firstCol,lastCol);
-       }
-       public CellRangeAddressList() {
-               super();
-       }
-
-       /**
-        * @param in the RecordInputstream to read the record from
-        */
-       public CellRangeAddressList(RecordInputStream in) {
-               super();
-               int nItems = in.readUShort();
-
-               for (int k = 0; k < nItems; k++) {
-                       _list.add(new CellRangeAddress(in));
-               }
-       }
-}
index 6ceb12a4a1137bf1ac22627b3ba965b7d938cdb8..45fc0eb30a18a27531dd01f4122a10dc9e921120 100644 (file)
@@ -301,22 +301,6 @@ public class LittleEndian implements LittleEndianConsts
         return retNum & 0x00FFFFFFFFl;
     }
 
-    /**
-     * get the unsigned value of a byte.
-     * 
-     * @param data
-     *            the byte array.
-     * @param offset
-     *            a starting offset into the byte array.
-     * @return the unsigned value of the byte as a 32 bit integer
-     * @deprecated Use {@link #getUByte(byte[], int)} instead
-     */
-    @Deprecated
-    public static int getUnsignedByte( byte[] data, int offset )
-    {
-        return data[offset] & 0xFF;
-    }
-
     /**
      * get an unsigned short value from the beginning of a byte array
      * 
@@ -421,21 +405,6 @@ public class LittleEndian implements LittleEndianConsts
         putInt( Float.floatToIntBits( value ), outputStream );
     }
 
-    /**
-     * put an int value into beginning of a byte array
-     * 
-     * @param data
-     *            the byte array
-     * @param value
-     *            the int (32-bit) value
-     * @deprecated Use {@link #putInt(byte[], int, int)} instead
-     */
-    @Deprecated
-    public static void putInt( byte[] data, int value )
-    {
-        putInt( data, 0, value );
-    }
-
     /**
      * put an int value into a byte array
      * 
@@ -536,21 +505,6 @@ public class LittleEndian implements LittleEndianConsts
         data[i++] = (byte) ( ( value >>> 8 ) & 0xFF );
     }
 
-    /**
-     * put a short value into beginning of a byte array
-     * 
-     * @param data
-     *            the byte array
-     * @param value
-     *            the short (16-bit) value
-     * @deprecated Use {@link #putShort(byte[], int, short)} instead
-     */
-    @Deprecated
-    public static void putShort( byte[] data, short value )
-    {
-        putShort( data, 0, value );
-    }
-
     /**
      * Put signed short into output stream
      * 
@@ -629,21 +583,6 @@ public class LittleEndian implements LittleEndianConsts
         data[i++] = (byte) ( ( value >>> 24 ) & 0xFF );
     }
 
-    /**
-     * put an unsigned int value into beginning of a byte array
-     * 
-     * @param data
-     *            the byte array
-     * @param value
-     *            the int (32-bit) value
-     * @deprecated Use {@link #putUInt(byte[], int, long)} instead
-     */
-    @Deprecated
-    public static void putUInt( byte[] data, long value )
-    {
-        putUInt( data, 0, value );
-    }
-
     /**
      * Put unsigned int into output stream
      * 
index fc8c0a30eb346aac0c3867f249fc6b01656dabd6..4b38366f7b46b462ae9f6420cac500a075ec3d57 100644 (file)
@@ -47,7 +47,7 @@ public abstract class ChunkHeader {
                        ch.unknown1 = (int)LittleEndian.getUInt(data, offset + 8);
                        ch.length   = (int)LittleEndian.getUInt(data, offset + 12);
                        ch.unknown2 = LittleEndian.getShort(data, offset + 16);
-                       ch.unknown3 = (short)LittleEndian.getUnsignedByte(data, offset + 18);
+                       ch.unknown3 = LittleEndian.getUByte(data, offset + 18);
 
                        return ch;
                } else if(documentVersion == 5 || documentVersion == 4) {
@@ -55,8 +55,8 @@ public abstract class ChunkHeader {
 
                        ch.type = LittleEndian.getShort(data, offset + 0);
                        ch.id   = LittleEndian.getShort(data, offset + 2);
-                       ch.unknown2 = (short)LittleEndian.getUnsignedByte(data, offset + 4);
-                       ch.unknown3 = (short)LittleEndian.getUnsignedByte(data, offset + 5);
+                       ch.unknown2 = LittleEndian.getUByte(data, offset + 4);
+                       ch.unknown3 = LittleEndian.getUByte(data, offset + 5);
                        ch.unknown1 = LittleEndian.getShort(data, offset + 6);
                        ch.length   = (int)LittleEndian.getUInt(data, offset + 8);
 
index 0f088d3887b172e74131e21c39c0911ececbea98..0115438d2b4f11e50ef857de4344021ed17b795c 100644 (file)
@@ -66,7 +66,7 @@ public final class CString extends RecordAtom {
         * The meaning of the count is specific to the type of the parent record
         */
        public void setOptions(int count) {
-               LittleEndian.putShort(_header, (short)count);
+               LittleEndian.putShort(_header, 0, (short)count);
        }
 
        /* *************** record code follows ********************** */
index 951b5759ebd2e09216d574cb341cf118a7bc53b1..b5540cee5a4ff39e563cc3b1a3295c6407d4a0d9 100644 (file)
@@ -110,7 +110,7 @@ public final class ExControlAtom extends RecordAtom {
     public void writeOut(OutputStream out) throws IOException {
         out.write(_header);
         byte[] data = new byte[4];
-        LittleEndian.putInt(data, _id);
+        LittleEndian.putInt(data, 0, _id);
         out.write(data);
     }
 
index 7a3f19121bbab2fa311b29258286b3b4c579337b..ee4a377270943fe68d301145d39a51a82bda6779 100644 (file)
@@ -511,7 +511,7 @@ public class CHPBinTable
       }
 
       byte[] intHolder = new byte[4];
-      LittleEndian.putInt(intHolder, pageNum++);
+      LittleEndian.putInt(intHolder, 0, pageNum++);
       bte.addProperty(new GenericPropertyNode(start, end, intHolder));
 
     }
index ee50fb55ff3b0b2da4e2ecf8436138ada75970f6..8c63dce6c3bea47bc12b148930bced5c51a830c9 100644 (file)
@@ -124,7 +124,7 @@ public final class CHPFormattedDiskPage extends FormattedDiskPage
      */
     protected byte[] getGrpprl(int index)
     {
-        int chpxOffset = 2 * LittleEndian.getUnsignedByte(_fkp, _offset + (((_crun + 1) * 4) + index));
+        int chpxOffset = 2 * LittleEndian.getUByte(_fkp, _offset + (((_crun + 1) * 4) + index));
 
         //optimization if offset == 0 use "Normal" style
         if(chpxOffset == 0)
@@ -132,7 +132,7 @@ public final class CHPFormattedDiskPage extends FormattedDiskPage
             return new byte[0];
         }
 
-        int size = LittleEndian.getUnsignedByte(_fkp, _offset + chpxOffset);
+        int size = LittleEndian.getUByte(_fkp, _offset + chpxOffset);
 
         byte[] chpx = new byte[size];
 
index 687b67e0bd5d62a6e4bbc7d1a40ec6b995bef2cf..f980251cb6d9b8b4810f2d6e6d809cc1e39ac63d 100644 (file)
@@ -97,7 +97,7 @@ public final class ComplexFileTable
         byte[] table = _tpt.writeTo( wordDocumentStream );
 
         byte[] numHolder = new byte[LittleEndian.INT_SIZE];
-        LittleEndian.putInt( numHolder, table.length );
+        LittleEndian.putInt( numHolder, 0, table.length );
         tableStream.write( numHolder );
         tableStream.write( table );
     }
index 4f469dad09d9b0cc94fc890b4e9413b5dcc21962..935d408a8e6b03597ee17b234ec31d56bbd8ebf4 100644 (file)
@@ -57,7 +57,7 @@ public final class Ffn
   {
     int offsetTmp = offset;
 
-    _cbFfnM1 = LittleEndian.getUnsignedByte(buf,offset);
+    _cbFfnM1 = LittleEndian.getUByte(buf,offset);
     offset += LittleEndian.BYTE_SIZE;
     _info = buf[offset];
     offset += LittleEndian.BYTE_SIZE;
index bedf1e59fed79d77e9d3ed0d8b229060034e61f1..8776cb3dd0a04ea2620a1b68e1a1643a5cb4866f 100644 (file)
@@ -125,9 +125,9 @@ public final class FontTable
     public void writeTo( HWPFOutputStream tableStream ) throws IOException
     {
          byte[] buf = new byte[LittleEndian.SHORT_SIZE];
-         LittleEndian.putShort(buf, _stringCount);
+         LittleEndian.putShort(buf, 0, _stringCount);
          tableStream.write(buf);
-         LittleEndian.putShort(buf, _extraDataSz);
+         LittleEndian.putShort(buf, 0, _extraDataSz);
          tableStream.write(buf);
 
          for(int i = 0; i < _fontNames.length; i++)
index 4be886aa2428fa7c1c7f2b7eb9013cf30e337f4b..0d06383a6c609774c1d534d53411ac86d4991da2 100644 (file)
@@ -58,7 +58,7 @@ public abstract class FormattedDiskPage
      */
     public FormattedDiskPage(byte[] documentStream, int offset)
     {
-        _crun = LittleEndian.getUnsignedByte(documentStream, offset + 511);
+        _crun = LittleEndian.getUByte(documentStream, offset + 511);
         _fkp = documentStream;
         _offset = offset;
     }
index 4ef53f56b0cccbf0da3bf7d46f00935561e71ab4..0860a38f762b7fa397780f62f027467df6162279 100644 (file)
@@ -38,7 +38,7 @@ public final class Hyphenation extends HRESIAbstractType implements Cloneable
     public Hyphenation( short hres )
     {
         byte[] data = new byte[2];
-        LittleEndian.putShort( data, hres );
+        LittleEndian.putShort( data, 0, hres );
         fillFields( data, 0 );
     }
 
index a139ee0f4fa0f54d81ef50f82914125fb8f52825..a88b42ae071dda73de4b74149347d7f751e3cf6a 100644 (file)
@@ -459,7 +459,7 @@ public class PAPBinTable
       }
 
       byte[] intHolder = new byte[4];
-      LittleEndian.putInt(intHolder, pageNum++);
+      LittleEndian.putInt(intHolder, 0, pageNum++);
       binTable.addProperty(new GenericPropertyNode(start, end, intHolder));
 
     }
index adf35d0d257dec336f7b83ca97ae443339fa2fff..d314d95b4e79caeb3d5d9f0f90edb870a8727c2c 100644 (file)
@@ -156,11 +156,11 @@ public final class PAPFormattedDiskPage extends FormattedDiskPage {
      */
     protected byte[] getGrpprl(int index)
     {
-        int papxOffset = 2 * LittleEndian.getUnsignedByte(_fkp, _offset + (((_crun + 1) * FC_SIZE) + (index * BX_SIZE)));
-        int size = 2 * LittleEndian.getUnsignedByte(_fkp, _offset + papxOffset);
+        int papxOffset = 2 * LittleEndian.getUByte(_fkp, _offset + (((_crun + 1) * FC_SIZE) + (index * BX_SIZE)));
+        int size = 2 * LittleEndian.getUByte(_fkp, _offset + papxOffset);
         if(size == 0)
         {
-            size = 2 * LittleEndian.getUnsignedByte(_fkp, _offset + ++papxOffset);
+            size = 2 * LittleEndian.getUByte(_fkp, _offset + ++papxOffset);
         }
         else
         {
index 837b83b97fc743d70aebe31ac3502579130117cb..689e3451f68b28a7d042ed9cb2d4f50fc58f59fd 100644 (file)
@@ -130,7 +130,7 @@ public final class PAPX extends BytePropertyNode<PAPX> {
     }
     if (buf.length == 1)
     {
-      return (short)LittleEndian.getUnsignedByte(buf, 0);
+      return LittleEndian.getUByte(buf, 0);
     }
     return LittleEndian.getShort(buf);
   }
index 956b1b962b2646b72f01b99a4d8c7699e6a8088f..ea2bef98a1f85d12bde9a8ced6fa707d21a717b0 100644 (file)
@@ -190,7 +190,7 @@ public class SectionTable
       // write the sepx to the document stream. starts with a 2 byte size
       // followed by the grpprl
       byte[] shortBuf = new byte[2];
-      LittleEndian.putShort(shortBuf, (short)grpprl.length);
+      LittleEndian.putShort(shortBuf, 0, (short)grpprl.length);
 
       wordDocumentStream.write(shortBuf);
       wordDocumentStream.write(grpprl);
index 4ae6434d0c31ea54632b54ca8db6ebbd218d095b..2f60b536fe1523634bd976f0b2a8be8982da06f3 100644 (file)
@@ -388,7 +388,7 @@ public final class ParagraphSprmCompressor
         {
             // sprmPRsid
             byte[] value = new byte[4];
-            LittleEndian.putUInt( value, newPAP.getRsid() );
+            LittleEndian.putUInt( value, 0, newPAP.getRsid() );
             size += SprmUtils.addSprm( (short) 0x6467, 0, value, sprmList );
         }
 
index 273124fe61d52748e1801ca4e4a334e7bab2fb71..723ab994e65d115017b85a928636e959d7cd8a71 100644 (file)
@@ -188,7 +188,7 @@ public final class SectionSprmCompressor
       byte[] buf = new byte[7];
       buf[0] = (byte)(newSEP.getFPropMark() ? 1 : 0);
       int offset = LittleEndian.BYTE_SIZE;
-      LittleEndian.putShort(buf, (short)newSEP.getIbstPropRMark());
+      LittleEndian.putShort(buf, 0, (short)newSEP.getIbstPropRMark());
       offset += LittleEndian.SHORT_SIZE;
       newSEP.getDttmPropRMark().serialize(buf, offset);
       size += SprmUtils.addSprm((short)0xD227, -1, buf, sprmList);
index 81ff0c91f6411fd1ad9ba732b5363b145a33c606..c155be566a3b0a2b3e533e82eacf4806daec962d 100644 (file)
@@ -46,7 +46,7 @@ public final class SprmUtils
   {
     byte[] sprm = new byte[varParam.length + 4];
     System.arraycopy(varParam, 0, sprm, 4, varParam.length);
-    LittleEndian.putShort(sprm, instruction);
+    LittleEndian.putShort(sprm, 0, instruction);
     LittleEndian.putShort(sprm, 2, (short)(varParam.length + 1));
     list.add(sprm);
     return sprm.length;
@@ -124,7 +124,7 @@ public final class SprmUtils
   public static int convertBrcToInt(short[] brc)
   {
     byte[] buf = new byte[4];
-    LittleEndian.putShort(buf, brc[0]);
+    LittleEndian.putShort(buf, 0, brc[0]);
     LittleEndian.putShort(buf, LittleEndian.SHORT_SIZE, brc[1]);
     return LittleEndian.getInt(buf);
   }
index 52ba548e5b3f1c79046f186edab8beb41d8e2cd1..98abbd18732ecd0ebb4af3bee0b7a4ea44b8a6ed 100644 (file)
@@ -476,7 +476,7 @@ public class Range { // TODO -instantiable superclass
 
                byte[] grpprl = ParagraphSprmCompressor.compressParagraphProperty(props, baseStyle);
                byte[] withIndex = new byte[grpprl.length + LittleEndian.SHORT_SIZE];
-               LittleEndian.putShort(withIndex, (short) styleIndex);
+               LittleEndian.putShort(withIndex, 0, (short) styleIndex);
                System.arraycopy(grpprl, 0, withIndex, LittleEndian.SHORT_SIZE, grpprl.length);
                SprmBuffer buf = new SprmBuffer(withIndex, 2);
 
@@ -527,7 +527,7 @@ public class Range { // TODO -instantiable superclass
 
                byte[] grpprl = ParagraphSprmCompressor.compressParagraphProperty(props, baseStyle);
                byte[] withIndex = new byte[grpprl.length + LittleEndian.SHORT_SIZE];
-               LittleEndian.putShort(withIndex, (short) styleIndex);
+               LittleEndian.putShort(withIndex, 0, (short) styleIndex);
                System.arraycopy(grpprl, 0, withIndex, LittleEndian.SHORT_SIZE, grpprl.length);
                SprmBuffer buf = new SprmBuffer(withIndex, 2);
 
index 2f4ba063ed190cea98a7022a497db94d1fe90208..f5f316236377a5d2a7e716f02abcb19916c65ef9 100644 (file)
@@ -36,7 +36,7 @@ public final class TestPlexOfCps
     {
       byte[] intHolder = new byte[4];
       int span = (int)(110.0f * Math.random());
-      LittleEndian.putInt(intHolder, span);
+      LittleEndian.putInt(intHolder, 0, span);
       _plexOfCps.addProperty(new GenericPropertyNode(last, last + span, intHolder));
       last += span;
     }
index e55680538f689e2e39da8a614d23daadb4055d1d..7ccae676bdcf76df56fff874857040154d383249 100644 (file)
@@ -1140,10 +1140,9 @@ public final class TestBugs extends BaseTestBugzillaIssues {
         confirmCachedValue("70164", nc2);
         confirmCachedValue("90210", nc3);
 
-        @SuppressWarnings("deprecation")
-        CellValueRecordInterface[] cvrs = ns.getSheet().getValueRecords();
-        for (int i = 0; i < cvrs.length; i++) {
-            CellValueRecordInterface cvr = cvrs[i];
+        int i = 0;
+        for (Iterator<CellValueRecordInterface> it = ns.getSheet().getCellValueIterator(); it.hasNext(); i++) {
+            CellValueRecordInterface cvr = it.next();
             if(cvr instanceof FormulaRecordAggregate) {
                 FormulaRecordAggregate fr = (FormulaRecordAggregate)cvr;
 
@@ -1161,7 +1160,7 @@ public final class TestBugs extends BaseTestBugzillaIssues {
                 }
             }
         }
-        assertEquals(3, cvrs.length);
+        assertEquals(3, i);
         wb2.close();
     }