<changes>
<release version="3.8-beta5" date="2011-??-??">
+ <action dev="poi-developers" type="fix">51944 - PAPFormattedDiskPage.getPAPX - IndexOutOfBounds</action>
<action dev="poi-developers" type="fix">52032 - HWPF - ArrayIndexOutofBoundsException with no stack trace (broken after revision 1178063)</action>
<action dev="poi-developers" type="add">support for converting pptx files into images with a PPTX2PNG tool</action>
<action dev="poi-developers" type="add">52050 - Support for the Excel RATE function</action>
CHPFormattedDiskPage cfkp = new CHPFormattedDiskPage(documentStream,
pageOffset, tpt);
- int fkpSize = cfkp.size();
-
- for (int y = 0; y < fkpSize; y++)
- {
- CHPX chpx = cfkp.getCHPX(y);
- if (chpx != null)
- _textRuns.add(chpx);
- }
+ for ( CHPX chpx : cfkp.getCHPXs() )
+ {
+ if ( chpx != null )
+ _textRuns.add( chpx );
+ }
}
Collections.sort( _textRuns, PropertyNode.StartComparator.instance );
}
PAPFormattedDiskPage pfkp = new PAPFormattedDiskPage(documentStream,
documentStream, pageOffset, tpt);
- int fkpSize = pfkp.size();
-
- for (int y = 0; y < fkpSize; y++)
- {
- PAPX papx = pfkp.getPAPX(y);
- if (papx != null) {
- _paragraphs.add(papx);
- }
- }
+ for ( PAPX papx : pfkp.getPAPXs() )
+ {
+ if ( papx != null )
+ _paragraphs.add( papx );
+ }
}
Collections.sort( _paragraphs, PropertyNode.StartComparator.instance );
}
.openSampleFile( "Bug51834.doc" ) );
}
+ /**
+ * Bug 51944 - PAPFormattedDiskPage.getPAPX - IndexOutOfBounds
+ */
+ public void testBug51944() throws Exception
+ {
+ HWPFTestDataSamples.openOldSampleFile( "Bug51944.doc" );
+ }
+
/**
* Bug 52032 - [BUG] & [partial-PATCH] HWPF - ArrayIndexOutofBoundsException
* with no stack trace (broken after revision 1178063)