Package org.apache.poi.hwpf.model

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


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

            final ListFormatOverride listFormatOverride = listTables
                    .getOverride( paragraph.getIlfo() );

            System.out.println( "PAP's LFO: " + listFormatOverride );

            final ListLevel listLevel = listTables.getLevel(
                    listFormatOverride.getLsid(), paragraph.getIlvl() );

            System.out.println( "PAP's ListLevel: " + listLevel );
            if ( listLevel.getGrpprlPapx() != null )
            {
                System.out.println( "PAP's ListLevel PAPX:" );
                dumpSprms( new SprmIterator( listLevel.getGrpprlPapx(), 0 ),
                        "* " );
            }

            if ( listLevel.getGrpprlPapx() != null )
            {
                System.out.println( "PAP's ListLevel CHPX:" );
                dumpSprms( new SprmIterator( listLevel.getGrpprlChpx(), 0 ),
                        "* " );
            }
        }
    }
View Full Code Here

    }

    public static String getBulletText( ListTables listTables,
            Paragraph paragraph, int listId )
    {
        final ListLevel listLevel = listTables.getLevel( listId,
                paragraph.getIlvl() );

        if ( listLevel.getNumberText() == null )
            return EMPTY;

        StringBuffer bulletBuffer = new StringBuffer();
        char[] xst = listLevel.getNumberText().toCharArray();
        for ( char element : xst )
        {
            if ( element < 9 )
            {
                ListLevel numLevel = listTables.getLevel( listId, element );

                int num = numLevel.getStartAt();
                bulletBuffer.append( NumberFormatter.getNumber( num,
                        listLevel.getNumberFormat() ) );

                if ( numLevel == listLevel )
                {
                    numLevel.setStartAt( numLevel.getStartAt() + 1 );
                }

            }
            else
            {
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

        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(
                        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

            final LFOData lfoData = listTables.getLfoData( paragraph.getIlfo() );
            System.out.println( "PAP's LFOData: " + lfoData );

            if ( lfo != null )
            {
                final ListLevel listLevel = listTables.getLevel( lfo.getLsid(),
                        paragraph.getIlvl() );

                System.out.println( "PAP's ListLevel: " + listLevel );
                if ( listLevel.getGrpprlPapx() != null )
                {
                    System.out.println( "PAP's ListLevel PAPX:" );
                    dumpSprms(
                            new SprmIterator( listLevel.getGrpprlPapx(), 0 ),
                            "* " );
                }

                if ( listLevel.getGrpprlPapx() != null )
                {
                    System.out.println( "PAP's ListLevel CHPX:" );
                    dumpSprms(
                            new SprmIterator( listLevel.getGrpprlChpx(), 0 ),
                            "* " );
                }
            }
        }
    }
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

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.