]> source.dussan.org Git - poi.git/commit
Fix bug with record indexes for HSSF Workbooks
authorMarius Volkhart <mariusvolkhart@apache.org>
Sat, 27 Feb 2021 00:43:56 +0000 (00:43 +0000)
committerMarius Volkhart <mariusvolkhart@apache.org>
Sat, 27 Feb 2021 00:43:56 +0000 (00:43 +0000)
commit50757bca8e22c532e9f924c6efa3af9e942a313e
treeb9731e4ad771b709a906b5688f555ae6c10532b1
parent451684aa9168aed515ea9f33b8d30f4e99227390
Fix bug with record indexes for HSSF Workbooks

We have encountered workbooks that do not have a TabIdRecord (see 55982.xls). However, the WorkbookRecordList#updateRecordPos() method would still increment the position of the TabIdRecord for such workbooks. Changing the default position of the record from 0 to -1 indicates that the record position has now been set.

This bug was discovered while adding support for editing pictures in HSSF documents.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1886963 13f79535-47bb-0310-9956-ffa450edef68
src/java/org/apache/poi/hssf/model/InternalWorkbook.java
src/java/org/apache/poi/hssf/model/WorkbookRecordList.java
src/testcases/org/apache/poi/hssf/model/TestWorkbookRecordList.java [new file with mode: 0644]