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

Unified Diff: chrome/browser/printing/win_printing_context.cc

Issue 125082: Add Print Selection support to Chrome. This change is fairly involved since ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 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 | « chrome/browser/printing/printed_document.cc ('k') | chrome/browser/renderer_host/render_view_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/printing/win_printing_context.cc
===================================================================
--- chrome/browser/printing/win_printing_context.cc (revision 18804)
+++ chrome/browser/printing/win_printing_context.cc (working copy)
@@ -403,15 +403,17 @@
DCHECK(!in_print_job_);
DCHECK(hdc_);
- // Convert the PRINTPAGERANGE array to a PrintSettings::PageRanges vector.
PageRanges ranges_vector;
- ranges_vector.reserve(number_ranges);
- for (int i = 0; i < number_ranges; ++i) {
- PageRange range;
- // Transfert from 1-based to 0-based.
- range.from = ranges[i].nFromPage - 1;
- range.to = ranges[i].nToPage - 1;
- ranges_vector.push_back(range);
+ if (!selection_only) {
+ // Convert the PRINTPAGERANGE array to a PrintSettings::PageRanges vector.
+ ranges_vector.reserve(number_ranges);
+ for (int i = 0; i < number_ranges; ++i) {
+ PageRange range;
+ // Transfer from 1-based to 0-based.
+ range.from = ranges[i].nFromPage - 1;
+ range.to = ranges[i].nToPage - 1;
+ ranges_vector.push_back(range);
+ }
}
settings_.Init(hdc_,
dev_mode,
« no previous file with comments | « chrome/browser/printing/printed_document.cc ('k') | chrome/browser/renderer_host/render_view_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698