Created attachment 30087 [details] test.ppt 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. @Test 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.)
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.
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. :/
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.
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. Thanks! *** This bug has been marked as a duplicate of bug 54722 ***