/** * For the given *concrete* list numId, restart the numbering on the specified * level at value val. This is done by creating a new list (ie <w:num>) * which uses the existing w:abstractNum. * @param numId * @param ilvl * @param val * @return */ public long restart(long numId, long ilvl, long val) throws InvalidOperationException { // Find the abstractNumId // (Ensure maps are initialised) if (em == null ) { getEmulator(); } ListNumberingDefinition existingLnd = instanceListDefinitions.get( Long.toString(numId) ); if (existingLnd==null) { throw new InvalidOperationException("Concrete/instance list " + numId + " does not exist"); } return restart(existingLnd.getNumNode(), ilvl, val); }
if (node == node.getParent().getFirstChild()) { newNum = listOptions.isOrderedListManualStart() ? ((OrderedList) node.getParent()).getStartNumber() : 1; numId = ndp.restart(numId, listLevel, newNum); ensureNumberedListLength(listLevel); numberedLists[listLevel] = numId; if (node == node.getParent().getFirstChild()) { newNum = 1; numId = ndp.restart(numId, listLevel, newNum); ensureBulletListLength(listLevel); bulletLists[listLevel] = numId;
/** * For the given *concrete* list numId, restart the numbering on the specified * level at value val. This is done by creating a new list (ie <w:num>) * which uses the existing w:abstractNum. * @param numId * @param ilvl * @param val * @return */ public long restart(long numId, long ilvl, long val) throws InvalidOperationException { // Find the abstractNumId // (Ensure maps are initialised) if (em == null ) { getEmulator(); } ListNumberingDefinition existingLnd = instanceListDefinitions.get( Long.toString(numId) ); if (existingLnd==null) { throw new InvalidOperationException("Concrete/instance list " + numId + " does not exist"); } return restart(existingLnd.getNumNode(), ilvl, val); }
long newNumId = ndp.restart(getConcreteList().getNumId().longValue(), ilvl, /* restart at */ 1);