Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(156)

Unified Diff: core/src/fpdfdoc/doc_formfield.cpp

Issue 1239313005: Merge to XFA - else after returns. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Fix issues. Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/src/fpdfdoc/doc_formcontrol.cpp ('k') | core/src/fpdfdoc/doc_metadata.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fpdfdoc/doc_formfield.cpp
diff --git a/core/src/fpdfdoc/doc_formfield.cpp b/core/src/fpdfdoc/doc_formfield.cpp
index 1a6fc3d6d991dd2d0d98dca988f06425f8c701ed..8b644e4f93fda2aa51771b9a8430055bd0d6acc7 100644
--- a/core/src/fpdfdoc/doc_formfield.cpp
+++ b/core/src/fpdfdoc/doc_formfield.cpp
@@ -472,14 +472,15 @@ int CPDF_FormField::GetSelectedIndex(int index)
return -1;
}
}
+ if (pValue->GetType() == PDFOBJ_NUMBER) {
+ return pValue->GetInteger();
+ }
CFX_WideString sel_value;
if (pValue->GetType() == PDFOBJ_STRING) {
if (index != 0) {
return -1;
}
sel_value = pValue->GetUnicodeText();
- } else if (pValue->GetType() == PDFOBJ_NUMBER) {
- return pValue->GetInteger();
} else {
if (pValue->GetType() != PDFOBJ_ARRAY) {
return -1;
« no previous file with comments | « core/src/fpdfdoc/doc_formcontrol.cpp ('k') | core/src/fpdfdoc/doc_metadata.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698