Created attachment 28046 [details] bullets overlap the text in slide image I tried converting ppt to image in HSLF. It worked fine ,except the formatting of bullets . Bullets overlap's the text without any indent or spacing. Attached the screenshots for the same.
Created attachment 28047 [details] orginal slide image
I am Using the latest POI 3.8 beta 4 version
I'm testing with simple bullet lists created in PowerPoint 2010 and all bullet offsets are correct. Please attach the problematic ppt file. Yegor
Created attachment 29597 [details] Here is a similar ppt file producing the same rendering artifacts I added some lines to the 2nd page to show where the text should line up
In looking at the failing PPT, this appears to be the failure in TextPainter.java: elem[i]._bulletOffset > elem[i]._textOffset Might change: if(elem[i]._bullet != null){ graphics.drawString(elem[i]._bullet.getIterator(), (float)(pen.x + elem[i]._bulletOffset), (float)pen.y); } To: if(elem[i]._bullet != null){ graphics.drawString(elem[i]._bullet.getIterator(), (float)(pen.x + elem[i]._bulletOffset), (float)pen.y); if (elem[i]._bulletOffset >= elem[i]._textOffset) { elem[i]._textOffset+= elem[i]._bulletOffset; } } I will try this out locally.
TextPainter.java, line ~143, added nested if inside of _bullet nullcheck. This fixes the text/bullet offset issues in the presentation, still working out the vertical spacing fix. if(elem[i]._bullet != null){ graphics.drawString(elem[i]._bullet.getIterator(), (float)(pen.x + elem[i]._bulletOffset), (float)pen.y); if (elem[i]._textOffset < elem[i]._bulletOffset) elem[i]._textOffset+= elem[i]._bulletOffset+5; }
Partly fixed with r1713316 i.e. the mentioned bug is fixed, but there's still a rendering issue with the 2nd textbox (on the 2nd slide), where I can't find an information where the left margin or the bullet offset is set and therefore there's no hanging indent. The POI code switches here to the master layout ... I guess the missing slide layout handling in HSLF is the key to this issue (and maybe to failing auto numbering issues too ...)