Lines 40-50
Link Here
|
40 |
import org.apache.xmlbeans.XmlCursor; |
40 |
import org.apache.xmlbeans.XmlCursor; |
41 |
import org.apache.xmlbeans.XmlException; |
41 |
import org.apache.xmlbeans.XmlException; |
42 |
import org.apache.xmlbeans.XmlObject; |
42 |
import org.apache.xmlbeans.XmlObject; |
|
|
43 |
import org.openxmlformats.schemas.drawingml.x2006.chart.CTChartSpace; |
43 |
import org.openxmlformats.schemas.drawingml.x2006.main.CTGraphicalObject; |
44 |
import org.openxmlformats.schemas.drawingml.x2006.main.CTGraphicalObject; |
44 |
import org.openxmlformats.schemas.drawingml.x2006.main.CTGraphicalObjectData; |
45 |
import org.openxmlformats.schemas.drawingml.x2006.main.CTGraphicalObjectData; |
45 |
import org.openxmlformats.schemas.drawingml.x2006.main.CTPoint2D; |
46 |
import org.openxmlformats.schemas.drawingml.x2006.main.CTPoint2D; |
46 |
import org.openxmlformats.schemas.drawingml.x2006.main.CTPositiveSize2D; |
47 |
import org.openxmlformats.schemas.drawingml.x2006.main.CTPositiveSize2D; |
47 |
import org.openxmlformats.schemas.drawingml.x2006.main.CTTransform2D; |
48 |
import org.openxmlformats.schemas.drawingml.x2006.main.CTTransform2D; |
|
|
49 |
import org.openxmlformats.schemas.drawingml.x2006.main.CTBlip; |
48 |
import org.openxmlformats.schemas.presentationml.x2006.main.CTGraphicalObjectFrame; |
50 |
import org.openxmlformats.schemas.presentationml.x2006.main.CTGraphicalObjectFrame; |
49 |
import org.openxmlformats.schemas.presentationml.x2006.main.CTGroupShape; |
51 |
import org.openxmlformats.schemas.presentationml.x2006.main.CTGroupShape; |
50 |
|
52 |
|
Lines 235-240
Link Here
|
235 |
chartCopy.importContent(srcChart); |
237 |
chartCopy.importContent(srcChart); |
236 |
chartCopy.setWorkbook(srcChart.getWorkbook()); |
238 |
chartCopy.setWorkbook(srcChart.getWorkbook()); |
237 |
c.setAttributeText(idQualifiedName, slide.getRelationId(chartCopy)); |
239 |
c.setAttributeText(idQualifiedName, slide.getRelationId(chartCopy)); |
|
|
240 |
|
241 |
// duplicate the blip fill if set |
242 |
CTChartSpace chartSpaceCopy = chartCopy.getCTChartSpace(); |
243 |
if (chartSpaceCopy != null) { |
244 |
XSLFPropertiesDelegate.XSLFFillProperties fp = XSLFPropertiesDelegate.getFillDelegate(chartSpaceCopy.getSpPr()); |
245 |
if (fp != null && fp.isSetBlipFill()) { |
246 |
CTBlip blip = fp.getBlipFill().getBlip(); |
247 |
String blipId = blip.getEmbed(); |
248 |
String relId = slide.getSlideShow().importBlip(blipId, srcChart, chartCopy); |
249 |
blip.setEmbed(relId); |
250 |
} |
251 |
} |
238 |
} catch (InvalidFormatException | IOException e) { |
252 |
} catch (InvalidFormatException | IOException e) { |
239 |
throw new POIXMLException(e); |
253 |
throw new POIXMLException(e); |
240 |
} |
254 |
} |