forked from Pissandshittium/pissandshittium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Select default paper size based on locale if default isn't set in PPD
Currently, when the default page size of a printer cannot be parsed from the PPD, the default falls back to the first page size on the list of capabilities. Because such a page size tends to be the first alphanumerically, it tends to be one that is not commonly printed on, such as A2, A3, or 11x17. Using the locale information allows the parser to fall back on either A4 or N.A. Letter, respecting the locale. In doing so, alter the signature of ParsePpdCapabilities() to read the locale, which is then passed to GetDefaultPaperSizeFromLocaleMicrons(). Change some instances of const to constexpr along the way. Bug: 890904 Change-Id: I4ecd824008a7045086919630e491699d05bd78b1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1937705 Commit-Queue: Daniel Hosseinian <dhoss@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> Cr-Commit-Position: refs/heads/master@{#725235}
- Loading branch information
Daniel Hosseinian
authored and
Commit Bot
committed
Dec 16, 2019
1 parent
fa4db16
commit d8f4bc7
Showing
8 changed files
with
226 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.