From 595ae59517ecb51887f174b3cdf931baa4913dff Mon Sep 17 00:00:00 2001 From: Mike Conley Date: Wed, 6 May 2015 14:09:08 -0400 Subject: [PATCH] Bug 1091112 - Add OS X-specific members to PrintData IPDL struct. r=jimm --- .../printingui/ipc/PPrintingTypes.ipdlh | 15 +++++++++++++-- widget/nsPrintOptionsImpl.cpp | 11 +++++++++++ 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/embedding/components/printingui/ipc/PPrintingTypes.ipdlh b/embedding/components/printingui/ipc/PPrintingTypes.ipdlh index 1ac9c7f4cbf..f178906375d 100644 --- a/embedding/components/printingui/ipc/PPrintingTypes.ipdlh +++ b/embedding/components/printingui/ipc/PPrintingTypes.ipdlh @@ -92,9 +92,20 @@ struct PrintData { CStringKeyValue[] GTKPrintSettings; /** - * TODO: OS X specific things - specifically, an array of names for the - * document to be supplied by nsIWebBrowserPrint::enumerateDocumentNames + * OS X specific things. */ + nsString printJobName; + bool printAllPages; + bool mustCollate; + nsString disposition; + /** TODO: Is there an "unsigned short" primitive? **/ + short pagesAcross; + short pagesDown; + nsString printTime; + bool detailedErrorReporting; + nsString faxNumber; + bool addHeaderAndFooter; + bool fileNameExtensionHidden; }; } // namespace embedding diff --git a/widget/nsPrintOptionsImpl.cpp b/widget/nsPrintOptionsImpl.cpp index 371adf94b0d..334af5b965f 100644 --- a/widget/nsPrintOptionsImpl.cpp +++ b/widget/nsPrintOptionsImpl.cpp @@ -236,6 +236,17 @@ nsPrintOptions::SerializeToPrintData(nsIPrintSettings* aSettings, data->isIFrameSelected() = false; data->isRangeSelection() = false; // data->GTKPrintSettings() default-initializes + // data->printJobName() default-initializes + data->printAllPages() = true; + data->mustCollate() = false; + // data->disposition() default-initializes + data->pagesAcross() = 1; + data->pagesDown() = 1; + // data->printTime() default-initializes + data->detailedErrorReporting() = true; + // data->faxNumber() default-initializes + data->addHeaderAndFooter() = false; + data->fileNameExtensionHidden() = false; return NS_OK; }