Bug 847181: prune unused printing-related nsresult codes, make printing error codes available in Components.results, and improve English of printing error messages. r=smaug

This commit is contained in:
Zack Weinberg 2013-03-08 21:45:14 -05:00
parent 668baedbb6
commit db6d545915
5 changed files with 95 additions and 166 deletions

View File

@ -2,14 +2,14 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# Page number formating
# Page number formatting
## @page_number The current page number
#LOCALIZATION NOTE (pageofpages): Do not translate %ld in the following line.
# Place the word %ld where the page number and number of pages should be
# The first %ld will receive the the page number
pagenumber=%1$d
# Page number formating
# Page number formatting
## @page_number The current page number
## @page_total The total number of pages
#LOCALIZATION NOTE (pageofpages): Do not translate %ld in the following line.
@ -18,56 +18,39 @@ pagenumber=%1$d
# the second %ld will receive the total number of pages
pageofpages=%1$d of %2$d
noPrintFilename.title=Filename is missing
noPrintFilename.alert=You have selected "Print To: File", and the filename is empty!
# File confirm
fileConfirm.exists=%S already exists.\nDo you want to replace it?
# Print error codes
print_error_dialog_title=Printer Error
printpreview_error_dialog_title=Print Preview Error
NS_ERROR_GFX_PRINTER_CMD_NOT_FOUND=There was a problem printing. The printer doesn't support a printing command.
NS_ERROR_GFX_PRINTER_CMD_FAILURE=There was a problem printing. An instruction that was sent to the printer failed.
NS_ERROR_GFX_PRINTER_NO_PRINTER_AVAILABLE=There was a problem printing. No printer could be found.
NS_ERROR_GFX_PRINTER_NAME_NOT_FOUND=There was a problem printing. The printer could not be found.
NS_ERROR_GFX_PRINTER_ACCESS_DENIED=There was a problem printing. Access to the printer was denied.
NS_ERROR_GFX_PRINTER_INVALID_ATTRIBUTE=There was a problem printing. Tried to set an invalid printer attribute.
NS_ERROR_GFX_PRINTER_PRINTER_NOT_READY=There was a problem printing. The printer not ready.
NS_ERROR_GFX_PRINTER_OUT_OF_PAPER=There was a problem printing. The printer is out of paper.
NS_ERROR_GFX_PRINTER_PRINTER_IO_ERROR=There was a problem printing. Printer I/O error.
NS_ERROR_GFX_PRINTER_COULD_NOT_OPEN_FILE=There was a problem printing. The output file could not be opened.
NS_ERROR_GFX_PRINTER_FILE_IO_ERROR=There was an error writing the printing output file.
NS_ERROR_GFX_PRINTER_PRINTPREVIEW=There must be at least one printer available to show Print Preview.
NS_ERROR_UNEXPECTED=There was an unexpected problem when printing.
NS_ERROR_OUT_OF_MEMORY=There was a problem printing. There is not enough free memory to print.
NS_ERROR_NOT_IMPLEMENTED=Some printing functionality is not implemented yet.
NS_ERROR_NOT_AVAILABLE=Not available
NS_ERROR_ABORT=The print job was aborted, or canceled.
NS_ERROR_FAILURE=An unknown error occurred while printing.
NS_ERROR_GFX_PRINTER_STARTDOC=Printing failed when starting the document.
NS_ERROR_GFX_PRINTER_ENDDOC=Printing failed when completing the document.
NS_ERROR_GFX_PRINTER_STARTPAGE=Printing failed when starting the page.
NS_ERROR_GFX_PRINTER_ENDPAGE=Printing failed when completing the page.
NS_ERROR_GFX_PRINTER_PRINT_WHILE_PREVIEW=You cannot print while in print preview.
NS_ERROR_GFX_PRINTER_PAPER_SIZE_NOT_SUPPORTED=There was a problem printing because the paper size you specified is not supported by your printer.
NS_ERROR_GFX_PRINTER_ORIENTATION_NOT_SUPPORTED=There was a problem printing because the page orientation you specified is not supported by your printer.
NS_ERROR_GFX_PRINTER_COLORSPACE_NOT_SUPPORTED=There was a problem printing because the print job requires color capabilities that your printer does not support.
NS_ERROR_GFX_PRINTER_TOO_MANY_COPIES=There was a problem printing because you requested too many copies.
NS_ERROR_GFX_PRINTER_DRIVER_CONFIGURATION_ERROR=There was a problem printing. The printer driver is not properly configured.
NS_ERROR_GFX_PRINTER_DOC_IS_BUSY_PP=The browser cannot print preview right now.\nPlease try again when the page has finished loading.
NS_ERROR_GFX_PRINTER_DOC_WAS_DESTORYED=The page was replaced while you were trying to print.\nPlease try again.
NS_ERROR_GFX_NO_PRINTDIALOG_IN_TOOLKIT=Either pluggable dialogs were not properly installed\nOr this GFX Toolkit no longer supports native Print Dialogs
NS_ERROR_GFX_NO_PRINTROMPTSERVICE=The Printing Prompt Service is missing.
NS_ERROR_GFX_PRINTER_NO_XUL=We are unable to Print or Print Preview this page.
NS_ERROR_GFX_PRINTER_PLEX_NOT_SUPPORTED=There was a problem printing because the plex mode you specified is not supported by your printer.
NS_ERROR_GFX_PRINTER_DOC_IS_BUSY=The browser cannot print the document while it is being loaded.
NS_ERROR_GFX_PRINTING_NOT_IMPLEMENTED=Printing is not implemented.
NS_ERROR_GFX_COULD_NOT_LOAD_PRINT_MODULE=The requested print module cannot be loaded.
NS_ERROR_GFX_PRINTER_RESOLUTION_NOT_SUPPORTED=There was a problem printing because the resolution/quality mode you specified is not supported by your printer.
# No printers available
noprinter=No printers available.
PrintToFile=Print To File
# EOF.
noPrintFilename.title=Filename is missing
noPrintFilename.alert=You have selected "Print To File", and the filename is empty!
fileConfirm.exists=%S already exists.\nDo you want to replace it?
print_error_dialog_title=Printer Error
printpreview_error_dialog_title=Print Preview Error
# Print error codes.
#LOCALIZATION NOTE: Some of these are generic error codes which you may have
# already translated a generic error message for. Please do not reuse that
# error message in this context; we want to be more specific when we know
# the error has to do with printing.
#
# Any of these messages can be made print-preview-specific by adding a
# _PP suffix to the label.
NS_ERROR_FAILURE=An error occurred while printing.
NS_ERROR_ABORT=The print job was aborted, or canceled.
NS_ERROR_NOT_AVAILABLE=Some printing functionality is not currently available.
NS_ERROR_NOT_IMPLEMENTED=Some printing functionality is not implemented yet.
NS_ERROR_OUT_OF_MEMORY=There is not enough free memory to print.
NS_ERROR_UNEXPECTED=There was an unexpected problem while printing.
NS_ERROR_GFX_PRINTER_NO_PRINTER_AVAILABLE=No printers available.
NS_ERROR_GFX_PRINTER_NO_PRINTER_AVAILABLE_PP=No printers available, cannot show print preview.
NS_ERROR_GFX_PRINTER_NAME_NOT_FOUND=The selected printer could not be found.
NS_ERROR_GFX_PRINTER_COULD_NOT_OPEN_FILE=Failed to open output file for print to file.
NS_ERROR_GFX_PRINTER_STARTDOC=Printing failed while starting the print job.
NS_ERROR_GFX_PRINTER_ENDDOC=Printing failed while completing the print job.
NS_ERROR_GFX_PRINTER_STARTPAGE=Printing failed while starting a new page.
NS_ERROR_GFX_PRINTER_DOC_IS_BUSY=Cannot print this document yet, it is still being loaded.
NS_ERROR_GFX_PRINTER_DOC_IS_BUSY_PP=Cannot print-preview this document yet, it is still being loaded.
NS_ERROR_GFX_PRINTER_NO_XUL=Printing XUL documents is not supported.
# EOF.

View File

@ -198,3 +198,13 @@ XPC_MSG_DEF(NS_ERROR_SIGNED_JAR_WRONG_SIGNATURE , "The JAR's signature is wr
XPC_MSG_DEF(NS_ERROR_SIGNED_JAR_ENTRY_TOO_LARGE , "An entry in the JAR is too large.")
XPC_MSG_DEF(NS_ERROR_SIGNED_JAR_ENTRY_INVALID , "An entry in the JAR is invalid.")
XPC_MSG_DEF(NS_ERROR_SIGNED_JAR_MANIFEST_INVALID , "The JAR's manifest or signature file is invalid.")
/* Codes for printing-related errors. */
XPC_MSG_DEF(NS_ERROR_GFX_PRINTER_NO_PRINTER_AVAILABLE , "No printers available.")
XPC_MSG_DEF(NS_ERROR_GFX_PRINTER_NAME_NOT_FOUND , "The selected printer could not be found.")
XPC_MSG_DEF(NS_ERROR_GFX_PRINTER_COULD_NOT_OPEN_FILE , "Failed to open output file for print to file.")
XPC_MSG_DEF(NS_ERROR_GFX_PRINTER_STARTDOC , "Printing failed while starting the print job.")
XPC_MSG_DEF(NS_ERROR_GFX_PRINTER_ENDDOC , "Printing failed while completing the print job.")
XPC_MSG_DEF(NS_ERROR_GFX_PRINTER_STARTPAGE , "Printing failed while starting a new page.")
XPC_MSG_DEF(NS_ERROR_GFX_PRINTER_DOC_IS_BUSY , "Cannot print this document yet, it is still being loaded.")
XPC_MSG_DEF(NS_ERROR_GFX_PRINTER_NO_XUL , "Printing XUL documents is not supported.") // bugs 136185 & 240490

View File

@ -636,7 +636,8 @@ nsPrintEngine::DoCommonPrint(bool aIsPrintPreview,
rv = NS_OK;
}
} else {
rv = NS_ERROR_GFX_NO_PRINTROMPTSERVICE;
// No dialog service available
rv = NS_ERROR_NOT_IMPLEMENTED;
}
} else {
// Call any code that requires a run of the event loop.
@ -787,7 +788,7 @@ nsPrintEngine::PrintPreview(nsIPrintSettings* aPrintSettings,
if (NS_FAILED(docShell->GetBusyFlags(&busyFlags)) ||
busyFlags != nsIDocShell::BUSY_FLAGS_NONE) {
CloseProgressDialog(aWebProgressListener);
ShowPrintErrorDialog(NS_ERROR_GFX_PRINTER_DOC_IS_BUSY_PP, false);
ShowPrintErrorDialog(NS_ERROR_GFX_PRINTER_DOC_IS_BUSY, false);
return NS_ERROR_FAILURE;
}
@ -1571,76 +1572,63 @@ nsresult nsPrintEngine::CleanupOnFailure(nsresult aResult, bool aIsPrinting)
void
nsPrintEngine::ShowPrintErrorDialog(nsresult aPrintError, bool aIsPrinting)
{
PR_PL(("nsPrintEngine::ShowPrintErrorDialog(nsresult aPrintError=%lx, bool aIsPrinting=%d)\n", (long)aPrintError, (int)aIsPrinting));
nsAutoCString stringName;
nsXPIDLString msg, title;
nsresult rv = NS_OK;
switch(aPrintError)
{
#define NS_ERROR_TO_LOCALIZED_PRINT_ERROR_MSG(nserr) case nserr: stringName.AssignLiteral(#nserr); break;
NS_ERROR_TO_LOCALIZED_PRINT_ERROR_MSG(NS_ERROR_GFX_PRINTER_CMD_NOT_FOUND)
NS_ERROR_TO_LOCALIZED_PRINT_ERROR_MSG(NS_ERROR_GFX_PRINTER_CMD_FAILURE)
NS_ERROR_TO_LOCALIZED_PRINT_ERROR_MSG(NS_ERROR_GFX_PRINTER_NO_PRINTER_AVAILABLE)
NS_ERROR_TO_LOCALIZED_PRINT_ERROR_MSG(NS_ERROR_GFX_PRINTER_NAME_NOT_FOUND)
NS_ERROR_TO_LOCALIZED_PRINT_ERROR_MSG(NS_ERROR_GFX_PRINTER_ACCESS_DENIED)
NS_ERROR_TO_LOCALIZED_PRINT_ERROR_MSG(NS_ERROR_GFX_PRINTER_INVALID_ATTRIBUTE)
NS_ERROR_TO_LOCALIZED_PRINT_ERROR_MSG(NS_ERROR_GFX_PRINTER_PRINTER_NOT_READY)
NS_ERROR_TO_LOCALIZED_PRINT_ERROR_MSG(NS_ERROR_GFX_PRINTER_OUT_OF_PAPER)
NS_ERROR_TO_LOCALIZED_PRINT_ERROR_MSG(NS_ERROR_GFX_PRINTER_PRINTER_IO_ERROR)
NS_ERROR_TO_LOCALIZED_PRINT_ERROR_MSG(NS_ERROR_GFX_PRINTER_COULD_NOT_OPEN_FILE)
NS_ERROR_TO_LOCALIZED_PRINT_ERROR_MSG(NS_ERROR_GFX_PRINTER_FILE_IO_ERROR)
NS_ERROR_TO_LOCALIZED_PRINT_ERROR_MSG(NS_ERROR_GFX_PRINTER_PRINTPREVIEW)
NS_ERROR_TO_LOCALIZED_PRINT_ERROR_MSG(NS_ERROR_UNEXPECTED)
NS_ERROR_TO_LOCALIZED_PRINT_ERROR_MSG(NS_ERROR_OUT_OF_MEMORY)
NS_ERROR_TO_LOCALIZED_PRINT_ERROR_MSG(NS_ERROR_NOT_IMPLEMENTED)
NS_ERROR_TO_LOCALIZED_PRINT_ERROR_MSG(NS_ERROR_NOT_AVAILABLE)
NS_ERROR_TO_LOCALIZED_PRINT_ERROR_MSG(NS_ERROR_ABORT)
NS_ERROR_TO_LOCALIZED_PRINT_ERROR_MSG(NS_ERROR_GFX_PRINTER_STARTDOC)
NS_ERROR_TO_LOCALIZED_PRINT_ERROR_MSG(NS_ERROR_GFX_PRINTER_ENDDOC)
NS_ERROR_TO_LOCALIZED_PRINT_ERROR_MSG(NS_ERROR_GFX_PRINTER_STARTPAGE)
NS_ERROR_TO_LOCALIZED_PRINT_ERROR_MSG(NS_ERROR_GFX_PRINTER_ENDPAGE)
NS_ERROR_TO_LOCALIZED_PRINT_ERROR_MSG(NS_ERROR_GFX_PRINTER_PRINT_WHILE_PREVIEW)
NS_ERROR_TO_LOCALIZED_PRINT_ERROR_MSG(NS_ERROR_GFX_PRINTER_PAPER_SIZE_NOT_SUPPORTED)
NS_ERROR_TO_LOCALIZED_PRINT_ERROR_MSG(NS_ERROR_GFX_PRINTER_ORIENTATION_NOT_SUPPORTED)
NS_ERROR_TO_LOCALIZED_PRINT_ERROR_MSG(NS_ERROR_GFX_PRINTER_COLORSPACE_NOT_SUPPORTED)
NS_ERROR_TO_LOCALIZED_PRINT_ERROR_MSG(NS_ERROR_GFX_PRINTER_TOO_MANY_COPIES)
NS_ERROR_TO_LOCALIZED_PRINT_ERROR_MSG(NS_ERROR_GFX_PRINTER_DRIVER_CONFIGURATION_ERROR)
NS_ERROR_TO_LOCALIZED_PRINT_ERROR_MSG(NS_ERROR_GFX_PRINTER_DOC_IS_BUSY_PP)
NS_ERROR_TO_LOCALIZED_PRINT_ERROR_MSG(NS_ERROR_GFX_PRINTER_DOC_WAS_DESTORYED)
NS_ERROR_TO_LOCALIZED_PRINT_ERROR_MSG(NS_ERROR_GFX_NO_PRINTDIALOG_IN_TOOLKIT)
NS_ERROR_TO_LOCALIZED_PRINT_ERROR_MSG(NS_ERROR_GFX_NO_PRINTROMPTSERVICE)
NS_ERROR_TO_LOCALIZED_PRINT_ERROR_MSG(NS_ERROR_GFX_PRINTER_NO_XUL) // Temporary code for Bug 136185 / bug 240490
NS_ERROR_TO_LOCALIZED_PRINT_ERROR_MSG(NS_ERROR_GFX_PRINTER_PLEX_NOT_SUPPORTED)
NS_ERROR_TO_LOCALIZED_PRINT_ERROR_MSG(NS_ERROR_GFX_PRINTER_DOC_IS_BUSY)
NS_ERROR_TO_LOCALIZED_PRINT_ERROR_MSG(NS_ERROR_GFX_PRINTING_NOT_IMPLEMENTED)
NS_ERROR_TO_LOCALIZED_PRINT_ERROR_MSG(NS_ERROR_GFX_COULD_NOT_LOAD_PRINT_MODULE)
NS_ERROR_TO_LOCALIZED_PRINT_ERROR_MSG(NS_ERROR_GFX_PRINTER_RESOLUTION_NOT_SUPPORTED)
NS_ERROR_TO_LOCALIZED_PRINT_ERROR_MSG(NS_ERROR_GFX_PRINTER_NO_XUL) // bug 136185 / bug 240490
NS_ERROR_TO_LOCALIZED_PRINT_ERROR_MSG(NS_ERROR_ABORT)
NS_ERROR_TO_LOCALIZED_PRINT_ERROR_MSG(NS_ERROR_NOT_AVAILABLE)
NS_ERROR_TO_LOCALIZED_PRINT_ERROR_MSG(NS_ERROR_NOT_IMPLEMENTED)
NS_ERROR_TO_LOCALIZED_PRINT_ERROR_MSG(NS_ERROR_OUT_OF_MEMORY)
NS_ERROR_TO_LOCALIZED_PRINT_ERROR_MSG(NS_ERROR_UNEXPECTED)
default:
NS_ERROR_TO_LOCALIZED_PRINT_ERROR_MSG(NS_ERROR_FAILURE)
#undef NS_ERROR_TO_LOCALIZED_PRINT_ERROR_MSG
}
PR_PL(("ShowPrintErrorDialog: stringName='%s'\n", stringName.get()));
nsXPIDLString msg, title;
nsresult rv =
nsContentUtils::GetLocalizedString(nsContentUtils::ePRINTING_PROPERTIES,
stringName.get(), msg);
if (!aIsPrinting) {
// Try first with _PP suffix.
stringName.AppendLiteral("_PP");
rv = nsContentUtils::GetLocalizedString(
nsContentUtils::ePRINTING_PROPERTIES, stringName.get(), msg);
if (NS_FAILED(rv)) {
stringName.Truncate(stringName.Length() - 3);
}
}
if (aIsPrinting || NS_FAILED(rv)) {
rv = nsContentUtils::GetLocalizedString(
nsContentUtils::ePRINTING_PROPERTIES, stringName.get(), msg);
}
if (NS_FAILED(rv)) {
PR_PL(("GetLocalizedString failed\n"));
return;
}
rv = nsContentUtils::GetLocalizedString(nsContentUtils::ePRINTING_PROPERTIES,
aIsPrinting ? "print_error_dialog_title"
: "printpreview_error_dialog_title",
title);
nsCOMPtr<nsIWindowWatcher> wwatch = do_GetService(NS_WINDOWWATCHER_CONTRACTID, &rv);
rv = nsContentUtils::GetLocalizedString(
nsContentUtils::ePRINTING_PROPERTIES,
aIsPrinting ? "print_error_dialog_title"
: "printpreview_error_dialog_title",
title);
if (NS_FAILED(rv)) {
return;
}
nsCOMPtr<nsIWindowWatcher> wwatch =
do_GetService(NS_WINDOWWATCHER_CONTRACTID, &rv);
if (NS_FAILED(rv)) {
PR_PL(("ShowPrintErrorDialog(): wwatch==nullptr\n"));
return;
}
@ -1648,16 +1636,14 @@ nsPrintEngine::ShowPrintErrorDialog(nsresult aPrintError, bool aIsPrinting)
wwatch->GetActiveWindow(getter_AddRefs(active));
nsCOMPtr<nsIPrompt> dialog;
/* |GetNewPrompter| allows that |active| is |nullptr|
/* |GetNewPrompter| allows that |active| is |nullptr|
* (see bug 234982 ("nsPrintEngine::ShowPrintErrorDialog() fails in many cases")) */
wwatch->GetNewPrompter(active, getter_AddRefs(dialog));
if (!dialog) {
PR_PL(("ShowPrintErrorDialog(): dialog==nullptr\n"));
return;
}
dialog->Alert(title.get(), msg.get());
PR_PL(("ShowPrintErrorDialog(): alert displayed successfully.\n"));
}
//-----------------------------------------------------------------

View File

@ -365,14 +365,13 @@ CheckForPrintToFile(nsIPrintSettings* aPS, LPWSTR aPrinterName, PRUnichar* aUPri
}
//----------------------------------------------------------------------------------
NS_IMETHODIMP nsDeviceContextSpecWin::Init(nsIWidget* aWidget,
NS_IMETHODIMP nsDeviceContextSpecWin::Init(nsIWidget* aWidget,
nsIPrintSettings* aPrintSettings,
bool aIsPrintPreview)
{
mPrintSettings = aPrintSettings;
nsresult rv = aIsPrintPreview ? NS_ERROR_GFX_PRINTER_PRINTPREVIEW :
NS_ERROR_GFX_PRINTER_NO_PRINTER_AVAILABLE;
nsresult rv = NS_ERROR_GFX_PRINTER_NO_PRINTER_AVAILABLE;
if (aPrintSettings) {
nsCOMPtr<nsIPrintSettingsWin> psWin(do_QueryInterface(aPrintSettings));
if (psWin) {

View File

@ -93,72 +93,23 @@
/* 3: NS_ERROR_MODULE_GFX */
/* ======================================================================= */
#define MODULE NS_ERROR_MODULE_GFX
/* error codes for printer device contexts */
/* Unix: print command (lp/lpr) not found */
ERROR(NS_ERROR_GFX_PRINTER_CMD_NOT_FOUND, FAILURE(2)),
/* Unix: print command returned an error */
ERROR(NS_ERROR_GFX_PRINTER_CMD_FAILURE, FAILURE(3)),
/* no printer available (e.g. cannot find _any_ printer) */
ERROR(NS_ERROR_GFX_PRINTER_NO_PRINTER_AVAILABLE, FAILURE(4)),
ERROR(NS_ERROR_GFX_PRINTER_NO_PRINTER_AVAILABLE, FAILURE(1)),
/* _specified_ (by name) printer not found */
ERROR(NS_ERROR_GFX_PRINTER_NAME_NOT_FOUND, FAILURE(5)),
/* access to printer denied */
ERROR(NS_ERROR_GFX_PRINTER_ACCESS_DENIED, FAILURE(6)),
/* invalid printer attribute (for example: unsupported paper size etc.) */
ERROR(NS_ERROR_GFX_PRINTER_INVALID_ATTRIBUTE, FAILURE(7)),
/* printer not "ready" (offline ?) */
ERROR(NS_ERROR_GFX_PRINTER_PRINTER_NOT_READY, FAILURE(9)),
/* printer out of paper */
ERROR(NS_ERROR_GFX_PRINTER_OUT_OF_PAPER, FAILURE(10)),
/* generic printer I/O error */
ERROR(NS_ERROR_GFX_PRINTER_PRINTER_IO_ERROR, FAILURE(11)),
ERROR(NS_ERROR_GFX_PRINTER_NAME_NOT_FOUND, FAILURE(2)),
/* print-to-file: could not open output file */
ERROR(NS_ERROR_GFX_PRINTER_COULD_NOT_OPEN_FILE, FAILURE(12)),
/* print-to-file: I/O error while printing to file */
ERROR(NS_ERROR_GFX_PRINTER_FILE_IO_ERROR, FAILURE(13)),
/* print preview: needs at least one printer */
ERROR(NS_ERROR_GFX_PRINTER_PRINTPREVIEW, FAILURE(14)),
ERROR(NS_ERROR_GFX_PRINTER_COULD_NOT_OPEN_FILE, FAILURE(3)),
/* print: starting document */
ERROR(NS_ERROR_GFX_PRINTER_STARTDOC, FAILURE(15)),
ERROR(NS_ERROR_GFX_PRINTER_STARTDOC, FAILURE(4)),
/* print: ending document */
ERROR(NS_ERROR_GFX_PRINTER_ENDDOC, FAILURE(16)),
ERROR(NS_ERROR_GFX_PRINTER_ENDDOC, FAILURE(5)),
/* print: starting page */
ERROR(NS_ERROR_GFX_PRINTER_STARTPAGE, FAILURE(17)),
/* print: ending page */
ERROR(NS_ERROR_GFX_PRINTER_ENDPAGE, FAILURE(18)),
/* print: print while in print preview */
ERROR(NS_ERROR_GFX_PRINTER_PRINT_WHILE_PREVIEW, FAILURE(19)),
/* requested page size not supported by printer */
ERROR(NS_ERROR_GFX_PRINTER_PAPER_SIZE_NOT_SUPPORTED, FAILURE(20)),
/* requested page orientation not supported */
ERROR(NS_ERROR_GFX_PRINTER_ORIENTATION_NOT_SUPPORTED, FAILURE(21)),
/* requested colorspace not supported (like printing "color" on a
"grayscale"-only printer) */
ERROR(NS_ERROR_GFX_PRINTER_COLORSPACE_NOT_SUPPORTED, FAILURE(22)),
/* too many copies requested */
ERROR(NS_ERROR_GFX_PRINTER_TOO_MANY_COPIES, FAILURE(23)),
/* driver configuration error */
ERROR(NS_ERROR_GFX_PRINTER_DRIVER_CONFIGURATION_ERROR, FAILURE(24)),
/* The document is still being loaded, can't Print Preview */
ERROR(NS_ERROR_GFX_PRINTER_DOC_IS_BUSY_PP, FAILURE(25)),
/* The document was asked to be destroyed while we were preparing printing */
ERROR(NS_ERROR_GFX_PRINTER_DOC_WAS_DESTORYED, FAILURE(26)),
/* Cannot Print or Print Preview XUL Documents */
ERROR(NS_ERROR_GFX_PRINTER_NO_XUL, FAILURE(27)),
/* The toolkit no longer supports the Print Dialog (for embedders) */
ERROR(NS_ERROR_GFX_NO_PRINTDIALOG_IN_TOOLKIT, FAILURE(28)),
/* The was wasn't any Print Prompt service registered (this shouldn't happen) */
ERROR(NS_ERROR_GFX_NO_PRINTROMPTSERVICE, FAILURE(29)),
/* requested plex mode not supported by printer */
ERROR(NS_ERROR_GFX_PRINTER_PLEX_NOT_SUPPORTED, FAILURE(30)),
ERROR(NS_ERROR_GFX_PRINTER_STARTPAGE, FAILURE(6)),
/* The document is still being loaded */
ERROR(NS_ERROR_GFX_PRINTER_DOC_IS_BUSY, FAILURE(31)),
/* Printing is not implemented */
ERROR(NS_ERROR_GFX_PRINTING_NOT_IMPLEMENTED, FAILURE(32)),
/* Cannot load the matching print module */
ERROR(NS_ERROR_GFX_COULD_NOT_LOAD_PRINT_MODULE, FAILURE(33)),
/* requested resolution/quality mode not supported by printer */
ERROR(NS_ERROR_GFX_PRINTER_RESOLUTION_NOT_SUPPORTED, FAILURE(34)),
ERROR(NS_ERROR_GFX_PRINTER_DOC_IS_BUSY, FAILURE(7)),
/* Cannot Print or Print Preview XUL Documents (bug 136185 / bug 240490) */
ERROR(NS_ERROR_GFX_PRINTER_NO_XUL, FAILURE(8)),
/* Font cmap is strangely structured - avoid this font! */
ERROR(NS_ERROR_GFX_CMAP_MALFORMED, FAILURE(51)),
#undef MODULE