You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2017/01/03 02:21:46 UTC

[Bug 60541] Column collapsed attribute is incorrectly set when reading file

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

--- Comment #1 from Javen O'Neal <on...@apache.org> ---
Created attachment 34580
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=34580&action=edit
Proposed patch from comment 0

It looks like that line was added in r775731 for bug 46161 with the commit
message "xssf support for setGroupColumnCollapsed() setGroupRowCollapsed()".

https://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/ColumnHelper.java?annotate=775731&pathrev=775731#l221
> r636729       nick     public void setColumnAttributes(CTCol fromCol, CTCol toCol) {
> r1561435 kiwiwings         if(fromCol.isSetBestFit()) toCol.setBestFit(fromCol.getBestFit());
> ...
> r747895      yegor         if(fromCol.isSetCollapsed()) toCol.setCollapsed(fromCol.getCollapsed());
> ...
> r775731       nick         toCol.setCollapsed(fromCol.isSetCollapsed());
> r615258       nick     }

I'm in favor of deleting the unguarded toCol.setCollapsed, but it currently
breaks TestXSSFSheet#setColumnGroupCollapsed.
This old unit test appears to have many problems, such as confusing
isSetCollapsed with getCollapsed, assuming hidden is the same as collapsed,
among many other problems. I am rewriting this unit test before making your
changes to avoid regressions.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org