Bug 366347 - Default collate option sometimes off for printers that support it. r=bsmedberg
authorBrian R. Bondy <netzen@gmail.com>
Thu, 29 Sep 2011 09:21:32 -0400
changeset 77805 13ab1afb123a4282fd419e5f7f1dd74ee6b9f4b8
parent 77804 65e060c81a59c41912857e730059f2104c6f6068
child 77806 934fd93abd8678d0215ee8296995cb5b296288bf
push id2261
push userbbondy@mozilla.com
push dateThu, 29 Sep 2011 13:24:37 +0000
treeherdermozilla-inbound@13ab1afb123a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbsmedberg
bugs366347
milestone10.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 366347 - Default collate option sometimes off for printers that support it. r=bsmedberg
embedding/components/printingui/src/win/nsPrintDialogUtil.cpp
--- a/embedding/components/printingui/src/win/nsPrintDialogUtil.cpp
+++ b/embedding/components/printingui/src/win/nsPrintDialogUtil.cpp
@@ -904,17 +904,18 @@ ShowNativePrintDialog(HWND              
   PRINTDLGW  prntdlg;
   memset(&prntdlg, 0, sizeof(PRINTDLGW));
 
   prntdlg.lStructSize = sizeof(prntdlg);
   prntdlg.hwndOwner   = aHWnd;
   prntdlg.hDevMode    = hGlobalDevMode;
   prntdlg.hDevNames   = hDevNames;
   prntdlg.hDC         = NULL;
-  prntdlg.Flags       = PD_ALLPAGES | PD_RETURNIC | PD_USEDEVMODECOPIESANDCOLLATE;
+  prntdlg.Flags       = PD_ALLPAGES | PD_RETURNIC | 
+                        PD_USEDEVMODECOPIESANDCOLLATE | PD_COLLATE;
 
   // if there is a current selection then enable the "Selection" radio button
   PRInt16 howToEnableFrameUI = nsIPrintSettings::kFrameEnableNone;
   bool isOn;
   aPrintSettings->GetPrintOptions(nsIPrintSettings::kEnableSelectionRB, &isOn);
   if (!isOn) {
     prntdlg.Flags |= PD_NOSELECTION;
   }
@@ -1235,17 +1236,17 @@ ShowNativePrintDialogEx(HWND            
   // Prepare to Display the Print Dialog
   PRINTDLGEX  prntdlg;
   memset(&prntdlg, 0, sizeof(PRINTDLGEX));
 
   prntdlg.lStructSize = sizeof(prntdlg);
   prntdlg.hwndOwner   = aHWnd;
   prntdlg.hDevMode    = hGlobalDevMode;
   prntdlg.Flags       = PD_ALLPAGES | PD_RETURNDC | PD_USEDEVMODECOPIESANDCOLLATE |
-                        PD_NOCURRENTPAGE;
+                        PD_NOCURRENTPAGE | PD_COLLATE;
   prntdlg.nStartPage  = START_PAGE_GENERAL;
 
   // if there is a current selection then enable the "Selection" radio button
   PRInt16 howToEnableFrameUI = nsIPrintSettings::kFrameEnableNone;
   if (aPrintSettings != nsnull) {
     bool isOn;
     aPrintSettings->GetPrintOptions(nsIPrintSettings::kEnableSelectionRB, &isOn);
     if (!isOn) {