public Emulator getEmulator() { return getEmulator(false); }
/** * 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); }
private Map<P, ResultTriple> numberParagraphs(List<P> pList) { org.docx4j.openpackaging.parts.WordprocessingML.NumberingDefinitionsPart numberingPart = wordMLPackage.getMainDocumentPart().getNumberingDefinitionsPart(); Map<P, ResultTriple> pNumbersMap = new HashMap<P, ResultTriple>(); if (numberingPart==null) { return pNumbersMap; } numberingPart.getEmulator(true); // reset counters //PropertyResolver propertyResolver = wordMLPackage.getMainDocumentPart().getPropertyResolver(); for (P p : pList) { if (p.getPPr()!=null) { ResultTriple triple = Emulator.getNumber(wordMLPackage, p.getPPr()); pNumbersMap.put(p, triple); } } return pNumbersMap; }
Emulator em = numberingPart.getEmulator();
public Emulator getEmulator() { return getEmulator(false); }
/** * 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); }
private Map<P, ResultTriple> numberParagraphs(List<P> pList) { org.docx4j.openpackaging.parts.WordprocessingML.NumberingDefinitionsPart numberingPart = wordMLPackage.getMainDocumentPart().getNumberingDefinitionsPart(); Map<P, ResultTriple> pNumbersMap = new HashMap<P, ResultTriple>(); if (numberingPart==null) { return pNumbersMap; } numberingPart.getEmulator(true); // reset counters //PropertyResolver propertyResolver = wordMLPackage.getMainDocumentPart().getPropertyResolver(); for (P p : pList) { if (p.getPPr()!=null) { ResultTriple triple = Emulator.getNumber(wordMLPackage, p.getPPr()); pNumbersMap.put(p, triple); } } return pNumbersMap; }
Emulator em = numberingPart.getEmulator();