https://issues.apache.org/bugzilla/show_bug.cgi?id=57355

            Bug ID: 57355
           Summary: XSSFPicture.resize() throws
                    ArrayIndexOutOfBoundsException
           Product: POI
           Version: 3.11-dev
          Hardware: PC
            Status: NEW
          Severity: critical
          Priority: P2
         Component: XSSF
          Assignee: [email protected]
          Reporter: [email protected]

The change "r1638623: Picture method to resize with different scales in width
and height, Date: Mittwoch, 12. November 2014 01:19:00" introduced a method
XSSFSheet.getColumnWidthInPixels() which causes the following:

java.lang.ArrayIndexOutOfBoundsException: -1
    at java.util.ArrayList.elementData(ArrayList.java:400)
    at java.util.ArrayList.get(ArrayList.java:413)
    at org.apache.poi.xssf.model.StylesTable.getStyleAt(StylesTable.java:239)
    at
org.apache.poi.xssf.usermodel.XSSFSheet.getColumnWidthInPixels(XSSFSheet.java:718)
    at
org.apache.poi.ss.util.ImageUtils.getDimensionFromAnchor(ImageUtils.java:231)
    at org.apache.poi.ss.util.ImageUtils.setPreferredSize(ImageUtils.java:143)
    at
org.apache.poi.xssf.usermodel.XSSFPicture.getPreferredSize(XSSFPicture.java:221)
    at org.apache.poi.xssf.usermodel.XSSFPicture.resize(XSSFPicture.java:180)
    at org.apache.poi.xssf.usermodel.XSSFPicture.resize(XSSFPicture.java:155)
    at org.apache.poi.xssf.usermodel.XSSFPicture.resize(XSSFPicture.java:146)
    at
org.apache.poi.xssf.usermodel.TestXSSFPicture.testResizeWithColumns(TestXSSFPicture.java:260)

Fix is likely to simply remove two lines from the new method which are actually
not needed, but cause this error.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to