summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/javascript/Document.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-11-11 10:16:52 -0800
committerLei Zhang <thestig@chromium.org>2015-11-11 10:16:52 -0800
commitdd734def34bc31be370b168267ccba9705c7fc1b (patch)
treed486a83c2bfc7720bd6df0d823fd80bab567810e /fpdfsdk/src/javascript/Document.cpp
parent4231e56531dc48d910b9e66dcbe6cde78df35c39 (diff)
downloadpdfium-dd734def34bc31be370b168267ccba9705c7fc1b.tar.xz
Merge to XFA: Cleanup CPDF_ApSettings and CJS_Parameters.
TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1432863004 . (cherry picked from commit 56e3da27d8bed8a6c03274b7b946e3f6d6ac11f4) Review URL: https://codereview.chromium.org/1436843003 .
Diffstat (limited to 'fpdfsdk/src/javascript/Document.cpp')
-rw-r--r--fpdfsdk/src/javascript/Document.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/fpdfsdk/src/javascript/Document.cpp b/fpdfsdk/src/javascript/Document.cpp
index 43d2504150..a88c97c274 100644
--- a/fpdfsdk/src/javascript/Document.cpp
+++ b/fpdfsdk/src/javascript/Document.cpp
@@ -567,8 +567,7 @@ FX_BOOL Document::resetForm(IJS_Context* cc,
CJS_Runtime* pRuntime = CJS_Runtime::FromContext(cc);
CJS_Array aName(pRuntime);
- // TODO(thestig) Convert CJS_Parameters to a std::vector and use .empty().
- if (params.size() <= 0) {
+ if (params.empty()) {
pPDFForm->ResetForm(TRUE);
m_pDocument->SetChangeMark();
return TRUE;
@@ -1522,9 +1521,9 @@ FX_BOOL Document::getPageNthWord(IJS_Context* cc,
if (!m_pDocument->GetPermissions(FPDFPERM_EXTRACT_ACCESS))
return FALSE;
- int nPageNo = params.GetSize() > 0 ? params[0].ToInt() : 0;
- int nWordNo = params.GetSize() > 1 ? params[1].ToInt() : 0;
- bool bStrip = params.GetSize() > 2 ? params[2].ToBool() : true;
+ int nPageNo = params.size() > 0 ? params[0].ToInt() : 0;
+ int nWordNo = params.size() > 1 ? params[1].ToInt() : 0;
+ bool bStrip = params.size() > 2 ? params[2].ToBool() : true;
CPDF_Document* pDocument = m_pDocument->GetDocument()->GetPDFDoc();
if (!pDocument)
@@ -1596,7 +1595,7 @@ FX_BOOL Document::getPageNumWords(IJS_Context* cc,
if (!m_pDocument->GetPermissions(FPDFPERM_EXTRACT_ACCESS))
return FALSE;
- int nPageNo = params.GetSize() > 0 ? params[0].ToInt() : 0;
+ int nPageNo = params.size() > 0 ? params[0].ToInt() : 0;
CPDF_Document* pDocument = m_pDocument->GetDocument()->GetPDFDoc();
ASSERT(pDocument != NULL);