Package org.apache.poi.hwpf.model

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


   * @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

  @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, "
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 )
        {
            final ListFormatOverride listFormatOverride = listTables
                    .getOverride( properties.getIlfo() );
            final ListLevel listLevel = listTables.getLevel(
                    listFormatOverride.getLsid(), properties.getIlvl() );

            if ( listLevel.getGrpprlPapx() != null )
            {
                properties = ParagraphSprmUncompressor.uncompressPAP(
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 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

   * @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

TOP

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

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.