https://bz.apache.org/bugzilla/show_bug.cgi?id=60541

            Bug ID: 60541
           Summary: Column collapsed attribute is incorrectly set when
                    reading file
           Product: POI
           Version: 3.15-FINAL
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSSF
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

Created attachment 34576
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=34576&action=edit
Code to reproduce the erroneous behavior

When reading an OOXML Excel document from a file, the "collapsed" attribute of
any column is always set, even if the attribute was not set in the input file.
If the attribute was not present in the input file, it will be set to "false".
If the attribute was present in the input file, it will be set to "true",
regardless of the actual value of the attribute. By saving and loading the
document multiple times, the attribute will eventually have a true value,
regardless of its initial state.

Example to reproduce this behavior is attached.

The error occurs in line 259 of
org.apache.poi.xssf.usermodel.helpers.ColumnHelper. The existing line:

toCol.setCollapsed(fromCol.isSetCollapsed());

... should either be changed to:

toCol.setCollapsed(fromCol.getCollapsed());

... or removed at all.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to