diff options
author | abodenha@google.com <abodenha@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-15 23:41:53 +0000 |
---|---|---|
committer | abodenha@google.com <abodenha@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-15 23:41:53 +0000 |
commit | 74c07ed9622326e1c9be2feb09526d046b0127d4 (patch) | |
tree | 3e90046bbaf38de30bd3ef535fd50acafc41e43e | |
parent | c9cef147916df67d19b3910771906e02cc309b6e (diff) | |
download | chromium_src-74c07ed9622326e1c9be2feb09526d046b0127d4.zip chromium_src-74c07ed9622326e1c9be2feb09526d046b0127d4.tar.gz chromium_src-74c07ed9622326e1c9be2feb09526d046b0127d4.tar.bz2 |
Merge 150447 - 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
TBR=abodenha@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10825376
git-svn-id: svn://svn.chromium.org/chrome/branches/1180/src@151790 0039d316-1c4b-4281-b951-d872f2087c98
-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; |