Package org.apache.poi.hwpf.model

Examples of org.apache.poi.hwpf.model.ListTables


   * @param styleIndex
   *            The base style's index in the stylesheet.
   * @return The empty ListEntry that is now part of the document.
   */
  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);
  }
View Full Code Here


   * @param styleIndex
   *            The base style's index in the stylesheet.
   * @return The empty ListEntry that is now part of the document.
   */
  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);
  }
View Full Code Here

    int listOffset = _fib.getFcPlcfLst();
    int lfoOffset = _fib.getFcPlfLfo();
    if (listOffset != 0 && _fib.getLcbPlcfLst() != 0)
    {
      _lt = new ListTables(_tableStream, _fib.getFcPlcfLst(), _fib.getFcPlfLfo());
    }

    int sbtOffset = _fib.getFcSttbSavedBy();
    int sbtLength = _fib.getLcbSttbSavedBy();
    if (sbtOffset != 0 && sbtLength != 0)
View Full Code Here

  public int registerList(HWPFList list)
  {
    if (_lt == null)
    {
      _lt = new ListTables();
    }
    return _lt.addList(list.getListData(), list.getOverride());
  }
View Full Code Here

        int listOffset = _fib.getFcPlfLst();
        int lfoOffset = _fib.getFcPlfLfo();
        if ( listOffset != 0 && _fib.getLcbPlfLst() != 0 )
        {
            _lt = new ListTables( _tableStream, listOffset, _fib.getFcPlfLfo(),
                    _fib.getLcbPlfLfo() );
        }

    int sbtOffset = _fib.getFcSttbSavedBy();
    int sbtLength = _fib.getLcbSttbSavedBy();
View Full Code Here

    public int registerList( HWPFList list )
    {
        if ( _lt == null )
        {
            _lt = new ListTables();
        }
        return _lt.addList( list.getListData(), list.getLFO(),
                list.getLFOData() );
    }
View Full Code Here

   * @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);
  }
View Full Code Here

   * @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);
  }
View Full Code Here

    @Internal
    static Paragraph newParagraph( Range parent, PAPX papx )
    {
        HWPFDocumentCore doc = parent._doc;
        ListTables listTables = doc.getListTables();
        StyleSheet styleSheet = doc.getStyleSheet();

        ParagraphProperties properties = new ParagraphProperties();
        properties.setIstd( papx.getIstd() );

        properties = newParagraph_applyStyleProperties( styleSheet, papx,
                properties );
        properties = ParagraphSprmUncompressor.uncompressPAP( properties,
                papx.getGrpprl(), 2 );

        if ( properties.getIlfo() != 0 && listTables != null )
        {
            LFO lfo = null;
            try
            {
                lfo = listTables.getLfo( properties.getIlfo() );
            }
            catch ( NoSuchElementException exc )
            {
                log.log( POILogger.WARN, "Paragraph refers to LFO #",
                        properties.getIlfo(), " that does not exists" );
            }
            if ( lfo != null )
            {
                final ListLevel listLevel = listTables.getLevel( lfo.getLsid(),
                        properties.getIlvl() );

                if ( listLevel != null && listLevel.getGrpprlPapx() != null )
                {
                    properties = ParagraphSprmUncompressor.uncompressPAP(
View Full Code Here

    int listOffset = _fib.getFcPlcfLst();
    int lfoOffset = _fib.getFcPlfLfo();
    if (listOffset != 0 && _fib.getLcbPlcfLst() != 0)
    {
      _lt = new ListTables(_tableStream, _fib.getFcPlcfLst(), _fib.getFcPlfLfo());
    }

    int sbtOffset = _fib.getFcSttbSavedBy();
    int sbtLength = _fib.getLcbSttbSavedBy();
    if (sbtOffset != 0 && sbtLength != 0)
View Full Code Here

TOP

Related Classes of org.apache.poi.hwpf.model.ListTables

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.