DocumentViewerImpl::IsThereASelection()
DocumentViewerImpl::IsThereASelection(nsIDOMWindowInternal * aDOMWin)
DocumentViewerImpl::IsThereASelection(){  // check here to see if there is a range selection  // so we know whether to turn on the "Selection" radio button  nsCOMPtr<nsISelection> selection;  GetDocumentSelection(getter_AddRefs(selection));  if (selection) {    PRInt32 count;    selection->GetRangeCount(&count);    if (count == 1) {      nsCOMPtr<nsIDOMRange> range;      if (NS_SUCCEEDED(selection->GetRangeAt(0, getter_AddRefs(range)))) {        // check to make sure it isn't an insertion selection        PRBool isCollapsed;        selection->GetIsCollapsed(&isCollapsed);        return !isCollapsed;      }    }  }  return PR_FALSE;}