/** * Inserts a list into the beginning of this range. * * @param props * The properties of the list entry. All list entries are * paragraphs. * @param listID * The id of the list that contains the properties. * @param level * The indentation level of the list. * @param styleIndex * The base style's index in the stylesheet. * @return The empty ListEntry that is now part of the document. * @deprecated Use code shall not work with {@link ParagraphProperties} */ @Deprecated public ListEntry insertAfter(ParagraphProperties props, int listID, int level, int styleIndex) { ListTables lt = _doc.getListTables(); if (lt.getLevel(listID, level) == null) { throw new NoSuchElementException("The specified list and level do not exist"); } int ilfo = lt.getOverrideIndexFromListID(listID); props.setIlfo(ilfo); props.setIlvl((byte) level); return (ListEntry) insertAfter(props, styleIndex); }
/** * Inserts a list into the beginning of this range. * * @param props * The properties of the list entry. All list entries are * paragraphs. * @param listID * The id of the list that contains the properties. * @param level * The indentation level of the list. * @param styleIndex * The base style's index in the stylesheet. * @return The empty ListEntry that is now part of the document. * @deprecated Use code shall not work with {@link ParagraphProperties} */ @Deprecated public ListEntry insertBefore(ParagraphProperties props, int listID, int level, int styleIndex) { ListTables lt = _doc.getListTables(); if (lt.getLevel(listID, level) == null) { throw new NoSuchElementException("The specified list and level do not exist"); } int ilfo = lt.getOverrideIndexFromListID(listID); props.setIlfo(ilfo); props.setIlvl((byte) level); return (ListEntry) insertBefore(props, styleIndex); }
@Deprecated ListEntry(PAPX papx, Range parent, ListTables tables) { super(papx, parent); if(tables != null && _props.getIlfo() < tables.getOverrideCount()) { ListFormatOverride override = tables.getOverride(_props.getIlfo()); _overrideLevel = override.getOverrideLevel(_props.getIlvl()); _level = tables.getLevel(override.getLsid(), _props.getIlvl()); } else { log.log(POILogger.WARN, "No ListTables found for ListEntry - document probably partly corrupt, and you may experience problems"); } }
protected void dumpParagraphLevels( ListTables listTables, ParagraphProperties paragraph ) { if ( paragraph.getIlfo() != 0 ) { final ListFormatOverride listFormatOverride = listTables .getOverride( paragraph.getIlfo() ); System.out.println( "PAP's LFO: " + listFormatOverride ); final ListLevel listLevel = listTables.getLevel( listFormatOverride.getLsid(), paragraph.getIlvl() ); System.out.println( "PAP's ListLevel: " + listLevel ); if ( listLevel.getGrpprlPapx() != null ) { System.out.println( "PAP's ListLevel PAPX:" ); dumpSprms( new SprmIterator( listLevel.getGrpprlPapx(), 0 ), "* " ); } if ( listLevel.getGrpprlPapx() != null ) { System.out.println( "PAP's ListLevel CHPX:" ); dumpSprms( new SprmIterator( listLevel.getGrpprlChpx(), 0 ), "* " ); } } }
protected void dumpParagraphLevels( ListTables listTables, ParagraphProperties paragraph ) { if ( paragraph.getIlfo() != 0 ) { final LFO lfo = listTables.getLfo( paragraph.getIlfo() ); System.out.println( "PAP's LFO: " + lfo ); final LFOData lfoData = listTables.getLfoData( paragraph.getIlfo() ); System.out.println( "PAP's LFOData: " + lfoData ); if ( lfo != null ) { final ListLevel listLevel = listTables.getLevel( lfo.getLsid(), paragraph.getIlvl() ); System.out.println( "PAP's ListLevel: " + listLevel ); if ( listLevel.getGrpprlPapx() != null ) { System.out.println( "PAP's ListLevel PAPX:" ); dumpSprms( new SprmIterator( listLevel.getGrpprlPapx(), 0 ), "* " ); } if ( listLevel.getGrpprlPapx() != null ) { System.out.println( "PAP's ListLevel CHPX:" ); dumpSprms( new SprmIterator( listLevel.getGrpprlChpx(), 0 ), "* " ); } } } }
@Internal ListEntry( PAPX papx, ParagraphProperties properties, Range parent ) { super( papx, properties, parent ); final ListTables tables = parent._doc.getListTables(); if ( tables != null && _props.getIlfo() < tables.getOverrideCount() ) { ListFormatOverride override = tables.getOverride( _props.getIlfo() ); _overrideLevel = override.getOverrideLevel( _props.getIlvl() ); _level = tables.getLevel( override.getLsid(), _props.getIlvl() ); } else { log.log( POILogger.WARN, "No ListTables found for ListEntry - document probably partly corrupt, " + "and you may experience problems" ); } }
final ListLevel listLevel = listTables.getLevel( listFormatOverride.getLsid(), properties.getIlvl() );
final ListLevel listLevel = listTables.getLevel( lfo.getLsid(), properties.getIlvl() );