if (!aSelection) return NS_ERROR_NULL_POINTER;
nsresult DocumentViewerImpl::GetDocumentSelection(nsISelection **aSelection){  if (!aSelection) return NS_ERROR_NULL_POINTER;  if (!mPresShell) return NS_ERROR_NOT_INITIALIZED;  nsCOMPtr<nsISelectionController> selcon;  selcon = do_QueryInterface(mPresShell);  if (selcon)     return selcon->GetSelection(nsISelectionController::SELECTION_NORMAL, aSelection);    return NS_ERROR_FAILURE;}