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;
}