aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--poi/src/main/java/org/apache/poi/hssf/record/aggregates/RowRecordsAggregate.java4
-rw-r--r--poi/src/test/java/org/apache/poi/hssf/usermodel/TestBugs.java7
-rw-r--r--test-data/spreadsheet/52447.xlsbin0 -> 54784 bytes
3 files changed, 10 insertions, 1 deletions
diff --git a/poi/src/main/java/org/apache/poi/hssf/record/aggregates/RowRecordsAggregate.java b/poi/src/main/java/org/apache/poi/hssf/record/aggregates/RowRecordsAggregate.java
index 2a5789c7cb..eb2cd212a3 100644
--- a/poi/src/main/java/org/apache/poi/hssf/record/aggregates/RowRecordsAggregate.java
+++ b/poi/src/main/java/org/apache/poi/hssf/record/aggregates/RowRecordsAggregate.java
@@ -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
diff --git a/poi/src/test/java/org/apache/poi/hssf/usermodel/TestBugs.java b/poi/src/test/java/org/apache/poi/hssf/usermodel/TestBugs.java
index 5b4ff82ed4..4f216c6848 100644
--- a/poi/src/test/java/org/apache/poi/hssf/usermodel/TestBugs.java
+++ b/poi/src/test/java/org/apache/poi/hssf/usermodel/TestBugs.java
@@ -2603,5 +2603,10 @@ final class TestBugs extends BaseTestBugzillaIssues {
}
}
-
+ @Test
+ void test52447() throws IOException {
+ try (Workbook wb = openSampleWorkbook("52447.xls")) {
+ assertNotNull(wb);
+ }
+ }
}
diff --git a/test-data/spreadsheet/52447.xls b/test-data/spreadsheet/52447.xls
new file mode 100644
index 0000000000..ee2317d323
--- /dev/null
+++ b/test-data/spreadsheet/52447.xls
Binary files differ