poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 56017] Shifting rows with comment result - Unreadable content error and comment deletion
Date Thu, 05 Jun 2014 01:58:30 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=56017

--- Comment #6 from happyhuman <danielyoung.private@gmail.com> ---
In: org.apache.poi.xssf.usermodel.XSSFSheet

I believe line:
2451            if(rownum < startRow || rownum > endRow) continue;

Should be above:
2439            if(sheetComments != null){


The exception I was getting started here:
2445                        ref = new CellReference(rownum + n, ref.getCol());

Looks as though it's trying to update the comments table with the new cell
references after the rows are shifted, but the iterator is over all rows and
the check for the shifted range is after this block. Therefore, an attempt
could be made for a negative row value. I would assume if you do not get an
exception the workbook may corrupt. Fixed the issue for me anyway and hope it
helps.

-- 
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


Mime
View raw message