poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 59686] New: Error when trying to access XSLFTableCell properties like textHeight, lineWidth, etc.
Date Thu, 09 Jun 2016 16:55:20 GMT
https://bz.apache.org/bugzilla/show_bug.cgi?id=59686

            Bug ID: 59686
           Summary: Error when trying to access XSLFTableCell properties
                    like textHeight, lineWidth, etc.
           Product: POI
           Version: 3.14-FINAL
          Hardware: PC
            Status: NEW
          Severity: blocker
          Priority: P2
         Component: XSLF
          Assignee: dev@poi.apache.org
          Reporter: prethaku@cisco.com

Hi, 

I am generating a ppt from an existing template ppt file using XSLF. Here, I
have a table and I update cells with the content dynamically and add/delete
rows accordingly. I was trying to find the height of a cell/row so that I can
find out how many rows can be accommodated in the table without overflowing the
slide area. So if a row cannot be accommodated, a new slide will be created.
But when I was trying to access cell.getTextHeight() or cell.getLineWidth(), I
am getting the below exception.

java.lang.IllegalStateException: CTShapeProperties was not found.
    at org.apache.poi.xslf.usermodel.XSLFShape.getSpPr(XSLFShape.java:240)
    at
org.apache.poi.xslf.usermodel.XSLFSimpleShape$1.fetch(XSLFSimpleShape.java:113)
    at
org.apache.poi.xslf.usermodel.XSLFShape.fetchShapeProperty(XSLFShape.java:320)
    at
org.apache.poi.xslf.usermodel.XSLFSimpleShape.getXfrm(XSLFSimpleShape.java:121)
    at
org.apache.poi.xslf.usermodel.XSLFSimpleShape.getAnchor(XSLFSimpleShape.java:128)
    at org.apache.poi.sl.draw.DrawShape.getAnchor(DrawShape.java:142)
    at
org.apache.poi.sl.draw.DrawTextParagraph.getWrappingWidth(DrawTextParagraph.java:399)
    at
org.apache.poi.sl.draw.DrawTextParagraph.breakText(DrawTextParagraph.java:240)
    at
org.apache.poi.sl.draw.DrawTextShape.drawParagraphs(DrawTextShape.java:134)
    at
org.apache.poi.sl.draw.DrawTextShape.getTextHeight(DrawTextShape.java:195)
    at
org.apache.poi.sl.draw.DrawTextShape.getTextHeight(DrawTextShape.java:177)
    at
org.apache.poi.xslf.usermodel.XSLFTextShape.getTextHeight(XSLFTextShape.java:536)
    ......


Please let me know if this is a bug or is implemented like that. And how can we
find the dynamic height of a cell/row.

Thanks,
Preetam

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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Mime
View raw message