mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
[OS/2] Bug 522216 - create PDF output only if we are not doing print preview, r=mkaply
This commit is contained in:
parent
888d99b57c
commit
f371675d8e
@ -346,11 +346,13 @@ NS_IMETHODIMP nsDeviceContextSpecOS2::GetSurfaceForPrinter(gfxASurface **surface
|
||||
|
||||
PRInt16 outputFormat;
|
||||
mPrintSettings->GetOutputFormat(&outputFormat);
|
||||
// for now always set the output format to PDF, see bug 415522:
|
||||
printf("print output format is %d but we are setting it to %d (PDF)\n",
|
||||
outputFormat, nsIPrintSettings::kOutputFormatPDF);
|
||||
outputFormat = nsIPrintSettings::kOutputFormatPDF;
|
||||
mPrintSettings->SetOutputFormat(outputFormat); // save PDF format in settings
|
||||
int printerDest;
|
||||
GetDestination(printerDest);
|
||||
if (printerDest != printPreview) {
|
||||
// for now always set the output format to PDF, see bug 415522
|
||||
outputFormat = nsIPrintSettings::kOutputFormatPDF;
|
||||
mPrintSettings->SetOutputFormat(outputFormat); // save PDF format in settings
|
||||
}
|
||||
|
||||
if (outputFormat == nsIPrintSettings::kOutputFormatPDF) {
|
||||
nsXPIDLString filename;
|
||||
@ -402,12 +404,9 @@ NS_IMETHODIMP nsDeviceContextSpecOS2::GetSurfaceForPrinter(gfxASurface **surface
|
||||
newSurface = new(std::nothrow) gfxPDFSurface(stream, gfxSize(width, height));
|
||||
} else {
|
||||
int numCopies = 0;
|
||||
int printerDest = 0;
|
||||
char *filename = nsnull;
|
||||
|
||||
GetCopies(numCopies);
|
||||
GetDestination(printerDest);
|
||||
if (!printerDest) {
|
||||
char *filename = nsnull;
|
||||
if (printerDest == printToFile) {
|
||||
GetPath(&filename);
|
||||
}
|
||||
mPrintingStarted = PR_TRUE;
|
||||
|
Loading…
Reference in New Issue
Block a user