You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by ye...@apache.org on 2010/10/04 10:45:51 UTC

svn commit: r1004143 - in /poi/trunk: src/documentation/content/xdocs/ src/java/org/apache/poi/hssf/model/ src/java/org/apache/poi/hssf/record/ src/testcases/org/apache/poi/hssf/usermodel/ test-data/spreadsheet/

Author: yegor
Date: Mon Oct  4 08:45:51 2010
New Revision: 1004143

URL: http://svn.apache.org/viewvc?rev=1004143&view=rev
Log:
Avoid IllegalStateException when creating Data validation in sheet with macro, see Bugzilla 50020

Added:
    poi/trunk/test-data/spreadsheet/50020.xls   (with props)
Modified:
    poi/trunk/src/documentation/content/xdocs/status.xml
    poi/trunk/src/java/org/apache/poi/hssf/model/RecordOrderer.java
    poi/trunk/src/java/org/apache/poi/hssf/record/UnknownRecord.java
    poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java

Modified: poi/trunk/src/documentation/content/xdocs/status.xml
URL: http://svn.apache.org/viewvc/poi/trunk/src/documentation/content/xdocs/status.xml?rev=1004143&r1=1004142&r2=1004143&view=diff
==============================================================================
--- poi/trunk/src/documentation/content/xdocs/status.xml (original)
+++ poi/trunk/src/documentation/content/xdocs/status.xml Mon Oct  4 08:45:51 2010
@@ -34,6 +34,7 @@
 
     <changes>
         <release version="3.7-beta4" date="2010-??-??">
+           <action dev="poi-developers" type="fix">50020 - Avoid IllegalStateException when creating Data validation in sheet with macro</action>
            <action dev="poi-developers" type="fix">50033 - Improved rounding in MOD</action>
            <action dev="poi-developers" type="add">Generate SHA1 hashes of distribution files, alongside existing MD5 ones</action>
         </release>

Modified: poi/trunk/src/java/org/apache/poi/hssf/model/RecordOrderer.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/model/RecordOrderer.java?rev=1004143&r1=1004142&r2=1004143&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/model/RecordOrderer.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/model/RecordOrderer.java Mon Oct  4 08:45:51 2010
@@ -333,6 +333,8 @@ final class RecordOrderer {
 			// ConditionalFormattingTable
 			case HyperlinkRecord.sid:
 			case UnknownRecord.QUICKTIP_0800:
+            // name of a VBA module    
+            case UnknownRecord.CODENAME_1BA:
 				return true;
 		}
 		return false;

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/UnknownRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/UnknownRecord.java?rev=1004143&r1=1004142&r2=1004143&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/UnknownRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/UnknownRecord.java Mon Oct  4 08:45:51 2010
@@ -57,6 +57,7 @@ public final class UnknownRecord extends
 	public static final int SHEETEXT_0862        = 0x0862; // OOO calls this SHEETLAYOUT
 	public static final int SHEETPROTECTION_0867 = 0x0867;
 	public static final int HEADER_FOOTER_089C   = 0x089C;
+    public static final int CODENAME_1BA         = 0x01BA;
 
 	private int _sid;
 	private byte[] _rawData;

Modified: poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java?rev=1004143&r1=1004142&r2=1004143&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java Mon Oct  4 08:45:51 2010
@@ -1886,4 +1886,12 @@ if(1==2) {
              "BlahBlah blah blah  ", f.getCenter()
        );
     }
+
+    /**
+     * IllegalStateException received when creating Data validation in sheet with macro
+     */
+    public void test50020() throws Exception {
+       HSSFWorkbook wb = openSample("50020.xls");
+       writeOutAndReadBack(wb);
+    }
 }

Added: poi/trunk/test-data/spreadsheet/50020.xls
URL: http://svn.apache.org/viewvc/poi/trunk/test-data/spreadsheet/50020.xls?rev=1004143&view=auto
==============================================================================
Binary file - no diff available.

Propchange: poi/trunk/test-data/spreadsheet/50020.xls
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream



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