//---------------------------------------------------------------------------
// Wrapper for TextPattern.RangeFromPoint Method
//---------------------------------------------------------------------------
internal void Pattern_RangeFromPoint(TextPattern textPattern, ref TextPatternRange returnedRange, Point screenLocation, Type expectedException, CheckType checkType)
{
string call = "TextPattern.RangeFromPoint(" + screenLocation + ")";
Comment("---Calling " + call);
try
{
returnedRange = textPattern.RangeFromPoint(screenLocation);
}
catch (Exception actualException)
{
if (Library.IsCriticalException(actualException))
throw;
TestException(expectedException, actualException, call, checkType);
return;
}
if (returnedRange == null)
throw new ArgumentNullException(call + " should not give a null TextPatternRange");
TestNoExceptionQuiet(expectedException, call, checkType);
}