// * reset the length, to the new string's length
// * add on +1 if the last block
// The last run needs its stylings to be 1 longer than the raw
// text is. This is to define the stylings that any new text
// that is added will inherit
TextPropCollection pCol = run._getRawParagraphStyle();
TextPropCollection cCol = run._getRawCharacterStyle();
int newSize = s.length();
if(runID == _rtRuns.length-1) {
newSize++;
}
if(run._isParagraphStyleShared()) {
pCol.updateTextSize( pCol.getCharactersCovered() - run.getLength() + s.length() );
} else {
pCol.updateTextSize(newSize);
}
if(run._isCharacterStyleShared()) {
cCol.updateTextSize( cCol.getCharactersCovered() - run.getLength() + s.length() );
} else {
cCol.updateTextSize(newSize);
}
// Build up the new text
// As we go through, update the start position for all subsequent runs
// The building relies on the old text still being present