private void GetCurrentTextObjects(int clev, SelLevInfo[] rgvsli, int tag, out int curParaIndex, out int curSegIndex, out int curNoteIndex, out ISegment curSeg, out INote curNote)
{
curParaIndex = rgvsli[clev - 2].ihvo;
var curPara = (IStTxtPara)RootStText.ParagraphsOS[curParaIndex];
Debug.Assert(curPara != null, "Moving from a non-exisiting paragraph in interlinear Doc.");
curSegIndex = rgvsli[clev - 3].ihvo;
curSeg = curPara.SegmentsOS[curSegIndex];
Debug.Assert(curSeg != null, "Moving from a non-exisiting segment in interlinear Doc.");
curNote = null;
curNoteIndex = -1;
if (tag == NoteTags.kflidContent)
{
//if clev == 5 then we have both a Free Translation and some number of Notes
//otherwise I assume we have only a Free Translation if clev == 4
if (clev == 5)
{
curNoteIndex = rgvsli[0].ihvo; //if there are multiple Notes the index could be more than 0
curNote = curSeg.NotesOS[curNoteIndex];
}
}
}