mPrintSettingsObj = aPrintSettings;
aPrintSettings->GetStartPageRange(&mStartPageNum); aPrintSettings->GetEndPageRange(&mEndPageNum);  double  dblVal; aPrintSettings->GetMarginTop(&dblVal); SetMarginTop(dblVal);  aPrintSettings->GetMarginLeft(&dblVal); SetMarginLeft(dblVal);  aPrintSettings->GetMarginBottom(&dblVal); SetMarginBottom(dblVal);  aPrintSettings->GetMarginRight(&dblVal); SetMarginRight(dblVal);  aPrintSettings->GetScaling(&mScaling); aPrintSettings->GetPrintBGColors(&mPrintBGColors); aPrintSettings->GetPrintBGImages(&mPrintBGImages);  aPrintSettings->GetPrintRange(&mPrintRange);  PRUnichar* uniChar; aPrintSettings->GetTitle(&uniChar); SetTitle(uniChar); if (uniChar != nsnull) nsMemory::Free(uniChar);  aPrintSettings->GetDocURL(&uniChar); SetDocURL(uniChar); if (uniChar != nsnull) nsMemory::Free(uniChar);  aPrintSettings->GetHeaderStrLeft(&uniChar); SetHeaderStrLeft(uniChar); if (uniChar != nsnull) nsMemory::Free(uniChar);  aPrintSettings->GetHeaderStrCenter(&uniChar); SetHeaderStrCenter(uniChar); if (uniChar != nsnull) nsMemory::Free(uniChar);  aPrintSettings->GetHeaderStrRight(&uniChar); SetHeaderStrRight(uniChar); if (uniChar != nsnull) nsMemory::Free(uniChar);  aPrintSettings->GetFooterStrLeft(&uniChar); SetFooterStrLeft(uniChar); if (uniChar != nsnull) nsMemory::Free(uniChar);  aPrintSettings->GetFooterStrCenter(&uniChar); SetFooterStrCenter(uniChar);  aPrintSettings->GetFooterStrRight(&uniChar); SetFooterStrRight(uniChar); if (uniChar != nsnull) nsMemory::Free(uniChar);  aPrintSettings->GetPrintFrameType(&mPrintFrameType); aPrintSettings->GetPrintSilent(&mPrintSilent); aPrintSettings->GetPrintReversed(&mPrintReversed); aPrintSettings->GetPrintInColor(&mPrintInColor); aPrintSettings->GetPaperSize(&mPaperSize); aPrintSettings->GetOrientation(&mOrientation);  aPrintSettings->GetPrintCommand(&uniChar); SetPrintCommand(uniChar); if (uniChar != nsnull) nsMemory::Free(uniChar);  aPrintSettings->GetPrintToFile(&mPrintToFile);  aPrintSettings->GetToFileName(&uniChar); SetToFileName(uniChar); if (uniChar != nsnull) nsMemory::Free(uniChar);  aPrintSettings->GetPrintPageDelay(&mPrintPageDelay); SetPrintPageDelay(mPrintPageDelay);
NS_IMETHODIMP nsPrintOptions::SetPrintSettings(nsIPrintSettings * aPrintSettings){  NS_ENSURE_ARG_POINTER(aPrintSettings);  mPrintSettingsObj = aPrintSettings;  return NS_OK;}