/[Apache-SVN]
ViewVC logotype

Revision 1887017


Jump to revision: Previous Next
Author: mariusvolkhart
Date: Sun Feb 28 23:16:14 2021 UTC (3 years, 1 month ago)
Changed paths: 20
Log Message:
Add the ability to edit HSLFPictureData contents

Pictures can now be edited by calling HSLFPictureData#setData(byte[]). The byte[] should contain the image data as an image viewer might read it.

To enable this functionality, a tighter coupling between the EscherBSERecords of the slideshow and the HSLFPictureData was required. This ensures that changes in image data size are accurately recorded in the records.

In the course of coupling the records and the HSLFPictureData, various scenarios arose where a mapping of records to pictures was non-trivial. Accordingly, the HSLFSlideShowImpl#matchPicturesAndRecords(...) function was added to perform a more sophisticated matching pass. This function is heavily exercised by org.apache.poi.hslf.usermodel.TestBugs.testFile[5] and PPTX2PNG.render[2], as well as the new TestPictures#testSlideshowWithIncorrectOffsets().

Closes #225

Changed paths

Path Details
Directorypoi/trunk/src/java/org/apache/poi/sl/usermodel/PictureData.java modified , text changed
Directorypoi/trunk/src/scratchpad/src/org/apache/poi/hslf/blip/Bitmap.java modified , text changed
Directorypoi/trunk/src/scratchpad/src/org/apache/poi/hslf/blip/DIB.java modified , text changed
Directorypoi/trunk/src/scratchpad/src/org/apache/poi/hslf/blip/EMF.java modified , text changed
Directorypoi/trunk/src/scratchpad/src/org/apache/poi/hslf/blip/JPEG.java modified , text changed
Directorypoi/trunk/src/scratchpad/src/org/apache/poi/hslf/blip/Metafile.java modified , text changed
Directorypoi/trunk/src/scratchpad/src/org/apache/poi/hslf/blip/PICT.java modified , text changed
Directorypoi/trunk/src/scratchpad/src/org/apache/poi/hslf/blip/PNG.java modified , text changed
Directorypoi/trunk/src/scratchpad/src/org/apache/poi/hslf/blip/WMF.java modified , text changed
Directorypoi/trunk/src/scratchpad/src/org/apache/poi/hslf/dev/PPTXMLDump.java modified , text changed
Directorypoi/trunk/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFFill.java modified , text changed
Directorypoi/trunk/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFPictureData.java modified , text changed
Directorypoi/trunk/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFPictureShape.java modified , text changed
Directorypoi/trunk/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSlideShow.java modified , text changed
Directorypoi/trunk/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSlideShowImpl.java modified , text changed
Directorypoi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/dev/BaseTestPPTIterating.java modified , text changed
Directorypoi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestPicture.java modified , text changed
Directorypoi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestPictures.java modified , text changed
Directorypoi/trunk/test-data/slideshow/ppt_with_png_encrypted.ppt added
Directorypoi/trunk/test-data/spreadsheet/stress.xls modified , text changed

infrastructure at apache.org
ViewVC Help
Powered by ViewVC 1.1.26