public String toString() { return "CHPX from " + getStart() + " to " + getEnd() + " (in bytes " + getStartBytes() + " to " + getEndBytes() + ")"; } }
public void adjustForInsert(int listIndex, int length) { int size = _textRuns.size(); CHPX chpx = _textRuns.get(listIndex); chpx.setEnd(chpx.getEnd() + length); for (int x = listIndex + 1; x < size; x++) { chpx = _textRuns.get(x); chpx.setStart(chpx.getStart() + length); chpx.setEnd(chpx.getEnd() + length); } }
public void adjustForInsert(int listIndex, int length) { int size = _textRuns.size(); CHPX chpx = _textRuns.get(listIndex); chpx.setEnd(chpx.getEnd() + length); for (int x = listIndex + 1; x < size; x++) { chpx = _textRuns.get(x); chpx.setStart(chpx.getStart() + length); chpx.setEnd(chpx.getEnd() + length); } }
public String toString() { return "CHPX from " + getStart() + " to " + getEnd() + " (in bytes " + getStartBytes() + " to " + getEndBytes() + ")"; } }
/** * * @param chpx The chpx this object is based on. * @param ss The stylesheet for the document this run belongs to. * @param istd The style index if this run's base style. * @param parent The parent range of this character run (usually a paragraph). */ CharacterRun(CHPX chpx, StyleSheet ss, short istd, Range parent) { super(Math.max(parent._start, chpx.getStart()), Math.min(parent._end, chpx.getEnd()), parent); _props = chpx.getCharacterProperties(ss, istd); _chpx = chpx.getSprmBuf(); _istd = istd; }
/** * * @param chpx The chpx this object is based on. * @param ss The stylesheet for the document this run belongs to. * @param istd The style index if this run's base style. * @param parent The parent range of this character run (usually a paragraph). */ CharacterRun(CHPX chpx, StyleSheet ss, short istd, Range parent) { super(Math.max(parent._start, chpx.getStart()), Math.min(parent._end, chpx.getEnd()), parent); _props = chpx.getCharacterProperties(ss, istd); _chpx = chpx.getSprmBuf(); }
int right = Math.min( this._end, chpx.getEnd() );
Math.min( chpx.getEnd(), _end ) );
Math.min( chpx.getEnd(), _end ) );
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 ); } }
clone.setEnd(chpx.getEnd());
int right = Math.min( this._end, chpx.getEnd() ); DocumentFormatException.check(left < right, "left must be < right");
clone.setEnd(chpx.getEnd());
for ( CHPX chpx : _chpxList.subList(0, index)) { int chpxStart = translator.getByteIndex( chpx.getStart() ); chpxEnd = translator.getByteIndex( chpx.getEnd() ); LittleEndian.putInt( buf, fcOffset, chpxStart );
String text = new Range( chpx.getStart(), chpx.getEnd(), _doc.getOverallRange() )
_textRuns.size() - 1 ).getEnd() );
int runEnd = chpx.getEnd() + fcMin;
_textRuns.size() - 1 ).getEnd() );