[Bug 57423] shiftRows() produces a corrupted xlsx file

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[Bug 57423] shiftRows() produces a corrupted xlsx file

Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=57423

David Gauntt <[hidden email]> changed:

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

--- Comment #18 from David Gauntt <[hidden email]> ---
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: [hidden email]
For additional commands, e-mail: [hidden email]