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 2008/09/29 12:52:14 UTC
DO NOT REPLY [Bug 45908] New: RichTextRun.setBullet(false) doesn't
work, bullets still here
https://issues.apache.org/bugzilla/show_bug.cgi?id=45908
Summary: RichTextRun.setBullet(false) doesn't work, bullets still
here
Product: POI
Version: 3.2-dev
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P1
Component: HSLF
AssignedTo: dev@poi.apache.org
ReportedBy: cvolozhin@pragmaticsoft.com
Created an attachment (id=22644)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=22644)
New_Slide.ppt file
When using rt.setBullet(false) method, bullets in table still here. (See
resulting file ppt_out.ppt)
When my code doesn't have any setBullet* methods - bullets still in table also.
Looks like bug.
POI code: trunk
code snippet:
public static void main(String[] args) {
SlideShow sourcePpt = null;
try {
sourcePpt = new SlideShow(new HSLFSlideShow("New_Slide.ppt"));
} catch (IOException e) {
}
Slide slide = sourcePpt.getSlides()[0];
Shape[] shapes = slide.getShapes();
AutoShape styleShape = (AutoShape) shapes[1];
int rows = 5;
int cols = 2;
Table table = new Table(rows, cols);
for (int i = 0; i < rows; i++) {
for (int j = 0; j < cols; j++) {
TableCell cell = table.getCell(i, j);
cell.setText("Test");
RichTextRun rt = cell.getTextRun().getRichTextRunAt(0);
RichTextRun textStyle =
styleShape.getTextRun().getRichTextRunAt(0);
rt.setBullet(false); // <--- this method doesn't work!
/*rt.setBulletChar('%');
rt.setBulletColor(richTextRun.getBulletColor());
rt.setBulletFont(richTextRun.getBulletFont());
rt.setBulletOffset(richTextRun.getBulletOffset());
rt.setBulletSize(richTextRun.getBulletSize());*/
rt.setAlignment(textStyle.getAlignment());
rt.setBold(textStyle.isBold());
rt.setEmbossed(textStyle.isEmbossed());
rt.setFontColor(Color.BLACK);
rt.setFontName(textStyle.getFontName());
rt.setFontSize(textStyle.getFontSize());
rt.setIndentLevel(textStyle.getIndentLevel());
rt.setItalic(textStyle.isItalic());
rt.setShadowed(textStyle.isShadowed());
rt.setSpaceAfter(textStyle.getSpaceAfter());
rt.setSpaceBefore(textStyle.getSpaceBefore());
rt.setStrikethrough(textStyle.isStrikethrough());
rt.setUnderlined(textStyle.isUnderlined());
}
}
slide.addShape(table);
table.moveTo(100, 100);
FileOutputStream out;
try {
out = new FileOutputStream("ppt_out.ppt");
sourcePpt.write(out);
out.close();
} catch (IOException e) {
}
}
--
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
DO NOT REPLY [Bug 45908] RichTextRun.setBullet(false) doesn't work,
bullets still here
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45908
--- Comment #1 from Constantin <cv...@pragmaticsoft.com> 2008-09-29 04:12:29 PST ---
Note: POI SVN code at revision 685064 doesn't have this problem.
--
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