Package org.apache.poi.hwpf.sprm

Examples of org.apache.poi.hwpf.sprm.SprmIterator


            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 grpprl The list of sprms for a particular run of text.
   * @return true if this run of text has been deleted.
   */
  private boolean isDeleted(byte[] grpprl)
  {
    SprmIterator iterator = new SprmIterator(grpprl,0);
    while (iterator.hasNext())
    {
      SprmOperation op = iterator.next();
      // 0 is the operation that signals a FDelRMark operation
      if (op.getOperation() == 0 && op.getOperand() != 0)
      {
        return true;
      }
View Full Code Here

   * @param grpprl The list of sprms for a particular run of text.
   * @return true if this run of text has been deleted.
   */
  private boolean isDeleted(byte[] grpprl)
  {
    SprmIterator iterator = new SprmIterator(grpprl,0);
    while (iterator.hasNext())
    {
      SprmOperation op = iterator.next();
      // 0 is the operation that signals a FDelRMark operation
      if (op.getOperation() == 0 && op.getOperand() != 0)
      {
        return true;
      }
View Full Code Here

                        _doc.getStyleSheet(), (short) StyleSheet.NIL_STYLE ) );
            }

            if ( withSprms )
            {
                SprmIterator sprmIt = new SprmIterator( chpx.getGrpprl(), 0 );
                while ( sprmIt.hasNext() )
                {
                    SprmOperation sprm = sprmIt.next();
                    System.out.println( "\t" + sprm.toString() );
                }
            }

            if ( true )
View Full Code Here

                {
                    System.out.println( "** " + papx );
                    papxs.add( papx );
                    if ( papx != null && withSprms )
                    {
                        SprmIterator sprmIt = new SprmIterator(
                                papx.getGrpprl(), 2 );
                        while ( sprmIt.hasNext() )
                        {
                            SprmOperation sprm = sprmIt.next();
                            System.out.println( "*** " + sprm.toString() );
                        }
                    }

                }
            }

            Collections.sort( papxs );
            System.out.println( "* Sorted by END" );
            for ( PAPX papx : papxs )
            {
                System.out.println( "** " + papx );
                if ( papx != null && withSprms )
                {
                    SprmIterator sprmIt = new SprmIterator( papx.getGrpprl(), 2 );
                    while ( sprmIt.hasNext() )
                    {
                        SprmOperation sprm = sprmIt.next();
                        System.out.println( "*** " + sprm.toString() );
                    }
                }
            }
        }

        for ( PAPX papx : _doc.getParagraphTable().getParagraphs() )
        {
            System.out.println( papx );

            if ( withProperties )
                System.out.println( papx.getParagraphProperties( _doc
                        .getStyleSheet() ) );

            if ( true )
            {
                SprmIterator sprmIt = new SprmIterator( papx.getGrpprl(), 2 );
                while ( sprmIt.hasNext() )
                {
                    SprmOperation sprm = sprmIt.next();
                    System.out.println( "\t" + sprm.toString() );
                }
            }
        }
    }
View Full Code Here

                                    .getEnd() )
                    {
                        hasAssotiatedPapx = true;
                        System.out.println( "* " + papx );

                        SprmIterator sprmIt = new SprmIterator(
                                papx.getGrpprl(), 2 );
                        while ( sprmIt.hasNext() )
                        {
                            SprmOperation sprm = sprmIt.next();
                            System.out.println( "** " + sprm.toString() );
                        }
                    }
                }
                if ( !hasAssotiatedPapx )
View Full Code Here

TOP

Related Classes of org.apache.poi.hwpf.sprm.SprmIterator

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.