You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2011/05/31 20:35:20 UTC
DO NOT REPLY [Bug 51302] New: bullets fromat lost
https://issues.apache.org/bugzilla/show_bug.cgi?id=51302
Bug #: 51302
Summary: bullets fromat lost
Product: POI
Version: 3.7
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: normal
Priority: P2
Component: HSLF
AssignedTo: dev@poi.apache.org
ReportedBy: river.dong@hotmail.com
Classification: Unclassified
when create a slide to display some content and bullets, the bullets lost
format.
public class BulletsDemo {
public static void main(String[] args) throws Exception {
BulletsDemo bd = new BulletsDemo();
SlideShow ppt = new SlideShow();
Slide slide = ppt.createSlide();
TextBox shape = new TextBox();
bd.normalSlide(shape);
bd.bulletSlide(shape);
slide.addShape(shape);
FileOutputStream out = new FileOutputStream("c:/bullets.ppt");
ppt.write(out);
out.close();
}
public void bulletSlide(TextBox shape) {
String content = "January\rFebruary\rMarch\rApril";
TextRun tr = shape.createTextRun();
RichTextRun rt = tr.appendText(content);
rt.setBulletOffset(30);
rt.setTextOffset(50);
rt.setBulletChar('\u25CF');
rt.setFontSize(18);
}
public void normalSlide(TextBox shape) {
String content = "Apache POI 3.7 Demo\r";
RichTextRun rt = shape.getTextRun().getRichTextRuns()[0];
rt.setText(content);
rt.setFontSize(25);
}
}
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org