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

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

            String bulletText );

    protected void processParagraphes( HWPFDocumentCore wordDocument,
            Element flow, Range range, int currentTableLevel )
    {
        final ListTables listTables = wordDocument.getListTables();
        int currentListInfo = 0;

        final int paragraphs = range.numParagraphs();
        for ( int p = 0; p < paragraphs; p++ )
        {
            Paragraph paragraph = range.getParagraph( p );

            if ( paragraph.isInTable()
                    && paragraph.getTableLevel() != currentTableLevel )
            {
                if ( paragraph.getTableLevel() < currentTableLevel )
                    throw new IllegalStateException(
                            "Trying to process table cell with higher level ("
                                    + paragraph.getTableLevel()
                                    + ") than current table level ("
                                    + currentTableLevel
                                    + ") as inner table part" );

                Table table = range.getTable( paragraph );
                processTable( wordDocument, flow, table );

                p += table.numParagraphs();
                p--;
                continue;
            }

            if ( paragraph.text().equals( "\u000c" ) )
            {
                processPageBreak( wordDocument, flow );
            }

            if ( paragraph.getIlfo() != currentListInfo )
            {
                currentListInfo = paragraph.getIlfo();
            }

            if ( currentListInfo != 0 )
            {
                if ( listTables != null )
                {
                    final ListFormatOverride listFormatOverride = listTables
                            .getOverride( paragraph.getIlfo() );

                    String label = AbstractWordUtils.getBulletText( listTables,
                            paragraph, listFormatOverride.getLsid() );
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

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

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.