You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2006/03/24 17:11:05 UTC

DO NOT REPLY [Bug 39096] New: - bug: adding new slides fails

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

           Summary: bug: adding new slides fails
           Product: POI
           Version: unspecified
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HSLF
        AssignedTo: poi-dev@jakarta.apache.org
        ReportedBy: yegor@dinom.ru


Nick,

Something is wrong with adding new slides.
Operation works only if you add the first slide to an empty presentation.

I attached the test cases.

(1) This is the only case when it works. 

    public void testAddSlides1() throws Exception {
        SlideShow ppt = new SlideShow();
        assertTrue(ppt.getSlides().length == 0);
        ppt.createSlide();
        assertTrue(ppt.getSlides().length == 1);

        //serialize and read again
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        ppt.write(out);
        out.close();

        ppt = new SlideShow(new HSLFSlideShow(new
ByteArrayInputStream(out.toByteArray())));
        assertTrue(ppt.getSlides().length == 1);
    }




(2)  The same as above but add 2 slides. The ppt is silently serialized but
if you open it looks corrupted. Also number of slides is wrong.

    public void testAddSlides2() throws Exception {
        SlideShow ppt = new SlideShow(new HSLFSlideShow(dirname + "/empty.ppt"));
        assertTrue(ppt.getSlides().length == 0);
        ppt.createSlide();
        assertTrue(ppt.getSlides().length == 1);
        ppt.createSlide();
        assertTrue(ppt.getSlides().length == 2);

        //serialize and read again
         ByteArrayOutputStream out = new ByteArrayOutputStream();
        ppt.write(out);
        out.close();

        ppt = new SlideShow(new HSLFSlideShow(new
ByteArrayInputStream(out.toByteArray())));
        assertTrue(ppt.getSlides().length == 2);
    }

(3) 
 Adding slides to a ppt fails on serialization. Any tricks with PersistPtrHolder
required? 

    public void testAddSlides3() throws Exception {
        SlideShow ppt = new SlideShow(new HSLFSlideShow(dirname +
"/basic_test_ppt_file.ppt"));
        assertTrue(ppt.getSlides().length == 2);
        ppt.createSlide();
        assertTrue(ppt.getSlides().length == 3);

        //serialize and read again
         ByteArrayOutputStream out = new ByteArrayOutputStream();
        ppt.write(out);
        out.close();

        ppt = new SlideShow(new HSLFSlideShow(new
ByteArrayInputStream(out.toByteArray())));
        assertTrue(ppt.getSlides().length == 3);
    }

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


DO NOT REPLY [Bug 39096] - bug: adding new slides fails

Posted by bu...@apache.org.
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=39096>.
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=39096





------- Additional Comments From nick@torchbox.com  2006-03-24 16:51 -------
Bah, guess my changes to your code to make it easier to follow ended up breaking
stuff :(

Can you confirm that your test case does work on the code you submitted? If so,
I'll need to compare your original code to my new stuff, and see what I broke
when I tried to make it easier to understand.....

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


DO NOT REPLY [Bug 39096] - bug: adding new slides fails

Posted by bu...@apache.org.
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=39096>.
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=39096





------- Additional Comments From yegor@dinom.ru  2006-03-24 16:12 -------
Created an attachment (id=17969)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=17969&action=view)
test case


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


Re: DO NOT REPLY [Bug 39096] - bug: adding new slides fails

Posted by Nick Burch <ni...@torchbox.com>.
On Mon, 27 Mar 2006, David Fisher wrote:
> Does the PersistPtrHandler stuff have any ability to control the name of 
> the slide as it appears in the PPT UI?

No. It just controls how PPT knows which is the latest version of a given 
slide, in a file that's been quick-saved a number of times (and so there 
are a number of copies of the slide about). It's a terrifying mapping of 
"sheet ID" (some internal record number, possibly not used anywhere else) 
to a byte offset inside the file.

If you could upload a PPT file to bugzilla with three slides, two of which 
have been named, then we ought to be able to search through to locate 
where abouts in the record structure the slide names get stored.

If we can find that, then either Yegor or myself ought to be able to come 
up with some code to alter the names

Nick

---------------------------------------------------------------------
To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
Mailing List:    http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta POI Project: http://jakarta.apache.org/poi/


Re: DO NOT REPLY [Bug 39096] - bug: adding new slides fails

Posted by David Fisher <df...@jmlafferty.com>.
Hi Yegor,

Does the PersistPtrHandler stuff have any ability to control the name  
of the slide as it appears in the PPT UI?

As you know this was one of our earlier development issues.

Regards,
Dave Fisher

On Mar 27, 2006, at 9:31 AM, Yegor Kozlov wrote:

> Hi Nick
>
> Thank you. It looks like it didn't work with the old stuff either.
>
> Regards, Yegor
>
> bao> DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
> bao> RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
> bao> <http://issues.apache.org/bugzilla/show_bug.cgi?id=39096>.
> bao> ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
> bao> INSERTED IN THE BUG DATABASE.
>
> bao> http://issues.apache.org/bugzilla/show_bug.cgi?id=39096
>
>
> bao> nick@torchbox.com changed:
>
> bao>            What    |Removed                     |Added
> bao>  
> ---------------------------------------------------------------------- 
> ------
> bao>              Status|NEW                         |RESOLVED
> bao>          Resolution|                            |FIXED
>
>
>
>
> bao> ------- Additional Comments From nick@torchbox.com  2006-03-26  
> 20:08 -------
> bao> Should work now - had to make sure everything correctly  
> updated internal views,
> bao> and then tweak how the PersistPtrHandler stuff happened
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
> Mailing List:    http://jakarta.apache.org/site/mail2.html#poi
> The Apache Jakarta POI Project: http://jakarta.apache.org/poi/
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
Mailing List:    http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta POI Project: http://jakarta.apache.org/poi/


Re: DO NOT REPLY [Bug 39096] - bug: adding new slides fails

Posted by Yegor Kozlov <ye...@dinom.ru>.
Hi Nick

Thank you. It looks like it didn't work with the old stuff either.

Regards, Yegor

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

bao> http://issues.apache.org/bugzilla/show_bug.cgi?id=39096


bao> nick@torchbox.com changed:

bao>            What    |Removed                     |Added
bao> ----------------------------------------------------------------------------
bao>              Status|NEW                         |RESOLVED
bao>          Resolution|                            |FIXED




bao> ------- Additional Comments From nick@torchbox.com  2006-03-26 20:08 -------
bao> Should work now - had to make sure everything correctly updated internal views,
bao> and then tweak how the PersistPtrHandler stuff happened


---------------------------------------------------------------------
To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
Mailing List:    http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta POI Project: http://jakarta.apache.org/poi/


DO NOT REPLY [Bug 39096] - bug: adding new slides fails

Posted by bu...@apache.org.
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=39096>.
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=39096


nick@torchbox.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




------- Additional Comments From nick@torchbox.com  2006-03-26 20:08 -------
Should work now - had to make sure everything correctly updated internal views,
and then tweak how the PersistPtrHandler stuff happened

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