Hi everyone,
This is my first post in the list :)
I am using the POI library, version 3.2, to generate PowerPoint file.
In the master slide, I like to customize the font size of the body
text area. The following is my code, but it doesn't work.
SlideShow ppt = new SlideShow();
SlideMaster master = ppt.getSlidesMasters()[0];
TextProp textProp = master.getStyleAttribute(TextHeaderAtom.BODY_TYPE,
1, "font.size", true); // 2nd level of the body
// at this point, the value of textProp is the default 28
textProp.setValue(20); // set to new value
Slide s = ppt.createSlide();
TextBox box = new TextBox();
box.setText("Testing");
box.getTextRun().setRunType(TextHeaderAtom.BODY_TYPE); // set to body type
RichTextRun rtr = box.getTextRun().getRichTextRuns()[0];
rtr.setIndentLevel(1); // 2nd indent level
s.addShape(box);
In the generated PowerPoint file, the text "Testing" still has font
size 28; I open the master view, and find that the 2nd level font size
is still 28.
I am stuck at the moment. Any hint/help will be greatly appreciated!!
- Chen
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]