poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r700356 [3/3] - in /poi/trunk/src: java/org/apache/poi/hssf/eventusermodel/dummyrecord/ java/org/apache/poi/hssf/record/ testcases/org/apache/poi/hssf/usermodel/
Date Tue, 30 Sep 2008 06:18:48 GMT
Modified: poi/trunk/src/java/org/apache/poi/hssf/record/WindowTwoRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/WindowTwoRecord.java?rev=700356&r1=700355&r2=700356&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/WindowTwoRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/WindowTwoRecord.java Mon Sep 29 23:18:44
2008
@@ -61,18 +61,8 @@
     {
     }
 
-    /**
-     * Constructs a WindowTwo record and sets its fields appropriately.
-     * @param in the RecordInputstream to read the record from
-     */
-
     public WindowTwoRecord(RecordInputStream in)
     {
-        super(in);
-    }
-
-    protected void fillFields(RecordInputStream in)
-    {
       int size = in.remaining();
         field_1_options      = in.readShort();
         field_2_top_row      = in.readShort();

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/WriteAccessRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/WriteAccessRecord.java?rev=700356&r1=700355&r2=700356&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/WriteAccessRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/WriteAccessRecord.java Mon Sep 29 23:18:44
2008
@@ -42,18 +42,8 @@
     {
     }
 
-    /**
-     * Constructs a WriteAccess record and sets its fields appropriately.
-     * @param in the RecordInputstream to read the record from
-     */
-
     public WriteAccessRecord(RecordInputStream in)
     {
-        super(in);
-    }
-
-    protected void fillFields(RecordInputStream in)
-    {
         byte[] data = in.readRemainder();
         //The string is always 112 characters (padded with spaces), therefore
         //this record can not be continued.

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/WriteProtectRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/WriteProtectRecord.java?rev=700356&r1=700355&r2=700356&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/WriteProtectRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/WriteProtectRecord.java Mon Sep 29 23:18:44
2008
@@ -1,4 +1,3 @@
-
 /* ====================================================================
    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
@@ -15,12 +14,10 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 ==================================================================== */
-        
 
 package org.apache.poi.hssf.record;
 
 import org.apache.poi.util.LittleEndian;
-import org.apache.poi.util.StringUtil;
 
 /**
  * Title:        Write Protect Record<P>
@@ -28,10 +25,7 @@
  * REFERENCE:  PG 425 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)<P>
  * @version 3.0-pre
  */
-
-public class WriteProtectRecord
-    extends Record
-{
+public final class WriteProtectRecord extends Record {
     public final static short sid = 0x86;
 
     public WriteProtectRecord()
@@ -39,17 +33,10 @@
     }
 
     /**
-     * Constructs a WriteAccess record and sets its fields appropriately.
-     * @param in the RecordInputstream to read the record from
+     * @param in unused (since this record has no data)
      */
-
     public WriteProtectRecord(RecordInputStream in)
     {
-        super(in);
-    }
-
-    protected void fillFields(RecordInputStream in)
-    {
     }
 
     public String toString()
@@ -63,8 +50,8 @@
 
     public int serialize(int offset, byte [] data)
     {
-        LittleEndian.putShort(data, 0 + offset, sid);
-        LittleEndian.putShort(data, 2 + offset, (short)0);
+        LittleEndian.putUShort(data, 0 + offset, sid);
+        LittleEndian.putUShort(data, 2 + offset, 0);
 
         return getRecordSize();
     }

Modified: poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFWorkbook.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFWorkbook.java?rev=700356&r1=700355&r2=700356&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFWorkbook.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFWorkbook.java Mon Sep 29
23:18:44 2008
@@ -498,18 +498,12 @@
         public BadlyBehavedRecord() {
             // 
         }
-        protected void fillFields(RecordInputStream in) {
-            throw new RuntimeException("Should not be called");
-        }
         public short getSid() {
             return 0x777;
         }
         public int serialize(int offset, byte[] data) {
             return 4;
         }
-        protected void validateSid(short id) {
-            throw new RuntimeException("Should not be called");
-        }
         public int getRecordSize() {
             return 8;
         }



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message