poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 57423] shiftRows() produces a corrupted xlsx file
Date Wed, 07 Aug 2019 13:27:48 GMT
https://bz.apache.org/bugzilla/show_bug.cgi?id=57423

David Gauntt <dmgauntt@uab.edu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #36712|0                           |1
        is obsolete|                            |

--- Comment #18 from David Gauntt <dmgauntt@uab.edu> ---
Created attachment 36713
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=36713&action=edit
Full bug fix for 57423

This patch fixes the bug introduce by the patch in attachment 36712.  If the
CTRow list is sorted by the call to rebuildRows in shiftCommentsAndRows, then
any call to some of the XSSFRow objects will throw an
XmlValueDisconnectedException.  However, if the sort does not happen until the
end of XSSFSheet.shiftRows, there is no problem.

This patch adds an overload to rebuildRows().  When rebuildRows() or
rebuildRows(false) is called, the CTRow list is not sorted.  When
rebuildRows(true) is called, the CTRow list is sorted.  The call to
rebuildRows() at the end of shiftRows is then changed to rebuildRows(true).

The test case in attachment 36711 now runs without failure, and I think that we
are ready to close this bug again.

"I have killed two mummies!"
"It was the same mummy".
"Yes, but I killed it twice!"

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