// This works via recursion
//log.debug( XmlUtils.marshaltoString(basedOnStyle, true, true));
if (basedOnStyle.getPPr()!=null
&& basedOnStyle.getPPr().getNumPr()!=null
&& basedOnStyle.getPPr().getNumPr().getNumId()!=null) {
NumId numId = basedOnStyle.getPPr().getNumPr().getNumId();
// Attach it at this level - for this to work,
// you can't have a style in the basedOn hierarchy
// which doesn't have a numPr element, because
// in that case there is nowhere to hang the style
style.getPPr().getNumPr().setNumId(numId);