You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Mathieu Grosmaire <ma...@gmail.com> on 2008/06/13 16:35:14 UTC
HSLF : margin problem on SimpleShape
Hello
I want to get data on TextBoxes with a template but I have got problems
with margin on SimpleShape. Only margin right and top run normally but
margin left and bottom have incorrect values.
Sample code :
SlideShow ppt = new SlideShow(new HSLFSlideShow("test2.ppt"));
Slide slide = ppt.getSlides()[0];
Shape sh[] = slide.getShapes();
for( int i = 0 ; i < sh.length ; i++ )
{
TextBox curSh = (TextBox)sh[i];
System.out.println(curSh.getText());
System.out.println("Margin top : "+curSh.getMarginTop());
System.out.println("Margin bottom : "+curSh.getMarginBottom());
System.out.println("Margin left : "+curSh.getMarginLeft());
System.out.println("Margin right : "+curSh.getMarginRight());
System.out.println();
}
http://www.nabble.com/file/p17824872/test2.ppt test2.ppt
Regards
MG
--
View this message in context: http://www.nabble.com/HSLF-%3A-margin-problem-on-SimpleShape-tp17824872p17824872.html
Sent from the POI - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org
Re: HSLF : margin problem on SimpleShape
Posted by Yegor Kozlov <ye...@dinom.ru>.
Bug confirmed. I will commit the fix in a little while.
Yegor
> Hello
>
> I want to get data on TextBoxes with a template but I have got problems
> with margin on SimpleShape. Only margin right and top run normally but
> margin left and bottom have incorrect values.
>
> Sample code :
>
> SlideShow ppt = new SlideShow(new HSLFSlideShow("test2.ppt"));
>
> Slide slide = ppt.getSlides()[0];
>
> Shape sh[] = slide.getShapes();
>
> for( int i = 0 ; i < sh.length ; i++ )
> {
> TextBox curSh = (TextBox)sh[i];
> System.out.println(curSh.getText());
> System.out.println("Margin top : "+curSh.getMarginTop());
> System.out.println("Margin bottom : "+curSh.getMarginBottom());
> System.out.println("Margin left : "+curSh.getMarginLeft());
> System.out.println("Margin right : "+curSh.getMarginRight());
> System.out.println();
> }
>
> http://www.nabble.com/file/p17824872/test2.ppt test2.ppt
>
> Regards
>
> MG
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org