poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 52425] Error adding Comments into cloned Sheets
Date Thu, 29 Aug 2013 17:01:41 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=52425

--- Comment #2 from Thibaud Raison <thibaud.raison@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


Mime
View raw message