Check for failure after printing the next page. If it fails then pass back PR_TRUE

to indicate we are done printing this document.
Bug 101597 r=kmcclusk sr=attinasi a=pdt


git-svn-id: svn://10.0.0.236/trunk@104557 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
rods%netscape.com
2001-10-03 23:28:38 +00:00
parent 9a439492d6
commit e25ba4e68d
2 changed files with 12 additions and 2 deletions

View File

@@ -2263,7 +2263,12 @@ DocumentViewerImpl::PrintPage(nsIPresContext* aPresContext,
}
// Print the Page
mPageSeqFrame->PrintNextPage(aPresContext, aPrintOptions);
// if a print job was cancelled externally, an EndPage or BeginPage may
// fail and the failure is passed back here.
// Returning PR_TRUE means we are done printing.
if (NS_FAILED(mPageSeqFrame->PrintNextPage(aPresContext, aPrintOptions))) {
return PR_TRUE;
}
// Now see if any of the SubDocs are on this page
if (aPO->mPrintAsIs) {

View File

@@ -2263,7 +2263,12 @@ DocumentViewerImpl::PrintPage(nsIPresContext* aPresContext,
}
// Print the Page
mPageSeqFrame->PrintNextPage(aPresContext, aPrintOptions);
// if a print job was cancelled externally, an EndPage or BeginPage may
// fail and the failure is passed back here.
// Returning PR_TRUE means we are done printing.
if (NS_FAILED(mPageSeqFrame->PrintNextPage(aPresContext, aPrintOptions))) {
return PR_TRUE;
}
// Now see if any of the SubDocs are on this page
if (aPO->mPrintAsIs) {