mirror of
https://github.com/apache/poi.git
synced 2026-02-27 20:40:08 +08:00
bug 60255: use actual number of package parts rather than hard-coding an upper-bound
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1765546 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
84b0d1a0fe
commit
efa58cbb1c
@ -575,7 +575,8 @@ public class POIXMLDocumentPart {
|
||||
// Default to searching from 1, unless they asked for 0+
|
||||
int idx = minIdx;
|
||||
if (minIdx < 0) idx = 1;
|
||||
while (idx < 1000) {
|
||||
int maxIdx = minIdx + pkg.getParts().size();
|
||||
while (idx <= maxIdx) {
|
||||
name = descriptor.getFileName(idx);
|
||||
PackagePartName ppName = PackagingURIHelper.createPartName(name);
|
||||
if (!pkg.containPart(ppName)) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user