mirror of https://github.com/apache/poi.git
Fix for bug #46137 - continue records after eofrecord
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@712652 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
94039e7cc8
commit
aceffbe29d
|
@ -37,6 +37,7 @@
|
|||
|
||||
<!-- Don't forget to update status.xml too! -->
|
||||
<release version="3.5-beta4" date="2008-??-??">
|
||||
<action dev="POI-DEVELOPERS" type="fix">46137 - Handle odd files with a ContinueRecord after EOFRecord</action>
|
||||
<action dev="POI-DEVELOPERS" type="fix">Fixed problem with linking shared formulas when ranges overlap</action>
|
||||
<action dev="POI-DEVELOPERS" type="fix">45784 - More fixes to SeriesTextRecord</action>
|
||||
<action dev="POI-DEVELOPERS" type="fix">46033 - fixed TableCell to correctly set text type</action>
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
<!-- Don't forget to update changes.xml too! -->
|
||||
<changes>
|
||||
<release version="3.5-beta4" date="2008-??-??">
|
||||
<action dev="POI-DEVELOPERS" type="fix">46137 - Handle odd files with a ContinueRecord after EOFRecord</action>
|
||||
<action dev="POI-DEVELOPERS" type="fix">Fixed problem with linking shared formulas when ranges overlap</action>
|
||||
<action dev="POI-DEVELOPERS" type="fix">45784 - More fixes to SeriesTextRecord</action>
|
||||
<action dev="POI-DEVELOPERS" type="fix">46033 - fixed TableCell to correctly set text type</action>
|
||||
|
|
|
@ -383,6 +383,10 @@ public final class RecordFactory {
|
|||
//Gracefully handle records that we don't know about,
|
||||
//that happen to be continued
|
||||
records.add(record);
|
||||
} else if (lastRecord instanceof EOFRecord) {
|
||||
// This is really odd, but excel still sometimes
|
||||
// outputs a file like this all the same
|
||||
records.add(record);
|
||||
} else {
|
||||
throw new RecordFormatException("Unhandled Continue Record");
|
||||
}
|
||||
|
|
Binary file not shown.
|
@ -1523,4 +1523,14 @@ public final class TestBugs extends TestCase {
|
|||
assertEquals(64, green.getCellStyle().getFillBackgroundColor());
|
||||
assertEquals("0:FFFF:0", p.getColor(11).getHexString());
|
||||
}
|
||||
|
||||
/**
|
||||
* ContinueRecord after EOF
|
||||
*/
|
||||
public void test46137() {
|
||||
// This used to break
|
||||
HSSFWorkbook wb = openSample("46137.xls");
|
||||
assertEquals(7, wb.getNumberOfSheets());
|
||||
wb = HSSFTestDataSamples.writeOutAndReadBack(wb);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue