Bug 54736 - [REGRESSION] Some text is now missing from slides
Summary: [REGRESSION] Some text is now missing from slides
Status: RESOLVED DUPLICATE of bug 54722
Alias: None
Product: POI
Classification: Unclassified
Component: HSLF (show other bugs)
Version: 3.9-FINAL
Hardware: PC other
: P2 regression with 4 votes (vote)
Target Milestone: ---
Assignee: POI Developers List
Depends on:
Reported: 2013-03-21 00:20 UTC by Trejkaz (pen name)
Modified: 2013-04-28 23:53 UTC (History)
0 users

test.ppt (20.00 KB, application/vnd.ms-powerpoint)
2013-03-21 00:20 UTC, Trejkaz (pen name)

Note You need to log in before you can comment on or make changes to this bug.
Description Trejkaz (pen name) 2013-03-21 00:20:45 UTC
Created attachment 30087 [details]

A test which we had for our own system started failing after updating to POI 3.9 (it was passing in POI 3.7.)

The PowerPoint file itself is the simplest file we have in our collection, so my assumption is that this is a wide-spread problem which could affect any file. Yet, in our own tests, this is the only file which is failing.

    public void testSlideText() throws Exception {
        File file = new File("test.ppt");
        SlideShow slideShow = new SlideShow(new HSLFSlideShow(new FileInputStream(file)));
        Slide slide1 = slideShow.getSlides()[0];
        TextRun[] textRuns = slide1.getTextRuns();
        assertEquals("Expected 6 runs of text", 6, textRuns.length);
        assertEquals("Wrong text", "Example Powerpoint", textRuns[0].getText());
        assertEquals("Wrong text", "\n", textRuns[1].getText());
        assertEquals("Wrong text", "text1", textRuns[2].getText());
        assertEquals("Wrong text", "text2", textRuns[3].getText());
        assertEquals("Wrong text", "text3", textRuns[4].getText());
        assertEquals("Wrong text", "text4", textRuns[5].getText());

Like our own internal test, this test also passes on 3.7 but fails on 3.9.

(I posted this to the mailing list as well. No answer came back yet - the mail may have been swallowed - but I have since reproduced it in the absence of any of our own code and dug around for a bit. I can't find the missing text anywhere in the object tree.)
Comment 1 Trejkaz (pen name) 2013-03-21 00:35:42 UTC
I'm keen enough to get this fixed that I'm willing to apply a patch to my local copy of POI, but I'm not even sure where to start investigating it.
Comment 2 Trejkaz (pen name) 2013-04-26 00:23:24 UTC
Can I please get someone to look at why this is happening and give me some pointers to where I can start looking to fix it? This is a pretty serious regression which makes POI 3.9 unusable in its current state. :/
Comment 3 Phil Persad 2013-04-26 18:53:15 UTC
Hi Trejkaz,

I filed a similar bug regarding text in tables.  From my (limited) knowledge of .ppt data structures, I suspect that the root cause is the same.  I submitted a patch under the other ticket (Bug 54722) that fixes the problem for our use case.

You could give that a try to see if it also fixes your issue.  If nothing else, it may point you in the right direction.
Comment 4 Trejkaz (pen name) 2013-04-28 23:53:51 UTC
Confirmed. I'm not sure if this sheet had tables or not, but either way, that patch fixed it for me. Closing this one as a duplicate.


*** This bug has been marked as a duplicate of bug 54722 ***