{
System.out.println( "** " + papx );
papxs.add( papx );
if ( papx != null && withSprms )
{
SprmIterator sprmIt = new SprmIterator(
papx.getGrpprl(), 2 );
dumpSprms( sprmIt, "*** " );
}
}
}
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 );
dumpSprms( sprmIt, "*** " );
}
}
}
Method newParagraph = Paragraph.class.getDeclaredMethod(
"newParagraph", Range.class, PAPX.class );
newParagraph.setAccessible( true );
java.lang.reflect.Field _props = Paragraph.class
.getDeclaredField( "_props" );
_props.setAccessible( true );
for ( PAPX papx : _doc.getParagraphTable().getParagraphs() )
{
System.out.println( papx );
if ( withProperties )
{
Paragraph paragraph = (Paragraph) newParagraph.invoke( null,
_doc.getOverallRange(), papx );
System.out.println( _props.get( paragraph ) );
}
if ( true )
{
SprmIterator sprmIt = new SprmIterator( papx.getGrpprl(), 2 );
dumpSprms( sprmIt, "\t" );
}
}
}