Bug 45889 - getShapes() brings error if count of table rows = 1
getShapes() brings error if count of table rows = 1
Status: RESOLVED FIXED
Product: POI
Classification: Unclassified
Component: HSLF
unspecified
PC Linux
: P1 normal (vote)
: ---
Assigned To: POI Developers List
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2008-09-25 05:10 UTC by Constantin
Modified: 2008-10-02 22:27 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Constantin 2008-09-25 05:10:04 UTC
current trunk code.

test snippet:

        SlideShow ppt = new SlideShow();
        Slide slide = ppt.createSlide();

        slide.addShape(new Table(1, 5));
        
        Shape[] shapes = slide.getShapes();


error:
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
	at org.apache.poi.hslf.model.Table.initTable(Table.java:180)
	at org.apache.poi.hslf.model.Table.setSheet(Table.java:193)
	at org.apache.poi.hslf.model.Sheet.getShapes(Sheet.java:229)
	at JustPOI.main(JustPOI.java:33)
Comment 1 Yegor Kozlov 2008-10-02 22:27:28 UTC
Fixed in 0.

Yegor