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 77830 d1fefdd17225691f9233dde790d29218ef5a27ae
parent 77829 27207582b5df8ff962ac1cbe099f5c9c58fb6566
child 77831 47f550b4ef47614aa2be359e3dc862fb505f0ce3
push id3
push userfelipc@gmail.com
push dateFri, 30 Sep 2011 20:09:13 +0000
reviewersbsmedberg
bugs366347
milestone10.0a1
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) {