これでうまくいくと思います...前回の投稿でコメントしたように、これにより < run > 要素の textsize が同じになったときの自動マージが処理されます。
private void sizeTextSel(int iVal)
{
TextSelection ts = _richTextBox.Selection;
TextPointer tpStart = ts.Start;
TextPointer tpEnd = ts.End;
TextPointer tpRun = tpStart;
int iSelLength = ts.Text.Length;
int iStartRunLength;
object fontSizeSelection;
int iTotalSelected = 0, iSelect = 0,iNew=0;
do
{
iStartRunLength = tpRun.GetTextRunLength(LogicalDirection.Forward);
iSelect = iStartRunLength < iSelLength - iTotalSelected ? iStartRunLength : iSelLength - iTotalSelected;
if (iStartRunLength > 0)
{
iSelect = iSelect == 0 ? 1 : iSelect;
ts.Select(tpRun, tpRun.GetPositionAtOffset(iSelect, LogicalDirection.Forward));
fontSizeSelection = ts.GetPropertyValue(TextElement.FontSizeProperty);
if (fontSizeSelection != null)
ts.ApplyPropertyValue(TextElement.FontSizeProperty, (double)fontSizeSelection + iVal);
iNew = tpRun.GetTextRunLength(LogicalDirection.Forward);
if (iNew==0)
tpRun = tpRun.GetPositionAtOffset(iSelect + 1, LogicalDirection.Forward);
else
tpRun = tpRun.GetPositionAtOffset(iSelect, LogicalDirection.Forward);
}
else
{
if (tpRun.Parent.GetType() == typeof(FlowDocument))
iSelect = 2;
else
iSelect = 0;
tpRun = tpRun.GetPositionAtOffset(1, LogicalDirection.Forward);
}
iTotalSelected += iSelect;
} while (tpRun != null && iTotalSelected < iSelLength);
ts.Select(tpStart, tpEnd);
}