But 431587: Use zoom-ratio when computing number of needed pages during print-selection. r+sr=roc a=damons

This commit is contained in:
dholbert@cs.stanford.edu 2008-04-30 23:31:17 -07:00
parent 16b72adf35
commit 25c2be591e

View File

@ -2232,9 +2232,7 @@ nsPrintEngine::DoPrint(nsPrintObject * aPO)
nscoord pageWidth, pageHeight;
mPrt->mPrintDC->GetDeviceSurfaceDimensions(pageWidth, pageHeight);
pageHeight -= totalMargin.top + totalMargin.bottom;
// XXXdholbert does this num-pages calculation need to take
// aPO->mZoomRatio into consideration?
PRInt32 totalPages = NSToIntCeil(float(selectionHgt) / float(pageHeight));
PRInt32 totalPages = NSToIntCeil(float(selectionHgt) * aPO->mZoomRatio / float(pageHeight));
pageSequence->SetTotalNumPages(totalPages);
}
}