}\r
\r
\r
+ /**\r
+ * @return master style text paragraph properties, or <code>null</code> if \r
+ * there are no master slides or the master slides do not contain a text paragraph\r
+ */\r
/* package */ CTTextParagraphProperties getDefaultMasterStyle(){\r
CTPlaceholder ph = _shape.getCTPlaceholder();\r
String defaultStyleSelector; \r
public Double getDefaultFontSize() {\r
CTTextCharacterProperties endPr = _p.getEndParaRPr();\r
if (endPr == null || !endPr.isSetSz()) {\r
- endPr = getDefaultMasterStyle().getDefRPr();\r
+ // inherit the font size from the master style\r
+ CTTextParagraphProperties masterStyle = getDefaultMasterStyle();\r
+ if (masterStyle != null) {\r
+ endPr = masterStyle.getDefRPr();\r
+ }\r
}\r
return (endPr == null || !endPr.isSetSz()) ? 12 : (endPr.getSz() / 100.);\r
}\r
protected XSLFTextRun newTextRun(CTRegularTextRun r) {\r
return new XSLFTextRun(r, this);\r
}\r
-}
\ No newline at end of file
+}\r