SIL.FieldWorks.IText.InterlinDocForAnalysis.MoveVerticallyToNextAnalysis C# (CSharp) Method

MoveVerticallyToNextAnalysis() private method

Moves from the current segment to the next that has a real word line or a real translation or note depending on the direction. If none, try the appropriate segment in the next paragraph. Continue until a suitable analysis or translation or note is found or there are no more to check.
private MoveVerticallyToNextAnalysis ( int paragraphInd, int segmentInd, bool moveUpward ) : SIL.FieldWorks.FDO.DomainServices.AnalysisOccurrence
paragraphInd int The index of the current paragraph in the text.
segmentInd int The index of the current section in the paragraph.
moveUpward bool true if moving up and left, false otherwise
return SIL.FieldWorks.FDO.DomainServices.AnalysisOccurrence
		private AnalysisOccurrence MoveVerticallyToNextAnalysis(int paragraphInd, int segmentInd, bool moveUpward)
		{
			var para = (IStTxtPara)RootStText.ParagraphsOS[paragraphInd];
			Debug.Assert(para != null, "Tried to move to a null paragraph ind=" + paragraphInd);
			ISegment seg = para.SegmentsOS[segmentInd];
			Debug.Assert(seg != null, "Tried to move to a null segment ind=" + segmentInd + " in para " + paragraphInd);
			// get the "next" segment with a real analysis or real translation or note
			AnalysisOccurrence realAnalysis;
			GetNextSegment(para, seg, moveUpward, out realAnalysis);
			return realAnalysis;
		}
InterlinDocForAnalysis