Bug #54016 - Avoid exception when parsing workbooks with DConRefRecord in row aggregate
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1402482 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
08c53a90dc
commit
7ba0f8af84
@ -34,6 +34,7 @@
|
|||||||
|
|
||||||
<changes>
|
<changes>
|
||||||
<release version="3.9-beta1" date="2012-??-??">
|
<release version="3.9-beta1" date="2012-??-??">
|
||||||
|
<action dev="poi-developers" type="fix">54016 - Avoid exception when parsing workbooks with DConRefRecord in row aggregate</action>
|
||||||
<action dev="poi-developers" type="fix">54008 - Fixed Ant build to support build directories with blanks</action>
|
<action dev="poi-developers" type="fix">54008 - Fixed Ant build to support build directories with blanks</action>
|
||||||
<action dev="poi-developers" type="fix">53374 - Avoid exceptions when parsing hyperlinks of type "javascript://"</action>
|
<action dev="poi-developers" type="fix">53374 - Avoid exceptions when parsing hyperlinks of type "javascript://"</action>
|
||||||
<action dev="poi-developers" type="fix">53404 - Fixed compatibility bug with modifying xls files created by POI-3.6 and earlier</action>
|
<action dev="poi-developers" type="fix">53404 - Fixed compatibility bug with modifying xls files created by POI-3.6 and earlier</action>
|
||||||
|
@ -24,20 +24,7 @@ import java.util.Map;
|
|||||||
import java.util.TreeMap;
|
import java.util.TreeMap;
|
||||||
|
|
||||||
import org.apache.poi.hssf.model.RecordStream;
|
import org.apache.poi.hssf.model.RecordStream;
|
||||||
import org.apache.poi.hssf.record.ArrayRecord;
|
import org.apache.poi.hssf.record.*;
|
||||||
import org.apache.poi.hssf.record.CellValueRecordInterface;
|
|
||||||
import org.apache.poi.hssf.record.ContinueRecord;
|
|
||||||
import org.apache.poi.hssf.record.DBCellRecord;
|
|
||||||
import org.apache.poi.hssf.record.DimensionsRecord;
|
|
||||||
import org.apache.poi.hssf.record.FormulaRecord;
|
|
||||||
import org.apache.poi.hssf.record.IndexRecord;
|
|
||||||
import org.apache.poi.hssf.record.MergeCellsRecord;
|
|
||||||
import org.apache.poi.hssf.record.MulBlankRecord;
|
|
||||||
import org.apache.poi.hssf.record.Record;
|
|
||||||
import org.apache.poi.hssf.record.RowRecord;
|
|
||||||
import org.apache.poi.hssf.record.SharedFormulaRecord;
|
|
||||||
import org.apache.poi.hssf.record.TableRecord;
|
|
||||||
import org.apache.poi.hssf.record.UnknownRecord;
|
|
||||||
import org.apache.poi.ss.formula.FormulaShifter;
|
import org.apache.poi.ss.formula.FormulaShifter;
|
||||||
import org.apache.poi.ss.SpreadsheetVersion;
|
import org.apache.poi.ss.SpreadsheetVersion;
|
||||||
|
|
||||||
@ -86,6 +73,9 @@ public final class RowRecordsAggregate extends RecordAggregate {
|
|||||||
case RowRecord.sid:
|
case RowRecord.sid:
|
||||||
insertRow((RowRecord) rec);
|
insertRow((RowRecord) rec);
|
||||||
continue;
|
continue;
|
||||||
|
case DConRefRecord.sid:
|
||||||
|
addUnknownRecord(rec);
|
||||||
|
continue;
|
||||||
case DBCellRecord.sid:
|
case DBCellRecord.sid:
|
||||||
// end of 'Row Block'. Should only occur after cell records
|
// end of 'Row Block'. Should only occur after cell records
|
||||||
// ignore DBCELL records because POI generates them upon re-serialization
|
// ignore DBCELL records because POI generates them upon re-serialization
|
||||||
|
@ -2313,4 +2313,10 @@ if(1==2) {
|
|||||||
|
|
||||||
wb = writeOutAndReadBack((HSSFWorkbook) wb);
|
wb = writeOutAndReadBack((HSSFWorkbook) wb);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void test54016() {
|
||||||
|
// This used to break
|
||||||
|
HSSFWorkbook wb = openSample("54016.xls");
|
||||||
|
wb = HSSFTestDataSamples.writeOutAndReadBack(wb);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
BIN
test-data/spreadsheet/54016.xls
Normal file
BIN
test-data/spreadsheet/54016.xls
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user