Package org.apache.poi.hwpf.model

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


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

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

    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

    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

            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

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

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

                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

TOP

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

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.