} // otherwise a font might be used in a run with content other than w:t?
} else {
log.debug(text);
}
PropertyResolver propertyResolver = wordMLPackage.getMainDocumentPart().getPropertyResolver();
// Style pStyle = null;
String pStyleId = null;
RPr pRPr = null;
if (pPr==null || pPr.getPStyle()==null) {
// pStyle = getDefaultPStyle();
if (getDefaultPStyle() == null) {
log.warn("getDefaultPStyle() returned null");
} else {
// log.debug("using default p style");
// pRPr = pStyle.getRPr(); // TODO pStyle.getRPr() should inherit from basedOn
pStyleId = getDefaultPStyle().getStyleId();
}
} else {
pStyleId = pPr.getPStyle().getVal();
}
if (pStyleId!=null && wordMLPackage.getMainDocumentPart().getStyleDefinitionsPart(false) != null) {
// apply the rPr in the stack of styles, including documentDefaultRPr
// log.debug(pStyleId);
pRPr = propertyResolver.getEffectiveRPr(pStyleId);
// log.debug("before getEffectiveRPrUsingPStyleRPr\n" + XmlUtils.marshaltoString(pRPr));
}
// Do we need boolean major??
// Can work that out from pStyle
// now apply the direct rPr
rPr = propertyResolver.getEffectiveRPrUsingPStyleRPr(rPr, pRPr);
// TODO use effective rPr, but don't inherit theme val,
// TODO, add cache?
log.debug("effective\n" + XmlUtils.marshaltoString(rPr));