diff options
author | kmadhusu@chromium.org <kmadhusu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-04 23:36:29 +0000 |
---|---|---|
committer | kmadhusu@chromium.org <kmadhusu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-04 23:36:29 +0000 |
commit | f3256b0d8029d6395be08d2f566220162219b6ea (patch) | |
tree | 8cac804aa7bf76c82702ebe29c8baad5263bcf3e /printing/printing_context_win.cc | |
parent | 5270ee85676f2d2314084b713d9b4f1070f95df8 (diff) | |
download | chromium_src-f3256b0d8029d6395be08d2f566220162219b6ea.zip chromium_src-f3256b0d8029d6395be08d2f566220162219b6ea.tar.gz chromium_src-f3256b0d8029d6395be08d2f566220162219b6ea.tar.bz2 |
PrintPreview: Fixed RICOH MP C3501 color print job issues.
BUG=92358
TEST=Please refer to bug description.
Review URL: http://codereview.chromium.org/7826040
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99615 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'printing/printing_context_win.cc')
-rw-r--r-- | printing/printing_context_win.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/printing/printing_context_win.cc b/printing/printing_context_win.cc index ef45060..c2ace8e 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; |