apache / apache/poi

xslf: pictureShape copy cannot deal with SVG copying

Open
#927 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
2.3k
Forks
844
Avg merge
5h 52m
Merged PRs (30d)
47

Description

// TODO: check for SVG copying
CTOfficeArtExtensionList extLst = blip.getExtLst();
for(CTOfficeArtExtension ext : extLst.getExtArray()){
String xpath = "declare namespace a14='"+ MS_DML_NS +"' $this//a14:imgProps/a14:imgLayer";
XmlObject[] obj = ext.selectPath(xpath);
if(obj != null && obj.length == 1) {
try (XmlCursor c = obj[0].newCursor()) {
String id = c.getAttributeText(EMBED_TAG);
String newId = getSheet().importBlip(id, p.getSheet());
c.setAttributeText(EMBED_TAG, newId);
}
}
}

Contributor guide

No contributing guide indexed for this repository

Research direction

Search the XSLF picture-shape copy path for the shown SVG TODO and inspect the loop around blip.getExtLst(), including getSheet().importBlip(id, p.getSheet()). Reproduce an SVG copy case and compare the copied extension data; done means SVG images copy successfully without leaving the original embedded id.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.