diff options
author | abodenha@chromium.org <abodenha@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-07 23:44:31 +0000 |
---|---|---|
committer | abodenha@chromium.org <abodenha@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-07 23:44:31 +0000 |
commit | d1bee420eb7fa066d054221a97b128f91af1206d (patch) | |
tree | defe7ebef03ad38aa2c924a4ba086e1aff8f1b14 /printing | |
parent | 0a1f7bfb89c690af5e3c8d631ed82a03c08e7763 (diff) | |
download | chromium_src-d1bee420eb7fa066d054221a97b128f91af1206d.zip chromium_src-d1bee420eb7fa066d054221a97b128f91af1206d.tar.gz chromium_src-d1bee420eb7fa066d054221a97b128f91af1206d.tar.bz2 |
Fix issue with some locales simetimes getting the wrong page size.
We use ulocdata_getPaperSize to get the preferred paper size for
a region. The error handling for the call assumed that a value other
than U_ZERO_ERROR was an error. This is incorrect. The function sometimes
returns a warning (negative value). When that happens, the error handling
code defaulted to 8.5x11 pages.
This CL changes the error handling to no longer treat a warning as an error.
BUG=140821
TEST=Set display language to English(UK). Print a web page and choose to save as PDF. Verify that the saved PDF is A4.
Review URL: https://chromiumcodereview.appspot.com/10834217
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@150447 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'printing')
-rw-r--r-- | printing/printing_context_no_system_dialog.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/printing/printing_context_no_system_dialog.cc b/printing/printing_context_no_system_dialog.cc index 58ab76e..3cc991c 100644 --- a/printing/printing_context_no_system_dialog.cc +++ b/printing/printing_context_no_system_dialog.cc @@ -52,7 +52,7 @@ PrintingContext::Result PrintingContextNoSystemDialog::UseDefaultSettings() { int32_t height = 0; UErrorCode error = U_ZERO_ERROR; ulocdata_getPaperSize(app_locale_.c_str(), &height, &width, &error); - if (error != U_ZERO_ERROR) { + if (error > U_ZERO_ERROR) { // If the call failed, assume a paper size of 8.5 x 11 inches. LOG(WARNING) << "ulocdata_getPaperSize failed, using 8.5 x 11, error: " << error; |