/** * * @param numbered true if the list should be numbered; false if it should be * bulleted. * @param styleSheet The document's stylesheet. */ public HWPFList(boolean numbered, StyleSheet styleSheet) { _listData = new ListData((int)(Math.random() * System.currentTimeMillis()), numbered); _override = new ListFormatOverride(_listData.getLsid()); _styleSheet = styleSheet; }
public int addList(ListData lst, ListFormatOverride override) { int lsid = lst.getLsid(); while (_listMap.get(Integer.valueOf(lsid)) != null) { lsid = lst.resetListID(); override.setLsid(lsid); } _listMap.put(Integer.valueOf(lsid), lst); _overrideList.add(override); return lsid; }
public int addList( ListData lst, LFO lfo, LFOData lfoData ) { int lsid = lst.getLsid(); while ( _listMap.get( Integer.valueOf( lsid ) ) != null ) { lsid = lst.resetListID(); lfo.setLsid( lsid ); } _listMap.put( Integer.valueOf( lsid ), lst ); if ( lfo == null && lfoData != null ) { throw new IllegalArgumentException( "LFO and LFOData should be specified both or noone" ); } if ( lfo != null ) { _plfLfo.add( lfo, lfoData ); } return lsid; } }
/** * * @param numbered * true if the list should be numbered; false if it should be * bulleted. * @param styleSheet * The document's stylesheet. */ public HWPFList( boolean numbered, StyleSheet styleSheet ) { _listData = new ListData( (int) ( Math.random() * System.currentTimeMillis() ), numbered ); _lfo = new LFO(); _lfo.setLsid( _listData.getLsid() ); _lfoData = new LFOData(); _styleSheet = styleSheet; }
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 ); }
_listMap.put( Integer.valueOf( lst.getLsid() ), lst ); offset += LSTF.getSize();