Bug 45889 - getShapes() brings error if count of table rows = 1
Summary: getShapes() brings error if count of table rows = 1
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: HSLF (show other bugs)
Version: unspecified
Hardware: PC Linux
: P1 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
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 r701302.

Yegor