Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(53)

Unified Diff: printing/printing_context_win.cc

Issue 7826040: PrintPreview: Fixed RICOH MP C3501 color print job issues. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed nits Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « printing/printing_context_mac.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: printing/printing_context_win.cc
diff --git a/printing/printing_context_win.cc b/printing/printing_context_win.cc
index ef45060ae402db2c39f7549c62cc026efd35b637..c2ace8eb0e254b76940d8487cd894803bfb18cbf 100644
--- a/printing/printing_context_win.cc
+++ b/printing/printing_context_win.cc
@@ -308,7 +308,7 @@ PrintingContext::Result PrintingContextWin::UpdatePrinterSettings(
DCHECK(!in_print_job_);
bool collate;
- bool color;
+ int color;
bool landscape;
bool print_to_pdf;
int copies;
@@ -317,7 +317,7 @@ PrintingContext::Result PrintingContextWin::UpdatePrinterSettings(
if (!job_settings.GetBoolean(kSettingLandscape, &landscape) ||
!job_settings.GetBoolean(kSettingCollate, &collate) ||
- !job_settings.GetBoolean(kSettingColor, &color) ||
+ !job_settings.GetInteger(kSettingColor, &color) ||
!job_settings.GetBoolean(kSettingPrintToPDF, &print_to_pdf) ||
!job_settings.GetInteger(kSettingDuplexMode, &duplex_mode) ||
!job_settings.GetInteger(kSettingCopies, &copies) ||
@@ -365,7 +365,11 @@ PrintingContext::Result PrintingContextWin::UpdatePrinterSettings(
return OnError();
}
- dev_mode->dmColor = color ? DMCOLOR_COLOR : DMCOLOR_MONOCHROME;
+ if (color == printing::GRAY)
+ dev_mode->dmColor = DMCOLOR_MONOCHROME;
+ else
+ dev_mode->dmColor = DMCOLOR_COLOR;
+
dev_mode->dmCopies = std::max(copies, 1);
if (dev_mode->dmCopies > 1) // do not change collate unless multiple copies
dev_mode->dmCollate = collate ? DMCOLLATE_TRUE : DMCOLLATE_FALSE;
« no previous file with comments | « printing/printing_context_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698