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=39097>.
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=39097

           Summary: PATCH: support for pictures in HSLF
           Product: POI
           Version: unspecified
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HSLF
        AssignedTo: poi-dev@jakarta.apache.org
        ReportedBy: [EMAIL PROTECTED]


Notes:
 - Misc cleanup and refactoring of the code
org.apache.poi.hslf.usermodel.Picture is obsolete and goes away.
Instead two new classes are used:
org.apache.poi.hslf.usermodel.PictureData - holds picture data as read from
Pictures OLE stream
org.apache.poi.hslf.model.Picture extends Shape. - Image frame in a slide
 
 - Added default constructor to SlideShow and HSLFSlideShow to create
an empty ppt file and setup its initial structure from a template file:

    public HSLFSlideShow() throws IOException  {
         
this(HSLFSlideShow.class.getResourceAsStream("/org/apache/poi/hslf/data/empty.ppt"));
    }
empty.ppt is resource file and must be copied to its location by the compile
script. 


 - Support for adding pictures to a slide. Actually Picture is a subclass of 
Shape
which holds reference to the picture data, position of the picture in the slide,
etc.

 Use case:

        SlideShow ppt = new SlideShow();

        slide = ppt.createSlide();
        
        //picture is global object. It is shared across all slides.
        int idx = ppt.addPicture(new File("hello.jpg"), Picture.JPEG);
        
        Picture pict = new Picture(idx);
        pict.setDefaultSize(ppt); 
        slide.addShape(pict);
 
- Fixed bug with serialization of pictures.
 before this commit HSLFSlideShow.write skipped writing pictures and the data
was lost.
Now everything works right. Pictures are preserved.


Regards, Yegor

-- 
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]
Mailing List:    http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta POI Project: http://jakarta.apache.org/poi/

Reply via email to