XSLFPictureShape p = (XSLFPictureShape)sh;
String blipId = p.getBlipId();
String relId = getSheet().importBlip(blipId, p.getSheet().getPackagePart());
CTPicture ct = (CTPicture)getXmlObject();
CTBlip blip = ct.getBlipFill().getBlip();
blip.setEmbed(relId);
CTApplicationNonVisualDrawingProps nvPr = ct.getNvPicPr().getNvPr();
if(nvPr.isSetCustDataLst()) {
// discard any custom tags associated with the picture being copied
nvPr.unsetCustDataLst();
}
if(blip.isSetExtLst()) {
CTOfficeArtExtensionList extLst = blip.getExtLst();
for(CTOfficeArtExtension ext : extLst.getExtArray()){
String xpath = "declare namespace a14='http://schemas.microsoft.com/office/drawing/2010/main' $this//a14:imgProps/a14:imgLayer";
XmlObject[] obj = ext.selectPath(xpath);
if(obj != null && obj.length == 1){
XmlCursor c = obj[0].newCursor();