--- src/scratchpad/src/org/apache/poi/hslf/usermodel/RichTextRun.java (revision 539839) +++ src/scratchpad/src/org/apache/poi/hslf/usermodel/RichTextRun.java (working copy) @@ -170,7 +170,8 @@ Sheet sheet = parentRun.getSheet(); int txtype = parentRun.getRunType(); SlideMaster master = (SlideMaster)sheet.getMasterSheet(); - cftp = (CharFlagsTextProp)master.getStyleAttribute(txtype, getIndentLevel(), "char_flags", true); + if (master != null) + cftp = (CharFlagsTextProp)master.getStyleAttribute(txtype, getIndentLevel(), "char_flags", true); } return cftp == null ? false : cftp.getSubValue(index); @@ -223,7 +224,8 @@ Sheet sheet = parentRun.getSheet(); int txtype = parentRun.getRunType(); SlideMaster master = (SlideMaster)sheet.getMasterSheet(); - prop = master.getStyleAttribute(txtype, getIndentLevel(), propName, true); + if (master != null) + prop = master.getStyleAttribute(txtype, getIndentLevel(), propName, true); } return prop == null ? -1 : prop.getValue(); } @@ -242,7 +244,8 @@ Sheet sheet = parentRun.getSheet(); int txtype = parentRun.getRunType(); SlideMaster master = (SlideMaster)sheet.getMasterSheet(); - prop = master.getStyleAttribute(txtype, getIndentLevel(), propName, false); + if (master != null) + prop = master.getStyleAttribute(txtype, getIndentLevel(), propName, false); } return prop == null ? -1 : prop.getValue(); --- src/scratchpad/src/org/apache/poi/hslf/model/Notes.java (revision 539839) +++ src/scratchpad/src/org/apache/poi/hslf/model/Notes.java (working copy) @@ -56,6 +56,10 @@ // one of TextBytesAtom or TextCharsAtom, found inside // EscherTextboxWrapper's in the PPDrawing _runs = findTextRuns(_notes.getPPDrawing()); + + // Set the sheet on each TextRun + for (int i = 0; i < _runs.length; i++) + _runs[i].setSheet(this); }