ListEntry aListEntry = (ListEntry) aParagraph; ListData listData = listTables.getListData(aListEntry.getIlfo()); int numberFormat = listData.getLevel(listData.numLevels()).getNumberFormat();
public ListLevel getLevel(int listID, int level) { ListData lst = _listMap.get(Integer.valueOf(listID)); if(level < lst.numLevels()) { ListLevel lvl = lst.getLevels()[level]; return lvl; } log.log(POILogger.WARN, "Requested level " + level + " which was greater than the maximum defined (" + lst.numLevels() + ")"); return null; }
/** * Get the ListLevel for a given lsid and level * @param lsid * @param level * @return ListLevel if found, or <code>null</code> if ListData can't be found or if level is > that available */ public ListLevel getLevel(int lsid, int level) { ListData lst = _listMap.get(Integer.valueOf(lsid)); if (lst == null) { if (log.check(POILogger.WARN)) { log.log(POILogger.WARN, "ListData for " + lsid + " was null."); } return null; } if(level < lst.numLevels()) { return lst.getLevels()[level]; } if (log.check(POILogger.WARN)) { log.log(POILogger.WARN, "Requested level " + level + " which was greater than the maximum defined (" + lst.numLevels() + ")"); } return null; }
public ListTables( byte[] tableStream, final int lstOffset, final int fcPlfLfo, final int lcbPlfLfo ) { /* * The PlfLst structure contains the list formatting information for the * document. -- Page 425 of 621. [MS-DOC] -- v20110315 Word (.doc) * Binary File Format */ int offset = lstOffset; int cLst = LittleEndian.getShort( tableStream, offset ); offset += LittleEndian.SHORT_SIZE; int levelOffset = offset + ( cLst * LSTF.getSize() ); for ( int x = 0; x < cLst; x++ ) { ListData lst = new ListData( tableStream, offset ); _listMap.put( Integer.valueOf( lst.getLsid() ), lst ); offset += LSTF.getSize(); int num = lst.numLevels(); for ( int y = 0; y < num; y++ ) { ListLevel lvl = new ListLevel(); levelOffset += lvl.read( tableStream, levelOffset ); lst.setLevel( y, lvl ); } } this._plfLfo = new PlfLfo( tableStream, fcPlfLfo, lcbPlfLfo ); }
offset += LSTF.getSize(); int num = lst.numLevels(); for ( int y = 0; y < num; y++ )