DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=44030>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=44030

           Summary: Slides corrupted when editing tables
           Product: POI
           Version: 3.0
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HSLF
        AssignedTo: [email protected]
        ReportedBy: [EMAIL PROTECTED]


I am using poi-3.0.1-FINAL-20070705.  To get around the inability to create
tables, I tried pre-creating a table in PowerPoint and importing and editing the
cells with HSLF, but ran into a problem. I tried looping through all the
TextBoxes and writing into them, and it turned out that if I wrote into more
than 22 TextBoxes, I would get this message when I tried to open the PPT file:

"PowerPoint was unable to display some of the text, images, or objects on slides
in the file, filename.ppt, because they have become corrupted. Effected slides
have been replaced by blank slides…"

When the PPT opens, I just get a blank slide.  If I only write into 22 TextBoxes
or less, it works fine.  No Exceptions are being thrown or anything, there is
only a problem when I open the PPT file. Also, it seems to be only possible to
edit a TextBox if it has text in it already.  So I created my Table with a
single zero (0) in each cell. Here is a code snippet of what I am doing:

//aShapeGroup is a table created in PowerPoint with 52 cells, 13x4
org.apache.poi.hslf.model.Shape[] shg = aShapeGroup.getShapes();

//replace shg.length with 22 and 23 to test. 22 or less will work, 23
or greater will not.
for(int i=0; i < shg.length; i++) {
       if
(shg[i].getClass().getName().equals("org.apache.poi.hslf.model.TextBox")) {
               //all this does it write the index into the TextBox
               tb.setText(String.valueOf(i));
       }
}

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to