Bug 65009 - When loading a PPT, PictureData indices are 0-based
Summary: When loading a PPT, PictureData indices are 0-based
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: HSLF (show other bugs)
Version: 4.1.2-FINAL
Hardware: All All
: P2 minor (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords: PatchAvailable
Depends on:
Blocks:
 
Reported: 2020-12-19 01:16 UTC by marius
Modified: 2020-12-30 17:04 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description marius 2020-12-19 01:16:44 UTC
The documentation for HSLFPictureData#getIndex() indicates that the index is 1-based. In most cases it is. However, when loading a PPT that already has images in it, the indices start at 0.
Comment 1 marius 2020-12-19 01:19:15 UTC
https://github.com/apache/poi/pull/211
Comment 2 Dominik Stadler 2020-12-30 17:04:41 UTC
Applied via r1884948 in a slightly different way to use the same approach across two similar code-places.