[prev in list] [next in list] [prev in thread] [next in thread]
List: poi-dev
Subject: DO NOT REPLY [Bug 47904] New: Changing a RichTextRun attribute of a
From: bugzilla () apache ! org
Date: 2009-09-25 15:25:55
Message-ID: bug-47904-47293 () https ! issues ! apache ! org/bugzilla/
[Download RAW message or body]
https://issues.apache.org/bugzilla/show_bug.cgi?id=47904
Summary: Changing a RichTextRun attribute of a MasterSlide
results in a NullReferenceException
Product: POI
Version: 3.2-FINAL
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: normal
Priority: P2
Component: HSLF
AssignedTo: dev@poi.apache.org
ReportedBy: dandrejvv@gmail.com
I have tried to change the MasterSlide's RichTextRun attribute, i.e. setting
FontName or anything else and it pops up with a NullReferenceException.
I have traced it in the source to these lines:
TextRun.java: 519 RecordContainer runAtomsParent =
_headerAtom.getParentRecord();
TextHeaderAtom.java: 55 public RecordContainer getParentRecord() { return
parentRecord; }
The 'parentRecord' is null.
It is then tried to be called here:
TextRun.java: 524 runAtomsParent.addChildAfter(_styleAtom, addAfter);
Since 'runAtomsParent' is null, we get the exception.
Here is some example code of what I did:
SlideMaster master = mSlideshow.getSlidesMasters()[0];
TextShape title = (TextShape) master.getShapes()[0];
RichTextRun titleFormat = title.getTextRun().getRichTextRuns()[0];
titleFormat.setFontName("Franklin Gothic Book");
titleFormat.setShadowed(true);
titleFormat.setFontSize(44);
titleFormat.setFontColor(Color.white);
titleFormat.setAlignment(TextBox.AlignCenter);
master.addShape(title);
mSlideShow is as you have guessed, my SlideShow object.
--
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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic