This problem occurs only on this following example.
I copy a TextBox style to make another TextBox.
HSLFSlideShow hslfsh = new HSLFSlideShow("template/test.ppt");
SlideShow ppt = new SlideShow(hslfsh);
Slide slide[] = ppt.getSlides();
for(int i = 0 ; i < slide.length ; i++)
{
Slide curSlide = slide[i];
Shape sh[] = curSlide.getShapes();
for(int j = 0; j < sh.length ; j++ )
{
Shape curSh = sh[j];
TextBox tb = new TextBox();
tb.setAnchor(curSh.getAnchor());
tb.setText("Helloworld é è ë ê à ö ï î ô ü û");
TextBox shape = (TextBox)curSh;
RichTextRun rt = shape.getTextRun().getRichTextRuns()[0];
RichTextRun newRt = tb.getTextRun().getRichTextRuns()[0];
// style copy
newRt.setAlignment(rt.getAlignment());
newRt.setBold(rt.isBold());
newRt.setFontColor(Color.black);
newRt.setFontName(rt.getFontName());
newRt.setFontSize(rt.getFontSize());
newRt.setItalic(rt.isItalic());
newRt.setUnderlined(rt.isUnderlined());
// remove old shape
curSlide.removeShape(shape);
curSlide.addShape(tb);
}
}
Helloworld respect new style but others characters stay in Arial format.
Maybe I have a problem in my source code?
Thanks
Mathieu Grosmaire wrote:
>
> Hi,
>
> I have some problem with specials characters such as éèà...
> Even if I set a font name in a RichTextRun, they always stay in Arial
> format.
> How can I solve this problem?
>
> Thanks
>
> Mathieu
>
--
View this message in context:
http://www.nabble.com/HSLF-accent-character-problem-tp17512465p17513496.html
Sent from the POI - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]