if (!toFile) { nsXPIDLString toFileName; aPS->GetToFileName(getter_Copies(toFileName)); if (toFileName) { if (*toFileName) { if (toFileName.Equals(NS_LITERAL_STRING("FILE:"))) {   return NS_OK; } } } }
CheckForPrintToFile(nsIPrintSettings* aPS, LPTSTR aPrinterName, PRUnichar* aUPrinterName){  nsresult rv = NS_OK;  if (!aPrinterName && !aUPrinterName) return rv;  PRBool toFile;#ifdef UNICODE  CheckForPrintToFileWithName(aPrinterName?aPrinterName:aUPrinterName, toFile);#else  if (aPrinterName) {    CheckForPrintToFileWithName(aPrinterName, toFile);  } else {    CheckForPrintToFileWithName((char*)NS_ConvertUCS2toUTF8(aUPrinterName).get(), toFile);  }#endif  aPS->SetPrintToFile(toFile);  if (toFile) {    rv = GetFileNameForPrintSettings(aPS);  }  return rv;}