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

GetTagAndObjForOnePropSelection() private method

Answer true if the indicated selection is within a single note we can delete. Also obtain the object and property.
private GetTagAndObjForOnePropSelection ( IVwSelection sel, int &hvoObj, int &tagAnchor ) : bool
sel IVwSelection
hvoObj int
tagAnchor int
return bool
		private bool GetTagAndObjForOnePropSelection(IVwSelection sel, out int hvoObj, out int tagAnchor)
		{
			hvoObj = tagAnchor = 0;
			if (sel == null)
				return false;
			ITsString tss;
			int ichEnd, hvoEnd, tagEnd, wsEnd;
			bool fAssocPrev;
			sel.TextSelInfo(true, out tss, out ichEnd, out fAssocPrev, out hvoEnd, out tagEnd, out wsEnd);
			int ichAnchor, hvoAnchor, wsAnchor;
			sel.TextSelInfo(false, out tss, out ichAnchor, out fAssocPrev, out hvoAnchor, out tagAnchor, out wsAnchor);
			if (hvoEnd != hvoAnchor || tagEnd != tagAnchor || wsEnd != wsAnchor)
				return false; // must be a one-property selection
			hvoObj = hvoAnchor;
			return true;
		}
InterlinDocForAnalysis