From fec572c2546b057a0715b85f23dea3dc0482594b Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Tue, 1 Feb 2011 11:16:46 +0100 Subject: [PATCH] Bug 629309 - Fix unmatched enum warning in nsDeviceContextSpecGTK::GetSurfaceForPrinter; r=roc a=joe --- widget/src/gtk2/nsDeviceContextSpecG.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/widget/src/gtk2/nsDeviceContextSpecG.cpp b/widget/src/gtk2/nsDeviceContextSpecG.cpp index a77f4c6f9e9..69a398ac043 100644 --- a/widget/src/gtk2/nsDeviceContextSpecG.cpp +++ b/widget/src/gtk2/nsDeviceContextSpecG.cpp @@ -476,12 +476,13 @@ NS_IMETHODIMP nsDeviceContextSpecGTK::GetSurfaceForPrinter(gfxASurface **aSurfac const gchar* fmtGTK = gtk_print_settings_get(mGtkPrintSettings, GTK_PRINT_SETTINGS_OUTPUT_FILE_FORMAT); if (!fmtGTK && GTK_IS_PRINTER(mGtkPrinter)) { // Likely not print-to-file, check printer's capabilities - format = (gtk_printer_accepts_ps(mGtkPrinter)) ? nsIPrintSettings::kOutputFormatPS - : nsIPrintSettings::kOutputFormatPDF; + format = (gtk_printer_accepts_ps(mGtkPrinter)) + ? static_cast(nsIPrintSettings::kOutputFormatPS) + : static_cast(nsIPrintSettings::kOutputFormatPDF); } else if (nsDependentCString(fmtGTK).EqualsIgnoreCase("pdf")) { - format = nsIPrintSettings::kOutputFormatPDF; + format = nsIPrintSettings::kOutputFormatPDF; } else { - format = nsIPrintSettings::kOutputFormatPS; + format = nsIPrintSettings::kOutputFormatPS; } } }