summaryrefslogtreecommitdiff
path: root/fpdfsdk/javascript/Document.cpp
diff options
context:
space:
mode:
authorthestig <thestig@chromium.org>2016-09-28 14:14:26 -0700
committerCommit bot <commit-bot@chromium.org>2016-09-28 14:14:26 -0700
commit7c292e0f67e0f0bf4062e0b2adf244e17d7dacb5 (patch)
treedeb84d05a8eb6d4f194f608ebbb004842b57623b /fpdfsdk/javascript/Document.cpp
parent8c41b1bf9fb7dd525f3a6b81d38f61d83500894d (diff)
downloadpdfium-7c292e0f67e0f0bf4062e0b2adf244e17d7dacb5.tar.xz
Remove dead code from CPDF_InterForm.
Remove default arguments. Review-Url: https://codereview.chromium.org/2380753003
Diffstat (limited to 'fpdfsdk/javascript/Document.cpp')
-rw-r--r--fpdfsdk/javascript/Document.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/fpdfsdk/javascript/Document.cpp b/fpdfsdk/javascript/Document.cpp
index ea225f095d..b7b03b2174 100644
--- a/fpdfsdk/javascript/Document.cpp
+++ b/fpdfsdk/javascript/Document.cpp
@@ -6,6 +6,7 @@
#include "fpdfsdk/javascript/Document.h"
+#include <utility>
#include <vector>
#include "core/fpdfapi/fpdf_font/include/cpdf_font.h"
@@ -174,7 +175,7 @@ FX_BOOL Document::numFields(IJS_Context* cc,
}
CPDFSDK_InterForm* pInterForm = m_pDocument->GetInterForm();
CPDF_InterForm* pPDFForm = pInterForm->GetInterForm();
- vp << (int)pPDFForm->CountFields();
+ vp << static_cast<int>(pPDFForm->CountFields(CFX_WideString()));
return TRUE;
}
@@ -337,7 +338,7 @@ FX_BOOL Document::getNthFieldName(IJS_Context* cc,
}
CPDFSDK_InterForm* pInterForm = m_pDocument->GetInterForm();
CPDF_InterForm* pPDFForm = pInterForm->GetInterForm();
- CPDF_FormField* pField = pPDFForm->GetField(nIndex);
+ CPDF_FormField* pField = pPDFForm->GetField(nIndex, CFX_WideString());
if (!pField)
return FALSE;
@@ -616,7 +617,6 @@ FX_BOOL Document::submitForm(IJS_Context* cc,
const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
-
int nSize = params.size();
if (nSize < 1) {
sError = JSGetStringFromID(IDS_STRING_JSPARAMERROR);
@@ -1234,7 +1234,6 @@ FX_BOOL Document::addIcon(IJS_Context* cc,
const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
-
if (params.size() != 2) {
sError = JSGetStringFromID(IDS_STRING_JSPARAMERROR);
return FALSE;