Bug 64327

Summary: SXSSFSheet returns true in isColumnTrackedForAutoSizing if you track all columns and then untrack one
Product: POI Reporter: Eugene Kortov <kortovea>
Component: SXSSFAssignee: POI Developers List <dev>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 4.1.2-FINAL   
Target Milestone: ---   
Hardware: PC   
OS: Linux   

Description Eugene Kortov 2020-04-09 14:19:03 UTC
Method isColumnTrackedForAutoSizing in SXSSFSheet
https://github.com/apache/poi/blob/84ba670e27948adcb572caa5065affbf1aa3a769/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFSheet.java#L1502-L1505

returns true for untracked column if you invoked trackAllColumnsForAutoSizing()

steps:
1. Create workbook, SXSSFSheet, and row with 2 cells
2. invoke trackAllColumnsForAutoSizing() on the sheet
3. invoke untrackColumnForAutoSizing(0) on the sheet
4. invoke isColumnTrackedForAutoSizing(0) on the sheet

expected result: false
actual result: true

it's because `AutoSizeColumnTracker` checks `trackAllColumns` first

https://github.com/apache/poi/blob/84ba670e27948adcb572caa5065affbf1aa3a769/src/ooxml/java/org/apache/poi/xssf/streaming/AutoSizeColumnTracker.java#L140-L142
Comment 1 PJ Fanning 2020-04-09 20:17:12 UTC
Thanks - applied using https://svn.apache.org/repos/asf/poi/trunk@1876336