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 2011/02/16 15:30:06 UTC

DO NOT REPLY [Bug 50795] New: Moving cell comment crashes Excel file

https://issues.apache.org/bugzilla/show_bug.cgi?id=50795

           Summary: Moving cell comment crashes Excel file
           Product: POI
           Version: 3.7
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSSF
        AssignedTo: dev@poi.apache.org
        ReportedBy: andrei.astrouski@gmail.com


Created an attachment (id=26668)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=26668)
CellCommentTest.xlsx

Steps:
1. Create Excel file.
2. Add cell comment.
3. Process with POI. Get our created cell comment and try to set to another
cell.
  XSSFCell cell = row.getCell(0);
  XSSFComment comment = cell.getCellComment();
  XSSFCell cellWithoutComment = row.getCell(1);
  cellWithoutComment.setCellComment(comment);
4. Try to save changes
  FileOutputStream out = new FileOutputStream(testFilePath);
  wb.write(out);
  out.close();

Actual result: NPE appears, file size = 0 bytes
Expected: comment moved successfull (in 3.6 it works)

See attachments to test

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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


DO NOT REPLY [Bug 50795] Moving cell comment crashes Excel file

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50795

--- Comment #1 from andrei <an...@gmail.com> 2011-02-16 09:30:42 EST ---
Created an attachment (id=26669)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=26669)
CellCommentTest.java

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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


DO NOT REPLY [Bug 50795] Moving cell comment crashes Excel file

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50795

Nick Burch <ni...@alfresco.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #2 from Nick Burch <ni...@alfresco.com> 2011-02-18 10:31:05 EST ---
Thanks for the test case, it made it much quicker to investigate

I'm rather confused by this one, but it's either a bug in xmlbeans, or we're
doing something too odd in our processing of the vml diagram part. However, by
adding a .toString() call in after the update, it seems to make xmlbeans
re-compute whatever was broken. I'm sure there should be a better solution, but
this seems to work fine as a workaround...

Test and workaround added in r1072022.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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