author | Karl Tomlinson <karlt+@karlt.net> |
Wed, 10 Jun 2015 18:10:28 +1200 | |
changeset 249302 | f3661245688b97e71a235d0a9947369361436726 |
parent 249301 | 8204642eadbc37b37c8dfc12573d4aae38035b93 |
child 249303 | d799f63ed244f82b93b51b3343b6beef73b6dd3c |
push id | 28923 |
push user | ryanvm@gmail.com |
push date | Wed, 17 Jun 2015 18:57:11 +0000 |
treeherder | mozilla-central@099d6cd6725e [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | roc |
bugs | 147419 |
milestone | 41.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
|
--- a/embedding/components/printingui/ipc/PPrintingTypes.ipdlh +++ b/embedding/components/printingui/ipc/PPrintingTypes.ipdlh @@ -55,17 +55,16 @@ struct PrintData { short paperSizeUnit; nsString plexName; nsString colorspace; nsString resolutionName; bool downloadFonts; bool printReversed; bool printInColor; int32_t orientation; - nsString printCommand; int32_t numCopies; nsString printerName; bool printToFile; nsString toFileName; short outputFormat; int32_t printPageDelay; int32_t resolution; int32_t duplex;
--- a/modules/libpref/init/all.js +++ b/modules/libpref/init/all.js @@ -3508,17 +3508,16 @@ pref("autocomplete.ungrab_during_mode_sw // Default to using the system filepicker if possible, but allow // toggling to use the XUL filepicker pref("ui.allow_platform_file_picker", true); pref("helpers.global_mime_types_file", "/etc/mime.types"); pref("helpers.global_mailcap_file", "/etc/mailcap"); pref("helpers.private_mime_types_file", "~/.mime.types"); pref("helpers.private_mailcap_file", "~/.mailcap"); -pref("print.print_command", "lpr ${MOZ_PRINTER_NAME:+-P\"$MOZ_PRINTER_NAME\"}"); pref("print.printer_list", ""); // list of printers, separated by spaces pref("print.print_reversed", false); pref("print.print_color", true); pref("print.print_landscape", false); pref("print.print_paper_size", 0); // print_extra_margin enables platforms to specify an extra gap or margin // around the content of the page for Print Preview only @@ -3530,17 +3529,16 @@ pref("layout.css.scroll-behavior.propert // CSS Scroll Snapping requires the C++ APZC pref("layout.css.scroll-snap.enabled", false); /* PostScript print module prefs */ // pref("print.postscript.enabled", true); pref("print.postscript.paper_size", "letter"); pref("print.postscript.orientation", "portrait"); -pref("print.postscript.print_command", "lpr ${MOZ_PRINTER_NAME:+-P\"$MOZ_PRINTER_NAME\"}"); // Setting default_level_parent to true makes the default level for popup // windows "top" instead of "parent". On GTK2 platform, this is implemented // with override-redirect windows which is the normal way to implement // temporary popup windows. Setting this to false would make the default // level "parent" which is implemented with managed windows. // A problem with using managed windows is that metacity sometimes deactivates // the parent window when the managed popup is shown. @@ -3581,17 +3579,16 @@ pref("autocomplete.ungrab_during_mode_sw // Default to using the system filepicker if possible, but allow // toggling to use the XUL filepicker pref("ui.allow_platform_file_picker", true); pref("helpers.global_mime_types_file", "/etc/mime.types"); pref("helpers.global_mailcap_file", "/etc/mailcap"); pref("helpers.private_mime_types_file", "~/.mime.types"); pref("helpers.private_mailcap_file", "~/.mailcap"); -pref("print.print_command", "lpr ${MOZ_PRINTER_NAME:+-P\"$MOZ_PRINTER_NAME\"}"); pref("print.printer_list", ""); // list of printers, separated by spaces pref("print.print_reversed", false); pref("print.print_color", true); pref("print.print_landscape", false); pref("print.print_paper_size", 0); // print_extra_margin enables platforms to specify an extra gap or margin // around the content of the page for Print Preview only @@ -3717,17 +3714,16 @@ pref("font.name.monospace.zh-HK", "monos pref("font.name.serif.zh-TW", "serif"); pref("font.name.sans-serif.zh-TW", "sans-serif"); pref("font.name.monospace.zh-TW", "monospace"); /* PostScript print module prefs */ // pref("print.postscript.enabled", true); pref("print.postscript.paper_size", "letter"); pref("print.postscript.orientation", "portrait"); -pref("print.postscript.print_command", "lpr ${MOZ_PRINTER_NAME:+-P\"$MOZ_PRINTER_NAME\"}"); // On GTK2 platform, we should use topmost window level for the default window // level of <panel> element of XUL. GTK2 has only two window types. One is // normal top level window, other is popup window. The popup window is always // topmost window level, therefore, we are using normal top level window for // non-topmost panel, but it is pretty hacky. On some Window Managers, we have // 2 problems: // 1. The non-topmost panel steals focus from its parent window at showing. @@ -3939,24 +3935,16 @@ pref("font.name.monospace.x-cyrillic", " // Override default Unicode fonts pref("font.name.serif.x-unicode", "dt-interface system-ucs2.cjk_japan-0"); pref("font.name.sans-serif.x-unicode", "dt-interface system-ucs2.cjk_japan-0"); pref("font.name.monospace.x-unicode", "dt-interface user-ucs2.cjk_japan-0"); # AIX #endif -#ifdef SOLARIS - -pref("print.postscript.print_command", "lp -c -s ${MOZ_PRINTER_NAME:+-d\"$MOZ_PRINTER_NAME\"}"); -pref("print.print_command", "lp -c -s ${MOZ_PRINTER_NAME:+-d\"$MOZ_PRINTER_NAME\"}"); - -# Solaris -#endif - // Login Manager prefs pref("signon.rememberSignons", true); pref("signon.autofillForms", true); pref("signon.autologin.proxy", false); pref("signon.storeWhenAutocompleteOff", true); pref("signon.ui.experimental", false); pref("signon.debug", false);
--- a/toolkit/components/printing/content/printdialog.js +++ b/toolkit/components/printing/content/printdialog.js @@ -372,17 +372,16 @@ function onAccept() if (saveToPrefs && printService != null) { var flags = gPrintSetInterface.kInitSavePaperSize | gPrintSetInterface.kInitSaveColorSpace | gPrintSetInterface.kInitSaveEdges | gPrintSetInterface.kInitSaveInColor | gPrintSetInterface.kInitSaveResolutionName | gPrintSetInterface.kInitSaveDownloadFonts | - gPrintSetInterface.kInitSavePrintCommand | gPrintSetInterface.kInitSaveShrinkToFit | gPrintSetInterface.kInitSaveScaling; printService.savePrintSettingsToPrefs(gPrintSettings, true, flags); } // set return value to "print" if (paramBlock) { paramBlock.SetInt(0, 1);
--- a/toolkit/components/printing/content/printjoboptions.js +++ b/toolkit/components/printing/content/printjoboptions.js @@ -9,17 +9,16 @@ var gPrintBundle; var gPrintSettings = null; var gPrintSettingsInterface = Components.interfaces.nsIPrintSettings; var gPaperArray; var gPlexArray; var gResolutionArray; var gColorSpaceArray; var gPrefs; -var default_command = "lpr"; var gPrintSetInterface = Components.interfaces.nsIPrintSettings; var doDebug = true; //--------------------------------------------------- function checkDouble(element, maxVal) { var value = element.value; if (value && value.length > 0) { @@ -72,20 +71,16 @@ function initDialog() dialog.resolutionList = document.getElementById("resolutionList"); dialog.resolutionGroup = document.getElementById("resolutionGroup"); dialog.jobTitleLabel = document.getElementById("jobTitleLabel"); dialog.jobTitleGroup = document.getElementById("jobTitleGroup"); dialog.jobTitleInput = document.getElementById("jobTitleInput"); - dialog.cmdLabel = document.getElementById("cmdLabel"); - dialog.cmdGroup = document.getElementById("cmdGroup"); - dialog.cmdInput = document.getElementById("cmdInput"); - dialog.colorspaceList = document.getElementById("colorspaceList"); dialog.colorspaceGroup = document.getElementById("colorspaceGroup"); dialog.colorGroup = document.getElementById("colorGroup"); dialog.colorRadioGroup = document.getElementById("colorRadioGroup"); dialog.colorRadio = document.getElementById("colorRadio"); dialog.grayRadio = document.getElementById("grayRadio"); @@ -584,48 +579,45 @@ function loadDialog() var print_paper_width = 0.0; var print_paper_height = 0.0; var print_paper_name = ""; var print_plex_name = ""; var print_resolution_name = ""; var print_colorspace = ""; var print_color = true; var print_downloadfonts = true; - var print_command = default_command; var print_jobtitle = ""; gPrefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch); if (gPrintSettings) { print_paper_type = gPrintSettings.paperSizeType; print_paper_unit = gPrintSettings.paperSizeUnit; print_paper_width = gPrintSettings.paperWidth; print_paper_height = gPrintSettings.paperHeight; print_paper_name = gPrintSettings.paperName; print_plex_name = gPrintSettings.plexName; print_resolution_name = gPrintSettings.resolutionName; print_colorspace = gPrintSettings.colorspace; print_color = gPrintSettings.printInColor; print_downloadfonts = gPrintSettings.downloadFonts; - print_command = gPrintSettings.printCommand; print_jobtitle = gPrintSettings.title; } if (doDebug) { dump("loadDialog******************************\n"); dump("paperSizeType "+print_paper_unit+"\n"); dump("paperWidth "+print_paper_width+"\n"); dump("paperHeight "+print_paper_height+"\n"); dump("paperName "+print_paper_name+"\n"); dump("plexName "+print_plex_name+"\n"); dump("resolutionName "+print_resolution_name+"\n"); dump("colorspace "+print_colorspace+"\n"); dump("print_color "+print_color+"\n"); dump("print_downloadfonts "+print_downloadfonts+"\n"); - dump("print_command "+print_command+"\n"); dump("print_jobtitle "+print_jobtitle+"\n"); } createPaperArray(); var paperSelectedInx = 0; for (var i=0;i<gPaperArray.length;i++) { if (print_paper_name == gPaperArray[i].name) { @@ -704,26 +696,16 @@ function loadDialog() dialog.jobTitleInput.removeAttribute("disabled"); else dialog.jobTitleInput.setAttribute("disabled","true"); if (gPrefs.getBoolPref("print.tmp.printerfeatures." + gPrintSettings.printerName + ".supports_jobtitle_change")) dialog.jobTitleGroup.removeAttribute("hidden"); else dialog.jobTitleGroup.setAttribute("hidden","true"); - // spooler command - if (gPrefs.getBoolPref("print.tmp.printerfeatures." + gPrintSettings.printerName + ".can_change_spoolercommand")) - dialog.cmdInput.removeAttribute("disabled"); - else - dialog.cmdInput.setAttribute("disabled","true"); - if (gPrefs.getBoolPref("print.tmp.printerfeatures." + gPrintSettings.printerName + ".supports_spoolercommand_change")) - dialog.cmdGroup.removeAttribute("hidden"); - else - dialog.cmdGroup.setAttribute("hidden","true"); - // paper size if (gPrefs.getBoolPref("print.tmp.printerfeatures." + gPrintSettings.printerName + ".can_change_paper_size")) dialog.paperList.removeAttribute("disabled"); else dialog.paperList.setAttribute("disabled","true"); if (gPrefs.getBoolPref("print.tmp.printerfeatures." + gPrintSettings.printerName + ".supports_paper_size_change")) dialog.paperGroup.removeAttribute("hidden"); else @@ -775,29 +757,24 @@ function loadDialog() else dialog.downloadFonts.setAttribute("disabled","true"); if (gPrefs.getBoolPref("print.tmp.printerfeatures." + gPrintSettings.printerName + ".supports_downloadfonts_change")) dialog.fontsGroup.removeAttribute("hidden"); else dialog.fontsGroup.setAttribute("hidden","true"); } - if (print_command == "") { - print_command = default_command; - } - if (print_color) { dialog.colorRadioGroup.selectedItem = dialog.colorRadio; } else { dialog.colorRadioGroup.selectedItem = dialog.grayRadio; } dialog.downloadFonts.checked = print_downloadfonts; - dialog.cmdInput.value = print_command; dialog.jobTitleInput.value = print_jobtitle; dialog.topInput.value = gPrintSettings.edgeTop.toFixed(2); dialog.bottomInput.value = gPrintSettings.edgeBottom.toFixed(2); dialog.leftInput.value = gPrintSettings.edgeLeft.toFixed(2); dialog.rightInput.value = gPrintSettings.edgeRight.toFixed(2); } @@ -857,17 +834,16 @@ function onAccept() gPrintSettings.paperName = print_paper_name; gPrintSettings.plexName = print_plex_name; gPrintSettings.resolutionName = print_resolution_name; gPrintSettings.colorspace = print_colorspace; // save these out so they can be picked up by the device spec gPrintSettings.printInColor = dialog.colorRadio.selected; gPrintSettings.downloadFonts = dialog.downloadFonts.checked; - gPrintSettings.printCommand = dialog.cmdInput.value; gPrintSettings.title = dialog.jobTitleInput.value; gPrintSettings.edgeTop = dialog.topInput.value; gPrintSettings.edgeBottom = dialog.bottomInput.value; gPrintSettings.edgeLeft = dialog.leftInput.value; gPrintSettings.edgeRight = dialog.rightInput.value; if (doDebug) { @@ -878,17 +854,16 @@ function onAccept() dump("paperHeight "+print_paper_height+"\n"); dump("paperName '"+print_paper_name+"'\n"); dump("plexName '"+print_plex_name+"'\n"); dump("resolutionName '"+print_resolution_name+"'\n"); dump("colorspace '"+print_colorspace+"'\n"); dump("printInColor "+gPrintSettings.printInColor+"\n"); dump("downloadFonts "+gPrintSettings.downloadFonts+"\n"); - dump("printCommand '"+gPrintSettings.printCommand+"'\n"); } } else { dump("************ onAccept gPrintSettings: "+gPrintSettings+"\n"); } if (paramBlock) { // set return value to "ok" paramBlock.SetInt(0, 1);
--- a/toolkit/components/printing/content/printjoboptions.xul +++ b/toolkit/components/printing/content/printjoboptions.xul @@ -78,24 +78,16 @@ accesskey="&colorspaceInput.accesskey;" control="colorspaceList"/> </hbox> <menulist id="colorspaceList" flex="1"> <menupopup/> </menulist> </row> - <row id="cmdGroup"> - <label id="cmdLabel" - value="&cmdInput.label;" - accesskey="&cmdInput.accesskey;" - control="cmdInput"/> - <textbox id="cmdInput" flex="1"/> - </row> - <row id="colorGroup"> <hbox align="center" pack="end"> <label control="colorRadioGroup" value="&colorGroup.label;"/> </hbox> <radiogroup id="colorRadioGroup" orient="horizontal"> <radio id="grayRadio" label="&grayRadio.label;" accesskey="&grayRadio.accesskey;"/>
--- a/toolkit/locales/en-US/chrome/global/printjoboptions.dtd +++ b/toolkit/locales/en-US/chrome/global/printjoboptions.dtd @@ -10,19 +10,16 @@ <!ENTITY paperInput.accesskey "P"> <!ENTITY plexInput.label "Plex mode:"> <!ENTITY plexInput.accesskey "m"> <!ENTITY resolutionInput.label "Resolution/Quality:"> <!ENTITY resolutionInput.accesskey "e"> -<!ENTITY cmdInput.label "Print Command:"> -<!ENTITY cmdInput.accesskey "o"> - <!ENTITY jobTitleInput.label "Job Title:"> <!ENTITY jobTitleInput.accesskey "J"> <!ENTITY colorGroup.label "Color:"> <!ENTITY grayRadio.label "Grayscale"> <!ENTITY grayRadio.accesskey "G"> <!ENTITY colorRadio.label "Color"> <!ENTITY colorRadio.accesskey "C">
--- a/widget/gtk/nsDeviceContextSpecG.cpp +++ b/widget/gtk/nsDeviceContextSpecG.cpp @@ -573,29 +573,16 @@ NS_IMETHODIMP nsPrinterEnumeratorGTK::In aPrintSettings->SetPaperWidth(paper.Width_mm()); aPrintSettings->SetPaperHeight(paper.Height_mm()); aPrintSettings->SetPaperName(NS_ConvertASCIItoUTF16(paper.Name()).get()); } else { DO_PR_DEBUG_LOG(("Unknown paper size '%s' given.\n", papername.get())); } } - - bool hasSpoolerCmd = (nsPSPrinterList::kTypePS == - nsPSPrinterList::GetPrinterType(fullPrinterName)); - - if (hasSpoolerCmd) { - nsAutoCString command; - if (NS_SUCCEEDED(CopyPrinterCharPref("postscript", - printerName, "print_command", command))) { - DO_PR_DEBUG_LOG(("setting default print command to '%s'\n", - command.get())); - aPrintSettings->SetPrintCommand(NS_ConvertUTF8toUTF16(command).get()); - } - } return NS_OK; } return NS_ERROR_UNEXPECTED; } NS_IMETHODIMP nsPrinterEnumeratorGTK::DisplayPropertiesDlg(const char16_t *aPrinter, nsIPrintSettings *aPrintSettings)
--- a/widget/nsIPrintSettings.idl +++ b/widget/nsIPrintSettings.idl @@ -17,17 +17,17 @@ [ref] native nsNativeIntMarginRef(nsIntMargin); [ref] native IntegerArray(nsTArray<int32_t>); interface nsIPrintSession; /** * Simplified graphics interface for JS rendering. */ -[scriptable, uuid(11b86b46-12c9-4e63-8023-129dd239ace7)] +[scriptable, uuid(ec3d43bb-3fe0-4f9a-9502-eebcc511555b)] interface nsIPrintSettings : nsISupports { /** * PrintSettings to be Saved Navigation Constants */ const unsigned long kInitSaveOddEvenPages = 0x00000001; const unsigned long kInitSaveHeaderLeft = 0x00000002; @@ -44,17 +44,17 @@ interface nsIPrintSettings : nsISupports /* Flag 0x00001000 is unused */ const unsigned long kInitSavePaperData = 0x00002000; const unsigned long kInitSaveUnwriteableMargins = 0x00004000; const unsigned long kInitSaveEdges = 0x00008000; const unsigned long kInitSaveReversed = 0x00010000; const unsigned long kInitSaveInColor = 0x00020000; const unsigned long kInitSaveOrientation = 0x00040000; - const unsigned long kInitSavePrintCommand = 0x00080000; + const unsigned long kInitSavePrinterName = 0x00100000; const unsigned long kInitSavePrintToFile = 0x00200000; const unsigned long kInitSaveToFileName = 0x00400000; const unsigned long kInitSavePageDelay = 0x00800000; const unsigned long kInitSaveMargins = 0x01000000; const unsigned long kInitSaveNativeData = 0x02000000; const unsigned long kInitSavePlexName = 0x04000000; const unsigned long kInitSaveShrinkToFit = 0x08000000; @@ -238,17 +238,16 @@ interface nsIPrintSettings : nsISupports attribute wstring resolutionName;/* device-specific identifer of resolution or quality * (like "600", "600x300", "600x300x12", "high-res", * "med-res". "low-res", etc.) */ attribute boolean downloadFonts; /* enable font download to printer? */ attribute boolean printReversed; attribute boolean printInColor; /* a false means grayscale */ attribute long orientation; /* see orientation consts */ - attribute wstring printCommand; attribute long numCopies; attribute wstring printerName; /* name of destination printer */ attribute boolean printToFile; attribute wstring toFileName; attribute short outputFormat;
--- a/widget/nsPrintOptionsImpl.cpp +++ b/widget/nsPrintOptionsImpl.cpp @@ -64,17 +64,16 @@ static const char kPrintPaperSizeType[] static const char kPrintPaperData[] = "print_paper_data"; static const char kPrintPaperSizeUnit[] = "print_paper_size_unit"; static const char kPrintPaperWidth[] = "print_paper_width"; static const char kPrintPaperHeight[] = "print_paper_height"; static const char kPrintColorspace[] = "print_colorspace"; static const char kPrintResolutionName[]= "print_resolution_name"; static const char kPrintDownloadFonts[] = "print_downloadfonts"; static const char kPrintOrientation[] = "print_orientation"; -static const char kPrintCommand[] = "print_command"; static const char kPrinterName[] = "print_printer"; static const char kPrintToFile[] = "print_to_file"; static const char kPrintToFileName[] = "print_to_filename"; static const char kPrintPageDelay[] = "print_page_delay"; static const char kPrintBGColors[] = "print_bgcolor"; static const char kPrintBGImages[] = "print_bgimages"; static const char kPrintShrinkToFit[] = "print_shrink_to_fit"; static const char kPrintScaling[] = "print_scaling"; @@ -194,20 +193,16 @@ nsPrintOptions::SerializeToPrintData(nsI aSettings->GetResolutionName(getter_Copies(resolutionName)); data->resolutionName() = resolutionName; aSettings->GetDownloadFonts(&data->downloadFonts()); aSettings->GetPrintReversed(&data->printReversed()); aSettings->GetPrintInColor(&data->printInColor()); aSettings->GetOrientation(&data->orientation()); - nsXPIDLString printCommand; - aSettings->GetPrintCommand(getter_Copies(printCommand)); - data->printCommand() = printCommand; - aSettings->GetNumCopies(&data->numCopies()); nsXPIDLString printerName; aSettings->GetPrinterName(getter_Copies(printerName)); data->printerName() = printerName; aSettings->GetPrintToFile(&data->printToFile()); @@ -314,18 +309,16 @@ nsPrintOptions::DeserializeToPrintSettin settings->SetResolutionName(data.resolutionName().get()); settings->SetDownloadFonts(data.downloadFonts()); settings->SetPrintReversed(data.printReversed()); settings->SetPrintInColor(data.printInColor()); settings->SetOrientation(data.orientation()); - settings->SetPrintCommand(data.printCommand().get()); - settings->SetNumCopies(data.numCopies()); settings->SetPrinterName(data.printerName().get()); settings->SetPrintToFile(data.printToFile()); settings->SetToFileName(data.toFileName().get()); @@ -694,23 +687,16 @@ nsPrintOptions::ReadPrefs(nsIPrintSettin if (aFlags & nsIPrintSettings::kInitSaveOrientation) { if (GETINTPREF(kPrintOrientation, &iVal)) { aPS->SetOrientation(iVal); DUMP_INT(kReadStr, kPrintOrientation, iVal); } } - if (aFlags & nsIPrintSettings::kInitSavePrintCommand) { - if (GETSTRPREF(kPrintCommand, &str)) { - aPS->SetPrintCommand(str.get()); - DUMP_STR(kReadStr, kPrintCommand, str.get()); - } - } - if (aFlags & nsIPrintSettings::kInitSavePrintToFile) { if (GETBOOLPREF(kPrintToFile, &b)) { aPS->SetPrintToFile(b); DUMP_BOOL(kReadStr, kPrintToFile, b); } } if (aFlags & nsIPrintSettings::kInitSaveToFileName) { @@ -995,23 +981,16 @@ nsPrintOptions::WritePrefs(nsIPrintSetti if (aFlags & nsIPrintSettings::kInitSaveOrientation) { if (NS_SUCCEEDED(aPS->GetOrientation(&iVal))) { DUMP_INT(kWriteStr, kPrintOrientation, iVal); Preferences::SetInt(GetPrefName(kPrintOrientation, aPrinterName), iVal); } } - if (aFlags & nsIPrintSettings::kInitSavePrintCommand) { - if (NS_SUCCEEDED(aPS->GetPrintCommand(&uStr))) { - DUMP_STR(kWriteStr, kPrintCommand, uStr); - Preferences::SetString(GetPrefName(kPrintCommand, aPrinterName), uStr); - } - } - // Only the general version of this pref is saved if ((aFlags & nsIPrintSettings::kInitSavePrinterName) && aPrinterName.IsEmpty()) { if (NS_SUCCEEDED(aPS->GetPrinterName(&uStr))) { DUMP_STR(kWriteStr, kPrinterName, uStr); Preferences::SetString(kPrinterName, uStr); } } @@ -1506,17 +1485,16 @@ Tester::Tester() ps->SetPaperSizeType(10); ps->SetPaperData(1); ps->SetPaperWidth(100.0); ps->SetPaperHeight(50.0); ps->SetPaperSizeUnit(nsIPrintSettings::kPaperSizeMillimeters); ps->SetPrintReversed(true); ps->SetPrintInColor(true); ps->SetOrientation(nsIPrintSettings::kLandscapeOrientation); - ps->SetPrintCommand(NS_ConvertUTF8toUTF16("Command").get()); ps->SetNumCopies(2); ps->SetPrinterName(NS_ConvertUTF8toUTF16("Printer Name").get()); ps->SetPrintToFile(true); ps->SetToFileName(NS_ConvertUTF8toUTF16("File Name").get()); ps->SetPrintPageDelay(1000); ps->SetShrinkToFit(true); struct SettingsType { @@ -1538,17 +1516,16 @@ Tester::Tester() {kPrintPlexName, nsIPrintSettings::kInitSavePlexName}, {kPrintPaperData, nsIPrintSettings::kInitSavePaperData}, {kPrintReversed, nsIPrintSettings::kInitSaveReversed}, {kPrintInColor, nsIPrintSettings::kInitSaveInColor}, {kPrintColorspace, nsIPrintSettings::kInitSaveColorspace}, {kPrintResolutionName, nsIPrintSettings::kInitSaveResolutionName}, {kPrintDownloadFonts, nsIPrintSettings::kInitSaveDownloadFonts}, {kPrintOrientation, nsIPrintSettings::kInitSaveOrientation}, - {kPrintCommand, nsIPrintSettings::kInitSavePrintCommand}, {kPrinterName, nsIPrintSettings::kInitSavePrinterName}, {kPrintToFile, nsIPrintSettings::kInitSavePrintToFile}, {kPrintToFileName, nsIPrintSettings::kInitSaveToFileName}, {kPrintPageDelay, nsIPrintSettings::kInitSavePageDelay}, {"Margins", nsIPrintSettings::kInitSaveMargins}, {"All", nsIPrintSettings::kInitSaveAll}, {nullptr, 0}};
--- a/widget/nsPrintSettingsImpl.cpp +++ b/widget/nsPrintSettingsImpl.cpp @@ -288,33 +288,16 @@ NS_IMETHODIMP nsPrintSettings::GetNumCop return NS_OK; } NS_IMETHODIMP nsPrintSettings::SetNumCopies(int32_t aNumCopies) { mNumCopies = aNumCopies; return NS_OK; } -/* attribute wstring printCommand; */ -NS_IMETHODIMP nsPrintSettings::GetPrintCommand(char16_t * *aPrintCommand) -{ - //NS_ENSURE_ARG_POINTER(aPrintCommand); - *aPrintCommand = ToNewUnicode(mPrintCommand); - return NS_OK; -} -NS_IMETHODIMP nsPrintSettings::SetPrintCommand(const char16_t * aPrintCommand) -{ - if (aPrintCommand) { - mPrintCommand = aPrintCommand; - } else { - mPrintCommand.SetLength(0); - } - return NS_OK; -} - /* attribute boolean printToFile; */ NS_IMETHODIMP nsPrintSettings::GetPrintToFile(bool *aPrintToFile) { //NS_ENSURE_ARG_POINTER(aPrintToFile); *aPrintToFile = mPrintToFile; return NS_OK; } NS_IMETHODIMP nsPrintSettings::SetPrintToFile(bool aPrintToFile) @@ -1178,17 +1161,16 @@ nsPrintSettings& nsPrintSettings::operat mPaperSizeType = rhs.mPaperSizeType; mPaperData = rhs.mPaperData; mPaperWidth = rhs.mPaperWidth; mPaperHeight = rhs.mPaperHeight; mPaperSizeUnit = rhs.mPaperSizeUnit; mPrintReversed = rhs.mPrintReversed; mPrintInColor = rhs.mPrintInColor; mOrientation = rhs.mOrientation; - mPrintCommand = rhs.mPrintCommand; mNumCopies = rhs.mNumCopies; mPrinter = rhs.mPrinter; mPrintToFile = rhs.mPrintToFile; mToFileName = rhs.mToFileName; mOutputFormat = rhs.mOutputFormat; mPrintPageDelay = rhs.mPrintPageDelay; for (int32_t i=0;i<NUM_HEAD_FOOT;i++) {
--- a/widget/nsPrintSettingsImpl.h +++ b/widget/nsPrintSettingsImpl.h @@ -91,17 +91,16 @@ protected: bool mPrintReversed; bool mPrintInColor; // a false means grayscale int32_t mOrientation; // see orientation consts nsString mColorspace; nsString mResolutionName; int32_t mResolution; int32_t mDuplex; bool mDownloadFonts; - nsString mPrintCommand; int32_t mNumCopies; nsXPIDLString mPrinter; bool mPrintToFile; nsString mToFileName; int16_t mOutputFormat; bool mIsInitedFromPrinter; bool mIsInitedFromPrefs; bool mPersistMarginBoxSettings;