Examples of ListLevel


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

   * @param level The level number.
   * @param pap The paragraph properties
   */
  public void setLevelParagraphProperties(int level, ParagraphProperties pap)
  {
    ListLevel listLevel = _listData.getLevel(level);
    int styleIndex = _listData.getLevelStyle(level);
    ParagraphProperties base = _styleSheet.getParagraphStyle(styleIndex);

    byte[] grpprl = ParagraphSprmCompressor.compressParagraphProperty(pap, base);
    listLevel.setLevelProperties(grpprl);
  }
View Full Code Here

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

   * @param level the level number that the properties should apply to.
   * @param chp The character properties.
   */
  public void setLevelNumberProperties(int level, CharacterProperties chp)
  {
    ListLevel listLevel = _listData.getLevel(level);
    int styleIndex = _listData.getLevelStyle(level);
    CharacterProperties base = _styleSheet.getCharacterStyle(styleIndex);

    byte[] grpprl = CharacterSprmCompressor.compressCharacterProperty(chp, base);
    listLevel.setNumberProperties(grpprl);
  }
View Full Code Here

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

   * @param level The level number.
   * @param pap The paragraph properties
   */
  public void setLevelParagraphProperties(int level, ParagraphProperties pap)
  {
    ListLevel listLevel = _listData.getLevel(level);
    int styleIndex = _listData.getLevelStyle(level);
    ParagraphProperties base = _styleSheet.getParagraphStyle(styleIndex);

    byte[] grpprl = ParagraphSprmCompressor.compressParagraphProperty(pap, base);
    listLevel.setLevelProperties(grpprl);
  }
View Full Code Here

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

    HWPFDocument doc = HWPFTestDataSamples.openSampleFile("Bug50075.doc");
    Range range = doc.getRange();
    assertEquals(1, range.numParagraphs());
    ListEntry entry = (ListEntry) range.getParagraph(0);
    LFO override = doc.getListTables().getLfo( entry.getIlfo());
    ListLevel level = doc.getListTables().getLevel(override.getLsid(), entry.getIlvl());
   
    // the bug reproduces, if this call fails with NullPointerException
    level.getNumberText();
  }
View Full Code Here

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

    HWPFDocument doc = HWPFTestDataSamples.openSampleFile("Bug50075.doc");
    Range range = doc.getRange();
    assertEquals(1, range.numParagraphs());
    ListEntry entry = (ListEntry) range.getParagraph(0);
    ListFormatOverride override = doc.getListTables().getOverride(entry.getIlfo());
    ListLevel level = doc.getListTables().getLevel(override.getLsid(), entry.getIlvl());
   
    // the bug reproduces, if this call fails with NullPointerException
    level.getNumberText();
  }
View Full Code Here

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

            throw new IllegalArgumentException( "Required level "
                    + ( (int) level )
                    + " is more than number of level for list ("
                    + _listData.numLevels() + ")" );
        }
        ListLevel lvl = _listData.getLevels()[level];
        return lvl;
    }
View Full Code Here

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

     * @param chp
     *            The character properties.
     */
    public void setLevelNumberProperties( int level, CharacterProperties chp )
    {
        ListLevel listLevel = _listData.getLevel( level );
        int styleIndex = _listData.getLevelStyle( level );
        CharacterProperties base = _styleSheet.getCharacterStyle( styleIndex );

        byte[] grpprl = CharacterSprmCompressor.compressCharacterProperty( chp,
                base );
        listLevel.setNumberProperties( grpprl );
    }
View Full Code Here

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

     * @param pap
     *            The paragraph properties
     */
    public void setLevelParagraphProperties( int level, ParagraphProperties pap )
    {
        ListLevel listLevel = _listData.getLevel( level );
        int styleIndex = _listData.getLevelStyle( level );
        ParagraphProperties base = _styleSheet.getParagraphStyle( styleIndex );

        byte[] grpprl = ParagraphSprmCompressor.compressParagraphProperty( pap,
                base );
        listLevel.setLevelProperties( grpprl );
    }
View Full Code Here

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

                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(
                            properties, listLevel.getGrpprlPapx(), 0 );
                    // reapply style and local PAPX properties
                    properties = newParagraph_applyStyleProperties( styleSheet,
                            papx, properties );
                    properties = ParagraphSprmUncompressor.uncompressPAP(
                            properties, papx.getGrpprl(), 2 );
View Full Code Here

Examples of org.docx4j.model.listnumbering.ListLevel

    if (lnd==null) {
      log.debug("couldn't find list for numId: " + numId);
      return null;
    }
    if (ilvl==null) ilvl = "0";
    ListLevel ll = lnd.getLevel(ilvl);
    if (ll==null) {
      log.warn("No ListLevel defined for level " + ilvl + " in list " + numId);
      return null;
    }
   
    // OK, now on the JAXB plane
    Lvl jaxbOverrideLvl = ll.getJaxbOverrideLvl();
   
    log.debug("Looking at override/instance definition..");
    if (jaxbOverrideLvl!=null) {
     
      Ind ind = getIndFromLvl(jaxbOverrideLvl);
      if (ind!=null) {
        log.debug("Got it..");
        return ind;
      }
    }
   
    // Now do the same for the abstract definition
    log.debug("Looking at abstract definition..");
    Lvl abstractLvl = ll.getJaxbAbstractLvl();
    Ind ind = getIndFromLvl(abstractLvl);
   
    return ind;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.