nsresult rv; nsCOMPtr<nsIPrintOptions> printService = do_GetService(kPrintOptionsCID, &rv); if (NS_SUCCEEDED(rv) && printService) { return printService->SetIsCancelled(PR_TRUE);
if (mPrt && mPrt->mPrintSettings) { return mPrt->mPrintSettings->SetIsCancelled(PR_TRUE);
DocumentViewerImpl::Cancel(){  nsresult rv;  nsCOMPtr<nsIPrintOptions> printService = do_GetService(kPrintOptionsCID, &rv);  if (NS_SUCCEEDED(rv) && printService) {    return printService->SetIsCancelled(PR_TRUE);  }  return NS_OK;}