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 2012/01/05 10:01:15 UTC
DO NOT REPLY [Bug 52425] New: Error adding Comments into cloned
Sheets
https://issues.apache.org/bugzilla/show_bug.cgi?id=52425
Bug #: 52425
Summary: Error adding Comments into cloned Sheets
Product: POI
Version: 3.8-dev
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: normal
Priority: P2
Component: XSSF
AssignedTo: dev@poi.apache.org
ReportedBy: stefan.helfert@googlemail.com
Classification: Unclassified
Created attachment 28121
--> https://issues.apache.org/bugzilla/attachment.cgi?id=28121
Testprogram
Hi,
im facing a problem to add comments in a cloned sheet.
Adding comments to a new created sheet is no problem, but if I want to add
comments to a cloned sheet a get the following NullPointerException.
Exception in thread "main" java.lang.NullPointerException
at
org.apache.poi.xssf.usermodel.XSSFDrawing.createCellComment(XSSFDrawing.java:294)
at
org.apache.poi.xssf.usermodel.XSSFDrawing.createCellComment(XSSFDrawing.java:50)
at src.CloneBug.addComments(CloneBug.java:50)
at src.CloneBug.main(CloneBug.java:32)
The command:
XSSFVMLDrawing vml = sheet.getVMLDrawing(true);
in line 293 is returning a null-Object.
Furthermore this Exception is occuring only after the second comment. The first
comment is not running into this exception. But after opening the document
after adding the first comment, the comment is not there. Cell-Value is set but
not comment is present.
File to reproduce the exception is attached.
--
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
[Bug 52425] Error adding Comments into cloned Sheets
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52425
Dominik Stadler <do...@gmx.at> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |NEEDINFO
--- Comment #1 from Dominik Stadler <do...@gmx.at> ---
Please attach the xlsx-file mentioned in the Bug.
--
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
[Bug 52425] Error adding Comments into cloned Sheets
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52425
--- Comment #3 from Dominik Stadler <do...@gmx.at> ---
Can you share your sample document so we can put a reproducer test in place
together with a fix?
--
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
[Bug 52425] Error adding Comments into cloned Sheets
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52425
--- Comment #2 from Thibaud Raison <th...@gmail.com> ---
Same error in the same condition.
The first comment creates the VMLDrawing.
The second failed to load the right VMLDrawing.
Looking at the code, the drawing is null because the search did not ends,
because of the (second) break in line 420. The search ends as soon as the first
VMLDrawing is not the right one.
for(POIXMLDocumentPart p : getRelations()){
if(p instanceof XSSFVMLDrawing) {
XSSFVMLDrawing dr = (XSSFVMLDrawing)p;
String drId = dr.getPackageRelationship().getId();
if(drId.equals(ctDrawing.getId())){
drawing = dr;
break;
}
break; // line 420
}
}
if(drawing == null){
logger.log(POILogger.ERROR, "Can't find VML drawing with id=" +
ctDrawing.getId() + " in the list of the sheet's relationships");
}
--
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