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

Unified Diff: fpdfsdk/src/javascript/Field.cpp

Issue 1582013002: Cleanup CJS_PublicMethods::ParseNumber (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Update bug_361_expected.txt Created 4 years, 11 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 | « no previous file | fpdfsdk/src/javascript/PublicMethods.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/javascript/Field.cpp
diff --git a/fpdfsdk/src/javascript/Field.cpp b/fpdfsdk/src/javascript/Field.cpp
index 959e8dcadd560a8052c387aea1a08880ae97bf06..ebd3d331f5bf0e6a4f6f3428548ab8d5c781840e 100644
--- a/fpdfsdk/src/javascript/Field.cpp
+++ b/fpdfsdk/src/javascript/Field.cpp
@@ -2741,13 +2741,8 @@ FX_BOOL Field::value(IJS_Context* cc,
CFX_WideString swValue = pFormField->GetValue();
double dRet;
- FX_BOOL bDot;
- if (CJS_PublicMethods::ConvertStringToNumber(swValue.c_str(), dRet,
- bDot)) {
- if (bDot)
- vp << dRet;
- else
- vp << dRet;
+ if (CJS_PublicMethods::ConvertStringToNumber(swValue.c_str(), dRet)) {
+ vp << dRet;
} else {
vp << swValue;
}
@@ -2769,13 +2764,8 @@ FX_BOOL Field::value(IJS_Context* cc,
CFX_WideString swValue = pFormField->GetValue();
double dRet;
- FX_BOOL bDot;
- if (CJS_PublicMethods::ConvertStringToNumber(swValue.c_str(), dRet,
- bDot)) {
- if (bDot)
- vp << dRet;
- else
- vp << dRet;
+ if (CJS_PublicMethods::ConvertStringToNumber(swValue.c_str(), dRet)) {
+ vp << dRet;
} else {
vp << swValue;
}
@@ -2790,9 +2780,7 @@ FX_BOOL Field::value(IJS_Context* cc,
CFX_WideString swValue = pFormField->GetControl(i)->GetExportValue();
double dRet;
- FX_BOOL bDotDummy;
- if (CJS_PublicMethods::ConvertStringToNumber(swValue.c_str(), dRet,
- bDotDummy)) {
+ if (CJS_PublicMethods::ConvertStringToNumber(swValue.c_str(), dRet)) {
vp << dRet;
} else {
vp << swValue;
« no previous file with comments | « no previous file | fpdfsdk/src/javascript/PublicMethods.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698