mark GutsRecord as terminating row blocks, prevent exception when reading workbooks with unexpected GutsRecords, see Bugzilla 50426

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1044655 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Yegor Kozlov 2010-12-11 13:48:18 +00:00
parent 039f4ccfa1
commit 340ed55cf5
4 changed files with 7 additions and 0 deletions

View File

@ -34,6 +34,7 @@
<changes> <changes>
<release version="3.8-beta1" date="2010-??-??"> <release version="3.8-beta1" date="2010-??-??">
<action dev="POI-DEVELOPERS" type="fix">50246 - Properly position GutsRecord when reading HSSF workbooks</action>
<action dev="POI-DEVELOPERS" type="add">48539 - Added implementation for MROUND(), VAR() and VARP()</action> <action dev="POI-DEVELOPERS" type="add">48539 - Added implementation for MROUND(), VAR() and VARP()</action>
<action dev="POI-DEVELOPERS" type="add">50446 - Code cleanup and optimizations to keep some IDE quiet</action> <action dev="POI-DEVELOPERS" type="add">50446 - Code cleanup and optimizations to keep some IDE quiet</action>
<action dev="POI-DEVELOPERS" type="add">50437 - Support passing ranges to NPV()</action> <action dev="POI-DEVELOPERS" type="add">50437 - Support passing ranges to NPV()</action>

View File

@ -417,6 +417,7 @@ final class RecordOrderer {
case ObjRecord.sid: case ObjRecord.sid:
case TextObjectRecord.sid: case TextObjectRecord.sid:
case GutsRecord.sid: // see Bugzilla 50426
case WindowOneRecord.sid: case WindowOneRecord.sid:
// should really be part of workbook stream, but some apps seem to put this before WINDOW2 // should really be part of workbook stream, but some apps seem to put this before WINDOW2
case WindowTwoRecord.sid: case WindowTwoRecord.sid:

View File

@ -1894,4 +1894,9 @@ if(1==2) {
HSSFWorkbook wb = openSample("50020.xls"); HSSFWorkbook wb = openSample("50020.xls");
writeOutAndReadBack(wb); writeOutAndReadBack(wb);
} }
public void test50426() throws Exception {
HSSFWorkbook wb = openSample("50426.xls");
writeOutAndReadBack(wb);
}
} }

Binary file not shown.