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
This commit is contained in:
rods%netscape.com 2001-10-03 23:28:38 +00:00
Родитель 9c55bf195e
Коммит afa17af158
2 изменённых файлов: 12 добавлений и 2 удалений

Просмотреть файл

@ -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) {

Просмотреть файл

@ -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) {