if (mPrt) { *aCurrentPrintSettings = mPrt->mPrintSettings;
*aCurrentPrintSettings = nsnull; NS_ENSURE_TRUE(mPrintEngine, NS_ERROR_FAILURE);
DocumentViewerImpl::GetCurrentPrintSettings(nsIPrintSettings * *aCurrentPrintSettings){  NS_ENSURE_ARG_POINTER(aCurrentPrintSettings);  if (mPrt) {    *aCurrentPrintSettings = mPrt->mPrintSettings;  } else if (mPrtPreview) {    *aCurrentPrintSettings = mPrtPreview->mPrintSettings;  } else {    *aCurrentPrintSettings = nsnull;  }  NS_IF_ADDREF(*aCurrentPrintSettings);  return NS_OK;}