]> source.dussan.org Git - poi.git/commitdiff
New class org.apache.poi.hssf.record.RecordFormatException, which DDF uses instead...
authorNick Burch <nick@apache.org>
Mon, 21 Jul 2008 09:34:08 +0000 (09:34 +0000)
committerNick Burch <nick@apache.org>
Mon, 21 Jul 2008 09:34:08 +0000 (09:34 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@678374 13f79535-47bb-0310-9956-ffa450edef68

src/documentation/content/xdocs/changes.xml
src/documentation/content/xdocs/spreadsheet/converting.xml
src/documentation/content/xdocs/status.xml
src/java/org/apache/poi/ddf/DefaultEscherRecordFactory.java
src/java/org/apache/poi/ddf/EscherBlipWMFRecord.java
src/java/org/apache/poi/ddf/EscherDggRecord.java
src/java/org/apache/poi/ddf/EscherSpgrRecord.java
src/java/org/apache/poi/ddf/EscherSplitMenuColorsRecord.java
src/java/org/apache/poi/ddf/EscherTextboxRecord.java
src/java/org/apache/poi/hssf/record/RecordFormatException.java
src/java/org/apache/poi/util/RecordFormatException.java [new file with mode: 0644]

index b98efd167caa9261674bd0e8f7558df084ac6031..43d6bb7b167a5ec8cf9d39069f0dd3d5c60839f0 100644 (file)
@@ -37,6 +37,7 @@
 
                <!-- Don't forget to update status.xml too! -->
         <release version="3.5.1-beta2" date="2008-??-??">
+           <action dev="POI-DEVELOPERS" type="add">New class org.apache.poi.hssf.record.RecordFormatException, which DDF uses instead of the HSSF version, and the HSSF version inherits from</action>
            <action dev="POI-DEVELOPERS" type="add">45431 - Partial support for .xlm files. Not quite enough for excel to load them though</action>
            <action dev="POI-DEVELOPERS" type="fix">45430 - Correct named range sheet reporting when no local sheet id is given in the xml</action>
                </release>
index b9fcdcd0d617fb8d734eaf941f4d1260c629d396..8d0e966e35b9945c1a5ebf5a1ae043baaa424f4c 100644 (file)
         <em>org.apache.poi.ss.usermodel.Row.MissingCellPolicy</em>
        </p>
     </section>
+    <section><title>DDF and org.apache.poi.hssf.record.RecordFormatException</title>
+       <p>Previously, record level errors within DDF would throw an
+        exception from the hssf class heirachy. Now, record level errors
+        within DDF will throw a more general RecordFormatException,
+        <em>org.apache.poi.util.RecordFormatException</em></p>
+       <p>In addition, org.apache.poi.hssf.record.RecordFormatException
+        has been changed to inherit from the new       
+        <em>org.apache.poi.util.RecordFormatException</em>, so you may
+        wish to change catches of the hssf version to the new util version.
+       </p>
+    </section>
   </section>
   <section><title>Converting existing HSSF Usermodel code to SS Usermodel (for XSSF and HSSF)</title>
 
index c4e6cc5189f08702c97da49166db7eca30b1155e..f1f81d06993f4a00aef69cd4d26bae5b041267ce 100644 (file)
@@ -34,6 +34,7 @@
        <!-- Don't forget to update changes.xml too! -->
     <changes>
         <release version="3.5.1-beta2" date="2008-??-??">
+           <action dev="POI-DEVELOPERS" type="add">New class org.apache.poi.hssf.record.RecordFormatException, which DDF uses instead of the HSSF version, and the HSSF version inherits from</action>
            <action dev="POI-DEVELOPERS" type="add">45431 - Partial support for .xlm files. Not quite enough for excel to load them though</action>
            <action dev="POI-DEVELOPERS" type="fix">45430 - Correct named range sheet reporting when no local sheet id is given in the xml</action>
                </release>
index 4ca1bfebc9ead97668ff241c861e42457d1f30e3..f1d051d7be6b74bf45e576bbe0aa962db0cdc327 100644 (file)
@@ -18,7 +18,7 @@
         
 package org.apache.poi.ddf;
 
-import org.apache.poi.hssf.record.RecordFormatException;
+import org.apache.poi.util.RecordFormatException;
 
 import java.lang.reflect.Constructor;
 import java.util.HashMap;
index 54217e1bb12ea4f465a56c8a6da02a0d0edc8d6c..c307d2b0d5d5e686de808b492c5890044a1f601b 100644 (file)
@@ -18,9 +18,9 @@
         
 package org.apache.poi.ddf;
 
-import org.apache.poi.hssf.record.RecordFormatException;
 import org.apache.poi.util.HexDump;
 import org.apache.poi.util.LittleEndian;
+import org.apache.poi.util.RecordFormatException;
 
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
index cdc9281a8e4eef3c915ed8b02d4193bf28667e2d..cc0d3aef8e48542c1d5b6ca44bf70b1e05642501 100644 (file)
@@ -18,9 +18,9 @@
         
 package org.apache.poi.ddf;
 
-import org.apache.poi.hssf.record.RecordFormatException;
 import org.apache.poi.util.HexDump;
 import org.apache.poi.util.LittleEndian;
+import org.apache.poi.util.RecordFormatException;
 
 import java.util.*;
 
index 526f03eab528d3ab0071cc47900e7501136bb45b..4ff8eb4e7c298e546645c1738ae35c3d22a9e6e3 100644 (file)
@@ -20,7 +20,7 @@ package org.apache.poi.ddf;
 
 import org.apache.poi.util.HexDump;
 import org.apache.poi.util.LittleEndian;
-import org.apache.poi.hssf.record.RecordFormatException;
+import org.apache.poi.util.RecordFormatException;
 
 /**
  * The spgr record defines information about a shape group.  Groups in escher
index 65a8427f62172ee09ee44dbc39919bed868f820d..5fc0f360351c233736dfc62c8bb80b51e5906775 100644 (file)
@@ -20,7 +20,7 @@ package org.apache.poi.ddf;
 
 import org.apache.poi.util.HexDump;
 import org.apache.poi.util.LittleEndian;
-import org.apache.poi.hssf.record.RecordFormatException;
+import org.apache.poi.util.RecordFormatException;
 
 /**
  * A list of the most recently used colours for the drawings contained in
index f6fa597b3b209396047adefbd79a43e6acad1397..1a14dbb065fdaa4be1a3437b4f8b345c01edf1d9 100644 (file)
@@ -18,9 +18,9 @@
         
 package org.apache.poi.ddf;
 
-import org.apache.poi.hssf.record.RecordFormatException;
 import org.apache.poi.util.HexDump;
 import org.apache.poi.util.LittleEndian;
+import org.apache.poi.util.RecordFormatException;
 
 /**
  * Holds data from the parent application. Most commonly used to store
index b5da31c14124d426e26f9d15166cd68be539d79f..b1afd6f9bd0d31d0e741f50ac97b5c6166b5f5e9 100644 (file)
@@ -25,7 +25,7 @@ package org.apache.poi.hssf.record;
  */
 
 public class RecordFormatException
-    extends RuntimeException
+    extends org.apache.poi.util.RecordFormatException
 {
     public RecordFormatException(String exception)
     {
diff --git a/src/java/org/apache/poi/util/RecordFormatException.java b/src/java/org/apache/poi/util/RecordFormatException.java
new file mode 100644 (file)
index 0000000..d1643b8
--- /dev/null
@@ -0,0 +1,42 @@
+
+/* ====================================================================
+   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.util;
+
+/**
+ * A common exception thrown by our binary format parsers
+ *  (especially HSSF and DDF), when they hit invalid
+ *  format or data when processing a record.
+ */
+public class RecordFormatException
+    extends RuntimeException
+{
+    public RecordFormatException(String exception)
+    {
+        super(exception);
+    }
+    
+    public RecordFormatException(String exception, Throwable thr) {
+      super(exception, thr);
+    }
+    
+    public RecordFormatException(Throwable thr) {
+      super(thr);
+    }
+}