public CharacterProperties getCharacterProperties(StyleSheet ss, short istd) { if (ss == null) { // TODO Fix up for Word 6/95 return new CharacterProperties(); } CharacterProperties baseStyle = ss.getCharacterStyle(istd); return CharacterSprmUncompressor.uncompressCHP( ss, baseStyle, getGrpprl(), 0); }
public CharacterProperties getCharacterProperties( StyleSheet ss, short istd ) { if ( ss == null ) { // TODO Fix up for Word 6/95 return new CharacterProperties(); } CharacterProperties baseStyle = ss.getCharacterStyle( istd ); if (baseStyle == null) baseStyle = new CharacterProperties(); CharacterProperties props = CharacterSprmUncompressor.uncompressCHP( baseStyle, getGrpprl(), 0 ); return props; }
public void dumpChpx( boolean withProperties, boolean withSprms ) { for ( CHPX chpx : _doc.getCharacterTable().getTextRuns() ) { System.out.println( chpx ); if ( withProperties ) { System.out.println( chpx.getCharacterProperties( _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); } } String text = new Range( chpx.getStart(), chpx.getEnd(), _doc.getOverallRange() ) { public String toString() { return "CHPX range (" + super.toString() + ")"; } }.text(); StringBuilder stringBuilder = new StringBuilder(); for ( char c : text.toCharArray() ) { if ( c < 30 ) stringBuilder.append("\\0x").append(Integer.toHexString(c)); else stringBuilder.append( c ); } System.out.println( stringBuilder ); } }
SprmIterator sprmIt = new SprmIterator( chpx.getGrpprl(), 0 ); while ( sprmIt.hasNext() )
int runEnd = chpx.getEnd() + fcMin; if (!isDeleted(chpx.getGrpprl()))
boolean deleted = isDeleted(chpx.getGrpprl()); if (deleted)