}
private void setTag(SdtBlock sdtList, BigInteger numId, BigInteger ilvl) {
SdtPr sdtPr = new SdtPr();
Tag tag = new Tag();
sdtPr.setTag(tag);
sdtList.setSdtPr(sdtPr);
// Bullets = UL. Work it out.
ListNumberingDefinition lnd = ndp.getInstanceListDefinitions().get(numId.toString());
if (lnd==null) {
// Default to UL
log.warn("Couldn't find instance list for numId " + numId);
tag.setVal("HTML_ELEMENT=OL");
return;
}
AbstractListNumberingDefinition ald = lnd.getAbstractListDefinition();
if (ald==null) {
// Default to UL
log.warn("Couldn't find abstract list for instance list " + numId);
tag.setVal("HTML_ELEMENT=OL");
return;
}
ListLevel level = ald.getListLevels().get(ilvl.toString());
if (level==null) {
// Default to UL
log.warn("Couldn't find level " + ilvl.toString() + " in instance list ");
tag.setVal("HTML_ELEMENT=OL");
return;
}
if (level.IsBullet()) {
tag.setVal("HTML_ELEMENT=UL");
} else {
tag.setVal("HTML_ELEMENT=OL");
}
}