internal IEnumerable<EditableRun> TextRunForward(EditableRun startRun, EditableRun stopRun)
{
EditableTextLine currentLine = startRun.OwnerEditableLine;
EditableTextLine stopLine = stopRun.OwnerEditableLine;
if (currentLine == stopLine)
{
foreach (EditableRun r in currentLine.GetVisualElementForward(startRun, stopRun))
{
yield return r;
}
}
else
{
foreach (EditableRun r in currentLine.GetVisualElementForward(startRun))
{
yield return r;
}
currentLine = currentLine.Next;
while (currentLine != null)
{
if (currentLine == stopLine)
{
foreach (EditableRun r in currentLine)
{
if (r == stopRun)
{
break;
}
else
{
yield return r;
}
}
break;
}
else
{
foreach (EditableRun r in currentLine)
{
yield return r;
}
currentLine = currentLine.Next;
}
}
}
}
internal void Reload(IEnumerable<EditableRun> runs)