Bug 50764 - RichTextRun.setBulletColor doesn't work
Summary: RichTextRun.setBulletColor doesn't work
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: HSLF (show other bugs)
Version: 3.7-FINAL
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on: 45124
Blocks:
  Show dependency tree
 
Reported: 2011-02-11 11:15 UTC by 西门吹水
Modified: 2015-11-01 23:04 UTC (History)
0 users



Attachments
Set BulletColor to Color.RED (14.00 KB, application/vnd.ms-powerpoint)
2011-02-11 11:15 UTC, 西门吹水
Details

Note You need to log in before you can comment on or make changes to this bug.
Description 西门吹水 2011-02-11 11:15:01 UTC
Created attachment 26642 [details]
Set BulletColor to Color.RED

SlideShow ppt = new SlideShow();

        Slide slide = ppt.createSlide();

        TextBox shape = new TextBox();
        RichTextRun rt = shape.getTextRun().getRichTextRuns()[0];
        shape.setText(
                "January\r"
                + "February\r"
                + "March\r"
                + "April");
        rt.setFontSize(42);
        rt.setBullet(true);
        //rt.setBulletColor(Color.BLUE);
        rt.setBulletOffset(0);  //bullet offset
        rt.setTextOffset(50);   //text offset (should be greater than bullet offset)
        rt.setBulletChar('\u263A'); //bullet character
        slide.addShape(shape);

        shape.setAnchor(new java.awt.Rectangle(50, 50, 500, 300));  //position of the text box in the slide
        slide.addShape(shape);

        FileOutputStream out = new FileOutputStream("bullets.ppt");
        ppt.write(out);
        out.close();

If uncomment the //rt.setBulletColor(Color.BLUE); line, the ppt will show no Bullet. If rt.setBulletColor(Color.RED); Set the Color to RED, the Bullet Char shows, but it's wrong, and color is still black.

The attachment red.ppt is generate by set BulletColor red.
Comment 1 Andreas Beeker 2015-11-01 23:04:01 UTC
this was fixed as part of #45124