GetDisplayTitleAndURL(aPO, mPrt->mPrintSettings, &docTitleStr, &docURLStr, eDocTitleDefDocument);
GetDisplayTitleAndURL(aPO, mPrt->mPrintSettings, mPrt->mBrandName, &docTitleStr, &docURLStr, eDocTitleDefDocument);
DocumentViewerImpl::SetDocAndURLIntoProgress(PrintObject* aPO, nsIPrintProgressParams* aParams){  NS_ASSERTION(aPO, "Must have vaild PrintObject");  NS_ASSERTION(aParams, "Must have vaild nsIPrintProgressParams");  if (!aPO || !aPO->mWebShell || !aParams) {    return;  }  const PRInt32 kTitleLength = 64;  PRUnichar * docTitleStr;  PRUnichar * docURLStr;  GetDisplayTitleAndURL(aPO, mPrt->mPrintSettings, &docTitleStr, &docURLStr, eDocTitleDefDocument);  // Make sure the URLS don't get too long for the progress dialog  if (docURLStr && nsCRT::strlen(docURLStr) > kTitleLength) {    PRUnichar * ptr = &docURLStr[nsCRT::strlen(docURLStr)-kTitleLength+3];    nsAutoString newURLStr;    newURLStr.AppendWithConversion("...");    newURLStr += ptr;    nsMemory::Free(docURLStr);    docURLStr = ToNewUnicode(newURLStr);  }  mPrt->mPrintProgressParams->SetDocTitle((const PRUnichar*) docTitleStr);  mPrt->mPrintProgressParams->SetDocURL((const PRUnichar*) docURLStr);  if (docTitleStr != nsnull) nsMemory::Free(docTitleStr);  if (docURLStr != nsnull) nsMemory::Free(docURLStr);}