View | Details | Raw Unified | Return to bug 56467
Collapse All | Expand All

(-)src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java (-3 / +7 lines)
Lines 487-499 Link Here
487
            // copy drawing contents
487
            // copy drawing contents
488
            clonedDg.getCTDrawing().set(dg.getCTDrawing());
488
            clonedDg.getCTDrawing().set(dg.getCTDrawing());
489
489
490
            clonedDg = clonedSheet.createDrawingPatriarch();
491
            
490
            // Clone drawing relations
492
            // Clone drawing relations
491
            List<POIXMLDocumentPart> srcRels = srcSheet.createDrawingPatriarch().getRelations();
493
            List<POIXMLDocumentPart> srcRels = srcSheet.createDrawingPatriarch().getRelations();
492
            for (POIXMLDocumentPart rel : srcRels) {
494
            for (POIXMLDocumentPart rel : srcRels) {
493
                PackageRelationship relation = rel.getPackageRelationship();
495
                PackageRelationship relation = rel.getPackageRelationship();
494
                clonedSheet
496
495
                        .createDrawingPatriarch()
497
                clonedDg.addRelation(relation.getId(), rel);
496
                        .getPackagePart()
498
                
499
                clonedDg
500
						.getPackagePart()
497
                        .addRelationship(relation.getTargetURI(), relation.getTargetMode(),
501
                        .addRelationship(relation.getTargetURI(), relation.getTargetMode(),
498
                                relation.getRelationshipType(), relation.getId());
502
                                relation.getRelationshipType(), relation.getId());
499
            }
503
            }

Return to bug 56467