Bug 52447: Allow HyperLinkRecord to appear as part of the RowRecordsAggregate

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1896552 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Dominik Stadler 2021-12-30 23:03:16 +00:00
parent 075bc7021a
commit 1d630a94fc
3 changed files with 10 additions and 1 deletions

View File

@ -32,6 +32,7 @@ import org.apache.poi.hssf.record.DBCellRecord;
import org.apache.poi.hssf.record.DConRefRecord;
import org.apache.poi.hssf.record.DimensionsRecord;
import org.apache.poi.hssf.record.FormulaRecord;
import org.apache.poi.hssf.record.HyperlinkRecord;
import org.apache.poi.hssf.record.IndexRecord;
import org.apache.poi.hssf.record.MergeCellsRecord;
import org.apache.poi.hssf.record.MulBlankRecord;
@ -90,6 +91,9 @@ public final class RowRecordsAggregate extends RecordAggregate {
// end of 'Row Block'. Should only occur after cell records
// ignore DBCELL records because POI generates them upon re-serialization
continue;
case HyperlinkRecord.sid:
// some files contain a HyperlinkRecord here which we ignore for now
continue;
}
if (rec instanceof UnknownRecord) {
// might need to keep track of where exactly these belong

View File

@ -2603,5 +2603,10 @@ final class TestBugs extends BaseTestBugzillaIssues {
}
}
@Test
void test52447() throws IOException {
try (Workbook wb = openSampleWorkbook("52447.xls")) {
assertNotNull(wb);
}
}
}

Binary file not shown.