https://bz.apache.org/bugzilla/show_bug.cgi?id=60512

            Bug ID: 60512
           Summary: Missing XSSFRelation.CUSTOM_PROPERTY generates
                    POIXMLException on cloneSheet() method
           Product: POI
           Version: 3.15-FINAL
          Hardware: PC
            Status: NEW
          Severity: regression
          Priority: P2
         Component: XSSF
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

The XSSFRelation doesn't have a relation of type Custom property. Hence while
cloning a sheet (XSSFSheet) containing a custom property relation type, it
generates an exception 

POIXMLException: Can't clone sheet - unknown relation type found:
http://schemas.openxmlformats.org/officeDocument/2006/relationships/customProperty

(XSSFWorkbook.java)

 private static void addRelation(RelationPart rp, POIXMLDocumentPart target) {
        PackageRelationship rel = rp.getRelationship();
        if (rel.getTargetMode() == TargetMode.EXTERNAL) {
            target.getPackagePart().addRelationship(
                rel.getTargetURI(), rel.getTargetMode(),
rel.getRelationshipType(), rel.getId());
        } else {        
            XSSFRelation xssfRel =
XSSFRelation.getInstance(rel.getRelationshipType());
            if (xssfRel == null) {
                // Don't copy all relations blindly, but only the ones we know
about
                throw new POIXMLException("Can't clone sheet - unknown relation
type found: "+rel.getRelationshipType());
            }
            target.addRelation(rel.getId(), xssfRel, rp.getDocumentPart());
        }
    }

You can find more infos here:
http://people.apache.org/~centic/poi_regression/reportsAll/

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to