summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-11-11 10:11:18 -0800
committerLei Zhang <thestig@chromium.org>2015-11-11 10:11:18 -0800
commitf20a34c0f2dfca49f735a0f11147254c26831e7c (patch)
treedb3ee108eab6cd56a96990a74a9ba3d4bb82b112
parent56e3da27d8bed8a6c03274b7b946e3f6d6ac11f4 (diff)
downloadpdfium-f20a34c0f2dfca49f735a0f11147254c26831e7c.tar.xz
Replace CJS_Parameters with std::vector<CJS_Value>.
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1437713003 .
-rw-r--r--fpdfsdk/src/javascript/Document.cpp80
-rw-r--r--fpdfsdk/src/javascript/Document.h80
-rw-r--r--fpdfsdk/src/javascript/Field.cpp52
-rw-r--r--fpdfsdk/src/javascript/Field.h52
-rw-r--r--fpdfsdk/src/javascript/JS_Define.h12
-rw-r--r--fpdfsdk/src/javascript/JS_Value.h2
-rw-r--r--fpdfsdk/src/javascript/PublicMethods.cpp138
-rw-r--r--fpdfsdk/src/javascript/PublicMethods.h44
-rw-r--r--fpdfsdk/src/javascript/app.cpp42
-rw-r--r--fpdfsdk/src/javascript/app.h42
-rw-r--r--fpdfsdk/src/javascript/color.cpp4
-rw-r--r--fpdfsdk/src/javascript/color.h4
-rw-r--r--fpdfsdk/src/javascript/console.cpp8
-rw-r--r--fpdfsdk/src/javascript/console.h8
-rw-r--r--fpdfsdk/src/javascript/global.cpp2
-rw-r--r--fpdfsdk/src/javascript/global.h2
-rw-r--r--fpdfsdk/src/javascript/report.cpp4
-rw-r--r--fpdfsdk/src/javascript/report.h4
-rw-r--r--fpdfsdk/src/javascript/util.cpp10
-rw-r--r--fpdfsdk/src/javascript/util.h10
20 files changed, 306 insertions, 294 deletions
diff --git a/fpdfsdk/src/javascript/Document.cpp b/fpdfsdk/src/javascript/Document.cpp
index 2bd800af82..190bb20b24 100644
--- a/fpdfsdk/src/javascript/Document.cpp
+++ b/fpdfsdk/src/javascript/Document.cpp
@@ -256,7 +256,7 @@ FX_BOOL Document::pageNum(IJS_Context* cc,
}
FX_BOOL Document::addAnnot(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
// Not supported.
@@ -264,7 +264,7 @@ FX_BOOL Document::addAnnot(IJS_Context* cc,
}
FX_BOOL Document::addField(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
// Not supported.
@@ -272,7 +272,7 @@ FX_BOOL Document::addField(IJS_Context* cc,
}
FX_BOOL Document::exportAsText(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
// Unsafe, not supported.
@@ -280,7 +280,7 @@ FX_BOOL Document::exportAsText(IJS_Context* cc,
}
FX_BOOL Document::exportAsFDF(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
// Unsafe, not supported.
@@ -288,7 +288,7 @@ FX_BOOL Document::exportAsFDF(IJS_Context* cc,
}
FX_BOOL Document::exportAsXFDF(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
// Unsafe, not supported.
@@ -301,7 +301,7 @@ FX_BOOL Document::exportAsXFDF(IJS_Context* cc,
// valiable filed name in this document
FX_BOOL Document::getField(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
CJS_Context* pContext = (CJS_Context*)cc;
@@ -334,7 +334,7 @@ FX_BOOL Document::getField(IJS_Context* cc,
// Gets the name of the nth field in the document
FX_BOOL Document::getNthFieldName(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
CJS_Context* pContext = (CJS_Context*)cc;
@@ -360,7 +360,7 @@ FX_BOOL Document::getNthFieldName(IJS_Context* cc,
}
FX_BOOL Document::importAnFDF(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
// Unsafe, not supported.
@@ -368,7 +368,7 @@ FX_BOOL Document::importAnFDF(IJS_Context* cc,
}
FX_BOOL Document::importAnXFDF(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
// Unsafe, not supported.
@@ -376,7 +376,7 @@ FX_BOOL Document::importAnXFDF(IJS_Context* cc,
}
FX_BOOL Document::importTextData(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
// Unsafe, not supported.
@@ -391,7 +391,7 @@ FX_BOOL Document::importTextData(IJS_Context* cc,
// cbcc,string cSubject,string cms);
FX_BOOL Document::mailForm(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
ASSERT(m_pDocument != NULL);
@@ -432,7 +432,7 @@ FX_BOOL Document::mailForm(IJS_Context* cc,
}
FX_BOOL Document::print(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
FX_BOOL bUI = TRUE;
@@ -500,7 +500,7 @@ FX_BOOL Document::print(IJS_Context* cc,
// note: if the filed name is not retional, adobe is dumb for it.
FX_BOOL Document::removeField(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
ASSERT(m_pDocument != NULL);
@@ -553,7 +553,7 @@ FX_BOOL Document::removeField(IJS_Context* cc,
// note: if the fields names r not rational, aodbe is dumb for it.
FX_BOOL Document::resetForm(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
if (!(m_pDocument->GetPermissions(FPDFPERM_MODIFY) ||
@@ -600,7 +600,7 @@ FX_BOOL Document::resetForm(IJS_Context* cc,
}
FX_BOOL Document::saveAs(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
// Unsafe, not supported.
@@ -608,7 +608,7 @@ FX_BOOL Document::saveAs(IJS_Context* cc,
}
FX_BOOL Document::submitForm(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
CJS_Context* pContext = (CJS_Context*)cc;
@@ -716,7 +716,7 @@ FX_BOOL Document::bookmarkRoot(IJS_Context* cc,
}
FX_BOOL Document::mailDoc(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
FX_BOOL bUI = TRUE;
@@ -1210,14 +1210,14 @@ FX_BOOL Document::layout(IJS_Context* cc,
}
FX_BOOL Document::addLink(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
return TRUE;
}
FX_BOOL Document::closeDoc(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
ASSERT(m_pDocument != NULL);
@@ -1225,21 +1225,21 @@ FX_BOOL Document::closeDoc(IJS_Context* cc,
}
FX_BOOL Document::getPageBox(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
return TRUE;
}
FX_BOOL Document::getAnnot(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
return TRUE;
}
FX_BOOL Document::getAnnots(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
vRet.SetNull();
@@ -1247,7 +1247,7 @@ FX_BOOL Document::getAnnots(IJS_Context* cc,
}
FX_BOOL Document::getAnnot3D(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
vRet.SetNull();
@@ -1255,7 +1255,7 @@ FX_BOOL Document::getAnnot3D(IJS_Context* cc,
}
FX_BOOL Document::getAnnots3D(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
vRet = CJS_Value::VT_undefined;
@@ -1263,14 +1263,14 @@ FX_BOOL Document::getAnnots3D(IJS_Context* cc,
}
FX_BOOL Document::getOCGs(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
return TRUE;
}
FX_BOOL Document::getLinks(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
return TRUE;
@@ -1327,7 +1327,7 @@ IconElement* IconTree::operator[](int iIndex) {
}
FX_BOOL Document::addIcon(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
CJS_Context* pContext = (CJS_Context*)cc;
@@ -1410,7 +1410,7 @@ FX_BOOL Document::icons(IJS_Context* cc,
}
FX_BOOL Document::getIcon(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
CJS_Context* pContext = (CJS_Context*)cc;
@@ -1454,7 +1454,7 @@ FX_BOOL Document::getIcon(IJS_Context* cc,
}
FX_BOOL Document::removeIcon(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
// Unsafe, no supported.
@@ -1462,7 +1462,7 @@ FX_BOOL Document::removeIcon(IJS_Context* cc,
}
FX_BOOL Document::createDataObject(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
// Unsafe, not implemented.
@@ -1476,7 +1476,7 @@ FX_BOOL Document::media(IJS_Context* cc,
}
FX_BOOL Document::calculateNow(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
ASSERT(m_pDocument != NULL);
@@ -1500,7 +1500,7 @@ FX_BOOL Document::Collab(IJS_Context* cc,
}
FX_BOOL Document::getPageNthWord(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
ASSERT(m_pDocument != NULL);
@@ -1562,7 +1562,7 @@ FX_BOOL Document::getPageNthWord(IJS_Context* cc,
}
FX_BOOL Document::getPageNthWordQuads(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
ASSERT(m_pDocument != NULL);
@@ -1574,7 +1574,7 @@ FX_BOOL Document::getPageNthWordQuads(IJS_Context* cc,
}
FX_BOOL Document::getPageNumWords(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
ASSERT(m_pDocument != NULL);
@@ -1621,7 +1621,7 @@ FX_BOOL Document::getPageNumWords(IJS_Context* cc,
}
FX_BOOL Document::getPrintParams(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
CJS_Context* pContext = (CJS_Context*)cc;
@@ -1732,7 +1732,7 @@ FX_BOOL Document::zoomType(IJS_Context* cc,
}
FX_BOOL Document::deletePages(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
// Unsafe, no supported.
@@ -1740,7 +1740,7 @@ FX_BOOL Document::deletePages(IJS_Context* cc,
}
FX_BOOL Document::extractPages(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
// Unsafe, not supported.
@@ -1748,7 +1748,7 @@ FX_BOOL Document::extractPages(IJS_Context* cc,
}
FX_BOOL Document::insertPages(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
// Unsafe, not supported.
@@ -1756,7 +1756,7 @@ FX_BOOL Document::insertPages(IJS_Context* cc,
}
FX_BOOL Document::replacePages(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
// Unsafe, not supported.
@@ -1764,7 +1764,7 @@ FX_BOOL Document::replacePages(IJS_Context* cc,
}
FX_BOOL Document::getURL(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
// Unsafe, not supported.
diff --git a/fpdfsdk/src/javascript/Document.h b/fpdfsdk/src/javascript/Document.h
index 4e6fdee218..3e957a6057 100644
--- a/fpdfsdk/src/javascript/Document.h
+++ b/fpdfsdk/src/javascript/Document.h
@@ -113,163 +113,163 @@ class Document : public CJS_EmbedObj {
FX_BOOL zoomType(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
FX_BOOL addAnnot(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL addField(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL addLink(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL addIcon(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL calculateNow(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL closeDoc(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL createDataObject(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL deletePages(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL exportAsText(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL exportAsFDF(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL exportAsXFDF(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL extractPages(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL getAnnot(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL getAnnots(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL getAnnot3D(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL getAnnots3D(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL getField(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL getIcon(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL getLinks(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL getNthFieldName(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL getOCGs(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL getPageBox(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL getPageNthWord(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL getPageNthWordQuads(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL getPageNumWords(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL getPrintParams(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL getURL(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL importAnFDF(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL importAnXFDF(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL importTextData(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL insertPages(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL mailForm(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL print(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL removeField(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL replacePages(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL resetForm(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL saveAs(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL submitForm(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL mailDoc(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL removeIcon(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
diff --git a/fpdfsdk/src/javascript/Field.cpp b/fpdfsdk/src/javascript/Field.cpp
index 7cfaebcacf..9ab084feba 100644
--- a/fpdfsdk/src/javascript/Field.cpp
+++ b/fpdfsdk/src/javascript/Field.cpp
@@ -2989,7 +2989,7 @@ FX_BOOL Field::valueAsString(IJS_Context* cc,
*/
FX_BOOL Field::browseForFileToSubmit(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
ASSERT(m_pDocument != NULL);
@@ -3013,7 +3013,7 @@ FX_BOOL Field::browseForFileToSubmit(IJS_Context* cc,
}
FX_BOOL Field::buttonGetCaption(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
ASSERT(m_pDocument != NULL);
@@ -3048,7 +3048,7 @@ FX_BOOL Field::buttonGetCaption(IJS_Context* cc,
}
FX_BOOL Field::buttonGetIcon(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
ASSERT(m_pDocument != NULL);
@@ -3096,28 +3096,28 @@ FX_BOOL Field::buttonGetIcon(IJS_Context* cc,
}
FX_BOOL Field::buttonImportIcon(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
return TRUE;
}
FX_BOOL Field::buttonSetCaption(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
return FALSE;
}
FX_BOOL Field::buttonSetIcon(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
return FALSE;
}
FX_BOOL Field::checkThisBox(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
ASSERT(m_pDocument != NULL);
@@ -3155,14 +3155,14 @@ FX_BOOL Field::checkThisBox(IJS_Context* cc,
}
FX_BOOL Field::clearItems(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
return TRUE;
}
FX_BOOL Field::defaultIsChecked(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
ASSERT(m_pDocument != NULL);
@@ -3192,7 +3192,7 @@ FX_BOOL Field::defaultIsChecked(IJS_Context* cc,
}
FX_BOOL Field::deleteItemAt(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
return TRUE;
@@ -3206,7 +3206,7 @@ int JS_COMPARESTRING(CFX_WideString* ps1, CFX_WideString* ps2) {
}
FX_BOOL Field::getArray(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
ASSERT(m_pDocument != NULL);
@@ -3248,7 +3248,7 @@ FX_BOOL Field::getArray(IJS_Context* cc,
}
FX_BOOL Field::getItemAt(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
ASSERT(m_pDocument != NULL);
@@ -3288,21 +3288,21 @@ FX_BOOL Field::getItemAt(IJS_Context* cc,
}
FX_BOOL Field::getLock(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
return FALSE;
}
FX_BOOL Field::insertItemAt(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
return TRUE;
}
FX_BOOL Field::isBoxChecked(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
ASSERT(m_pDocument != NULL);
@@ -3335,7 +3335,7 @@ FX_BOOL Field::isBoxChecked(IJS_Context* cc,
}
FX_BOOL Field::isDefaultChecked(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
ASSERT(m_pDocument != NULL);
@@ -3367,14 +3367,14 @@ FX_BOOL Field::isDefaultChecked(IJS_Context* cc,
}
FX_BOOL Field::setAction(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
return TRUE;
}
FX_BOOL Field::setFocus(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
ASSERT(m_pDocument != NULL);
@@ -3423,56 +3423,56 @@ FX_BOOL Field::setFocus(IJS_Context* cc,
}
FX_BOOL Field::setItems(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
return TRUE;
}
FX_BOOL Field::setLock(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
return FALSE;
}
FX_BOOL Field::signatureGetModifications(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
return FALSE;
}
FX_BOOL Field::signatureGetSeedValue(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
return FALSE;
}
FX_BOOL Field::signatureInfo(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
return FALSE;
}
FX_BOOL Field::signatureSetSeedValue(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
return FALSE;
}
FX_BOOL Field::signatureSign(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
return FALSE;
}
FX_BOOL Field::signatureValidate(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
return FALSE;
diff --git a/fpdfsdk/src/javascript/Field.h b/fpdfsdk/src/javascript/Field.h
index d0ee490e80..4899ee2a96 100644
--- a/fpdfsdk/src/javascript/Field.h
+++ b/fpdfsdk/src/javascript/Field.h
@@ -188,107 +188,107 @@ class Field : public CJS_EmbedObj {
FX_BOOL source(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
FX_BOOL browseForFileToSubmit(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL buttonGetCaption(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL buttonGetIcon(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL buttonImportIcon(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL buttonSetCaption(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL buttonSetIcon(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL checkThisBox(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL clearItems(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL defaultIsChecked(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL deleteItemAt(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL getArray(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL getItemAt(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL getLock(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL insertItemAt(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL isBoxChecked(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL isDefaultChecked(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL setAction(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL setFocus(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL setItems(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL setLock(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL signatureGetModifications(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL signatureGetSeedValue(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL signatureInfo(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL signatureSetSeedValue(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL signatureSign(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL signatureValidate(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
diff --git a/fpdfsdk/src/javascript/JS_Define.h b/fpdfsdk/src/javascript/JS_Define.h
index 3ebd07518e..605439136e 100644
--- a/fpdfsdk/src/javascript/JS_Define.h
+++ b/fpdfsdk/src/javascript/JS_Define.h
@@ -136,7 +136,7 @@ void JSPropSetter(const char* prop_name_string,
template <class C,
FX_BOOL (C::*M)(IJS_Context*,
- const CJS_Parameters&,
+ const std::vector<CJS_Value>&,
CJS_Value&,
CFX_WideString&)>
void JSMethod(const char* method_name_string,
@@ -148,7 +148,7 @@ void JSMethod(const char* method_name_string,
if (!pRuntime)
return;
IJS_Context* pContext = pRuntime->GetCurrentContext();
- CJS_Parameters parameters;
+ std::vector<CJS_Value> parameters;
for (unsigned int i = 0; i < (unsigned int)info.Length(); i++) {
parameters.push_back(CJS_Value(pRuntime, info[i], CJS_Value::VT_unknown));
}
@@ -435,8 +435,10 @@ void JSSpecialPropDel(const char* class_name,
}
}
-template <FX_BOOL (
- *F)(IJS_Context*, const CJS_Parameters&, CJS_Value&, CFX_WideString&)>
+template <FX_BOOL (*F)(IJS_Context*,
+ const std::vector<CJS_Value>&,
+ CJS_Value&,
+ CFX_WideString&)>
void JSGlobalFunc(const char* func_name_string,
const v8::FunctionCallbackInfo<v8::Value>& info) {
CJS_Runtime* pRuntime =
@@ -444,7 +446,7 @@ void JSGlobalFunc(const char* func_name_string,
if (!pRuntime)
return;
IJS_Context* pContext = pRuntime->GetCurrentContext();
- CJS_Parameters parameters;
+ std::vector<CJS_Value> parameters;
for (unsigned int i = 0; i < (unsigned int)info.Length(); i++) {
parameters.push_back(CJS_Value(pRuntime, info[i], CJS_Value::VT_unknown));
}
diff --git a/fpdfsdk/src/javascript/JS_Value.h b/fpdfsdk/src/javascript/JS_Value.h
index 68e643e055..875ab18ca9 100644
--- a/fpdfsdk/src/javascript/JS_Value.h
+++ b/fpdfsdk/src/javascript/JS_Value.h
@@ -88,8 +88,6 @@ class CJS_Value {
CJS_Runtime* m_pJSRuntime;
};
-using CJS_Parameters = std::vector<CJS_Value>;
-
class CJS_PropValue : public CJS_Value {
public:
CJS_PropValue(const CJS_Value&);
diff --git a/fpdfsdk/src/javascript/PublicMethods.cpp b/fpdfsdk/src/javascript/PublicMethods.cpp
index 92b47666e2..66b08d20a8 100644
--- a/fpdfsdk/src/javascript/PublicMethods.cpp
+++ b/fpdfsdk/src/javascript/PublicMethods.cpp
@@ -911,7 +911,7 @@ CFX_WideString CJS_PublicMethods::MakeFormatDate(double dDate,
// function AFNumber_Format(nDec, sepStyle, negStyle, currStyle, strCurrency,
// bCurrencyPrepend)
FX_BOOL CJS_PublicMethods::AFNumber_Format(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
#if _FX_OS_ != _FX_ANDROID_
@@ -1089,10 +1089,11 @@ FX_BOOL CJS_PublicMethods::AFNumber_Format(IJS_Context* cc,
// function AFNumber_Keystroke(nDec, sepStyle, negStyle, currStyle, strCurrency,
// bCurrencyPrepend)
-FX_BOOL CJS_PublicMethods::AFNumber_Keystroke(IJS_Context* cc,
- const CJS_Parameters& params,
- CJS_Value& vRet,
- CFX_WideString& sError) {
+FX_BOOL CJS_PublicMethods::AFNumber_Keystroke(
+ IJS_Context* cc,
+ const std::vector<CJS_Value>& params,
+ CJS_Value& vRet,
+ CFX_WideString& sError) {
CJS_Context* pContext = (CJS_Context*)cc;
ASSERT(pContext != NULL);
CJS_EventHandler* pEvent = pContext->GetEventHandler();
@@ -1208,10 +1209,11 @@ FX_BOOL CJS_PublicMethods::AFNumber_Keystroke(IJS_Context* cc,
}
// function AFPercent_Format(nDec, sepStyle)
-FX_BOOL CJS_PublicMethods::AFPercent_Format(IJS_Context* cc,
- const CJS_Parameters& params,
- CJS_Value& vRet,
- CFX_WideString& sError) {
+FX_BOOL CJS_PublicMethods::AFPercent_Format(
+ IJS_Context* cc,
+ const std::vector<CJS_Value>& params,
+ CJS_Value& vRet,
+ CFX_WideString& sError) {
#if _FX_OS_ != _FX_ANDROID_
CJS_Context* pContext = (CJS_Context*)cc;
ASSERT(pContext != NULL);
@@ -1302,16 +1304,17 @@ FX_BOOL CJS_PublicMethods::AFPercent_Format(IJS_Context* cc,
return TRUE;
}
// AFPercent_Keystroke(nDec, sepStyle)
-FX_BOOL CJS_PublicMethods::AFPercent_Keystroke(IJS_Context* cc,
- const CJS_Parameters& params,
- CJS_Value& vRet,
- CFX_WideString& sError) {
+FX_BOOL CJS_PublicMethods::AFPercent_Keystroke(
+ IJS_Context* cc,
+ const std::vector<CJS_Value>& params,
+ CJS_Value& vRet,
+ CFX_WideString& sError) {
return AFNumber_Keystroke(cc, params, vRet, sError);
}
// function AFDate_FormatEx(cFormat)
FX_BOOL CJS_PublicMethods::AFDate_FormatEx(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
CJS_Context* pContext = (CJS_Context*)cc;
@@ -1426,10 +1429,11 @@ double CJS_PublicMethods::MakeInterDate(CFX_WideString strValue) {
}
// AFDate_KeystrokeEx(cFormat)
-FX_BOOL CJS_PublicMethods::AFDate_KeystrokeEx(IJS_Context* cc,
- const CJS_Parameters& params,
- CJS_Value& vRet,
- CFX_WideString& sError) {
+FX_BOOL CJS_PublicMethods::AFDate_KeystrokeEx(
+ IJS_Context* cc,
+ const std::vector<CJS_Value>& params,
+ CJS_Value& vRet,
+ CFX_WideString& sError) {
CJS_Context* pContext = (CJS_Context*)cc;
ASSERT(pContext != NULL);
CJS_EventHandler* pEvent = pContext->GetEventHandler();
@@ -1463,7 +1467,7 @@ FX_BOOL CJS_PublicMethods::AFDate_KeystrokeEx(IJS_Context* cc,
}
FX_BOOL CJS_PublicMethods::AFDate_Format(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
CJS_Context* pContext = (CJS_Context*)cc;
@@ -1491,17 +1495,18 @@ FX_BOOL CJS_PublicMethods::AFDate_Format(IJS_Context* cc,
if (iIndex < 0 || (static_cast<size_t>(iIndex) >= FX_ArraySize(cFormats)))
iIndex = 0;
- CJS_Parameters newParams;
+ std::vector<CJS_Value> newParams;
newParams.push_back(
CJS_Value(CJS_Runtime::FromContext(cc), cFormats[iIndex]));
return AFDate_FormatEx(cc, newParams, vRet, sError);
}
// AFDate_KeystrokeEx(cFormat)
-FX_BOOL CJS_PublicMethods::AFDate_Keystroke(IJS_Context* cc,
- const CJS_Parameters& params,
- CJS_Value& vRet,
- CFX_WideString& sError) {
+FX_BOOL CJS_PublicMethods::AFDate_Keystroke(
+ IJS_Context* cc,
+ const std::vector<CJS_Value>& params,
+ CJS_Value& vRet,
+ CFX_WideString& sError) {
CJS_Context* pContext = (CJS_Context*)cc;
if (params.size() != 1) {
sError = JSGetStringFromID(pContext, IDS_STRING_JSPARAMERROR);
@@ -1527,7 +1532,7 @@ FX_BOOL CJS_PublicMethods::AFDate_Keystroke(IJS_Context* cc,
if (iIndex < 0 || (static_cast<size_t>(iIndex) >= FX_ArraySize(cFormats)))
iIndex = 0;
- CJS_Parameters newParams;
+ std::vector<CJS_Value> newParams;
newParams.push_back(
CJS_Value(CJS_Runtime::FromContext(cc), cFormats[iIndex]));
return AFDate_KeystrokeEx(cc, newParams, vRet, sError);
@@ -1535,7 +1540,7 @@ FX_BOOL CJS_PublicMethods::AFDate_Keystroke(IJS_Context* cc,
// function AFTime_Format(ptf)
FX_BOOL CJS_PublicMethods::AFTime_Format(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
CJS_Context* pContext = (CJS_Context*)cc;
@@ -1551,16 +1556,17 @@ FX_BOOL CJS_PublicMethods::AFTime_Format(IJS_Context* cc,
if (iIndex < 0 || (static_cast<size_t>(iIndex) >= FX_ArraySize(cFormats)))
iIndex = 0;
- CJS_Parameters newParams;
+ std::vector<CJS_Value> newParams;
newParams.push_back(
CJS_Value(CJS_Runtime::FromContext(cc), cFormats[iIndex]));
return AFDate_FormatEx(cc, newParams, vRet, sError);
}
-FX_BOOL CJS_PublicMethods::AFTime_Keystroke(IJS_Context* cc,
- const CJS_Parameters& params,
- CJS_Value& vRet,
- CFX_WideString& sError) {
+FX_BOOL CJS_PublicMethods::AFTime_Keystroke(
+ IJS_Context* cc,
+ const std::vector<CJS_Value>& params,
+ CJS_Value& vRet,
+ CFX_WideString& sError) {
CJS_Context* pContext = (CJS_Context*)cc;
if (params.size() != 1) {
sError = JSGetStringFromID(pContext, IDS_STRING_JSPARAMERROR);
@@ -1574,31 +1580,33 @@ FX_BOOL CJS_PublicMethods::AFTime_Keystroke(IJS_Context* cc,
if (iIndex < 0 || (static_cast<size_t>(iIndex) >= FX_ArraySize(cFormats)))
iIndex = 0;
- CJS_Parameters newParams;
+ std::vector<CJS_Value> newParams;
newParams.push_back(
CJS_Value(CJS_Runtime::FromContext(cc), cFormats[iIndex]));
return AFDate_KeystrokeEx(cc, newParams, vRet, sError);
}
FX_BOOL CJS_PublicMethods::AFTime_FormatEx(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
return AFDate_FormatEx(cc, params, vRet, sError);
}
-FX_BOOL CJS_PublicMethods::AFTime_KeystrokeEx(IJS_Context* cc,
- const CJS_Parameters& params,
- CJS_Value& vRet,
- CFX_WideString& sError) {
+FX_BOOL CJS_PublicMethods::AFTime_KeystrokeEx(
+ IJS_Context* cc,
+ const std::vector<CJS_Value>& params,
+ CJS_Value& vRet,
+ CFX_WideString& sError) {
return AFDate_KeystrokeEx(cc, params, vRet, sError);
}
// function AFSpecial_Format(psf)
-FX_BOOL CJS_PublicMethods::AFSpecial_Format(IJS_Context* cc,
- const CJS_Parameters& params,
- CJS_Value& vRet,
- CFX_WideString& sError) {
+FX_BOOL CJS_PublicMethods::AFSpecial_Format(
+ IJS_Context* cc,
+ const std::vector<CJS_Value>& params,
+ CJS_Value& vRet,
+ CFX_WideString& sError) {
CJS_Context* pContext = (CJS_Context*)cc;
ASSERT(pContext != NULL);
@@ -1646,10 +1654,11 @@ FX_BOOL CJS_PublicMethods::AFSpecial_Format(IJS_Context* cc,
}
// function AFSpecial_KeystrokeEx(mask)
-FX_BOOL CJS_PublicMethods::AFSpecial_KeystrokeEx(IJS_Context* cc,
- const CJS_Parameters& params,
- CJS_Value& vRet,
- CFX_WideString& sError) {
+FX_BOOL CJS_PublicMethods::AFSpecial_KeystrokeEx(
+ IJS_Context* cc,
+ const std::vector<CJS_Value>& params,
+ CJS_Value& vRet,
+ CFX_WideString& sError) {
CJS_Context* pContext = (CJS_Context*)cc;
ASSERT(pContext != NULL);
CJS_EventHandler* pEvent = pContext->GetEventHandler();
@@ -1739,10 +1748,11 @@ FX_BOOL CJS_PublicMethods::AFSpecial_KeystrokeEx(IJS_Context* cc,
}
// function AFSpecial_Keystroke(psf)
-FX_BOOL CJS_PublicMethods::AFSpecial_Keystroke(IJS_Context* cc,
- const CJS_Parameters& params,
- CJS_Value& vRet,
- CFX_WideString& sError) {
+FX_BOOL CJS_PublicMethods::AFSpecial_Keystroke(
+ IJS_Context* cc,
+ const std::vector<CJS_Value>& params,
+ CJS_Value& vRet,
+ CFX_WideString& sError) {
CJS_Context* pContext = (CJS_Context*)cc;
if (params.size() != 1) {
sError = JSGetStringFromID(pContext, IDS_STRING_JSPARAMERROR);
@@ -1784,13 +1794,13 @@ FX_BOOL CJS_PublicMethods::AFSpecial_Keystroke(IJS_Context* cc,
break;
}
- CJS_Parameters params2;
+ std::vector<CJS_Value> params2;
params2.push_back(CJS_Value(CJS_Runtime::FromContext(cc), cFormat.c_str()));
return AFSpecial_KeystrokeEx(cc, params2, vRet, sError);
}
FX_BOOL CJS_PublicMethods::AFMergeChange(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
CJS_Context* pContext = (CJS_Context*)cc;
@@ -1832,7 +1842,7 @@ FX_BOOL CJS_PublicMethods::AFMergeChange(IJS_Context* cc,
}
FX_BOOL CJS_PublicMethods::AFParseDateEx(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
CJS_Context* pContext = (CJS_Context*)cc;
@@ -1862,7 +1872,7 @@ FX_BOOL CJS_PublicMethods::AFParseDateEx(IJS_Context* cc,
}
FX_BOOL CJS_PublicMethods::AFSimple(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
if (params.size() != 3) {
@@ -1879,7 +1889,7 @@ FX_BOOL CJS_PublicMethods::AFSimple(IJS_Context* cc,
}
FX_BOOL CJS_PublicMethods::AFMakeNumber(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
if (params.size() != 1) {
@@ -1893,10 +1903,11 @@ FX_BOOL CJS_PublicMethods::AFMakeNumber(IJS_Context* cc,
return TRUE;
}
-FX_BOOL CJS_PublicMethods::AFSimple_Calculate(IJS_Context* cc,
- const CJS_Parameters& params,
- CJS_Value& vRet,
- CFX_WideString& sError) {
+FX_BOOL CJS_PublicMethods::AFSimple_Calculate(
+ IJS_Context* cc,
+ const std::vector<CJS_Value>& params,
+ CJS_Value& vRet,
+ CFX_WideString& sError) {
CJS_Context* pContext = (CJS_Context*)cc;
if (params.size() != 2) {
sError = JSGetStringFromID(pContext, IDS_STRING_JSPARAMERROR);
@@ -1993,10 +2004,11 @@ FX_BOOL CJS_PublicMethods::AFSimple_Calculate(IJS_Context* cc,
/* This function validates the current event to ensure that its value is
** within the specified range. */
-FX_BOOL CJS_PublicMethods::AFRange_Validate(IJS_Context* cc,
- const CJS_Parameters& params,
- CJS_Value& vRet,
- CFX_WideString& sError) {
+FX_BOOL CJS_PublicMethods::AFRange_Validate(
+ IJS_Context* cc,
+ const std::vector<CJS_Value>& params,
+ CJS_Value& vRet,
+ CFX_WideString& sError) {
CJS_Context* pContext = (CJS_Context*)cc;
ASSERT(pContext != NULL);
CJS_EventHandler* pEvent = pContext->GetEventHandler();
@@ -2041,7 +2053,7 @@ FX_BOOL CJS_PublicMethods::AFRange_Validate(IJS_Context* cc,
}
FX_BOOL CJS_PublicMethods::AFExtractNums(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
CJS_Context* pContext = (CJS_Context*)cc;
diff --git a/fpdfsdk/src/javascript/PublicMethods.h b/fpdfsdk/src/javascript/PublicMethods.h
index f328c15400..80465035ea 100644
--- a/fpdfsdk/src/javascript/PublicMethods.h
+++ b/fpdfsdk/src/javascript/PublicMethods.h
@@ -16,91 +16,91 @@ class CJS_PublicMethods : public CJS_Object {
public:
static FX_BOOL AFNumber_Format(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
static FX_BOOL AFNumber_Keystroke(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
static FX_BOOL AFPercent_Format(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
static FX_BOOL AFPercent_Keystroke(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
static FX_BOOL AFDate_FormatEx(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
static FX_BOOL AFDate_KeystrokeEx(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
static FX_BOOL AFDate_Format(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
static FX_BOOL AFDate_Keystroke(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
static FX_BOOL AFTime_FormatEx(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError); //
static FX_BOOL AFTime_KeystrokeEx(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
static FX_BOOL AFTime_Format(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
static FX_BOOL AFTime_Keystroke(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
static FX_BOOL AFSpecial_Format(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
static FX_BOOL AFSpecial_Keystroke(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
static FX_BOOL AFSpecial_KeystrokeEx(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError); //
static FX_BOOL AFSimple(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
static FX_BOOL AFMakeNumber(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
static FX_BOOL AFSimple_Calculate(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
static FX_BOOL AFRange_Validate(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
static FX_BOOL AFMergeChange(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
static FX_BOOL AFParseDateEx(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
static FX_BOOL AFExtractNums(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
diff --git a/fpdfsdk/src/javascript/app.cpp b/fpdfsdk/src/javascript/app.cpp
index d223934bbd..072e31f7df 100644
--- a/fpdfsdk/src/javascript/app.cpp
+++ b/fpdfsdk/src/javascript/app.cpp
@@ -228,7 +228,7 @@ FX_BOOL app::language(IJS_Context* cc,
// note:
// CFDF_Document * CPDFDoc_Environment::NewFDF();
FX_BOOL app::newFDF(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
return TRUE;
@@ -240,14 +240,14 @@ FX_BOOL app::newFDF(IJS_Context* cc,
// CFDF_Document * CPDFDoc_Environment::OpenFDF(string strPath,bool bUserConv);
FX_BOOL app::openFDF(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
return TRUE;
}
FX_BOOL app::alert(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
int iSize = params.size();
@@ -342,7 +342,7 @@ FX_BOOL app::alert(IJS_Context* cc,
}
FX_BOOL app::beep(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
if (params.size() == 1) {
@@ -358,14 +358,14 @@ FX_BOOL app::beep(IJS_Context* cc,
}
FX_BOOL app::findComponent(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
return TRUE;
}
FX_BOOL app::popUpMenuEx(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
return FALSE;
@@ -376,7 +376,7 @@ FX_BOOL app::fs(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) {
}
FX_BOOL app::setInterval(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
CJS_Context* pContext = (CJS_Context*)cc;
@@ -412,7 +412,7 @@ FX_BOOL app::setInterval(IJS_Context* cc,
}
FX_BOOL app::setTimeOut(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
if (params.size() > 2 || params.size() == 0) {
@@ -453,7 +453,7 @@ FX_BOOL app::setTimeOut(IJS_Context* cc,
}
FX_BOOL app::clearTimeOut(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
CJS_Context* pContext = (CJS_Context*)cc;
@@ -489,7 +489,7 @@ FX_BOOL app::clearTimeOut(IJS_Context* cc,
}
FX_BOOL app::clearInterval(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
CJS_Context* pContext = (CJS_Context*)cc;
@@ -525,7 +525,7 @@ FX_BOOL app::clearInterval(IJS_Context* cc,
}
FX_BOOL app::execMenuItem(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
return FALSE;
@@ -562,7 +562,7 @@ void app::RunJsScript(CJS_Runtime* pRuntime, const CFX_WideString& wsScript) {
}
FX_BOOL app::goBack(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
// Not supported.
@@ -570,7 +570,7 @@ FX_BOOL app::goBack(IJS_Context* cc,
}
FX_BOOL app::goForward(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
// Not supported.
@@ -578,7 +578,7 @@ FX_BOOL app::goForward(IJS_Context* cc,
}
FX_BOOL app::mailMsg(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
if (params.size() < 1)
@@ -645,7 +645,7 @@ FX_BOOL app::mailMsg(IJS_Context* cc,
}
FX_BOOL app::launchURL(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
// Unsafe, not supported.
@@ -671,14 +671,14 @@ FX_BOOL app::fullscreen(IJS_Context* cc,
}
FX_BOOL app::popUpMenu(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
return FALSE;
}
FX_BOOL app::browseForDoc(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
// Unsafe, not supported.
@@ -704,21 +704,21 @@ CFX_WideString app::SysPathToPDFPath(const CFX_WideString& sOldPath) {
}
FX_BOOL app::newDoc(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
return FALSE;
}
FX_BOOL app::openDoc(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
return FALSE;
}
FX_BOOL app::response(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
CFX_WideString swQuestion = L"";
@@ -803,7 +803,7 @@ FX_BOOL app::media(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) {
}
FX_BOOL app::execDialog(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
return TRUE;
diff --git a/fpdfsdk/src/javascript/app.h b/fpdfsdk/src/javascript/app.h
index 59f5050911..1eef13e7bb 100644
--- a/fpdfsdk/src/javascript/app.h
+++ b/fpdfsdk/src/javascript/app.h
@@ -70,87 +70,87 @@ class app : public CJS_EmbedObj {
CFX_WideString& sError);
FX_BOOL alert(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL beep(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL browseForDoc(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL clearInterval(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL clearTimeOut(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL execDialog(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL execMenuItem(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL findComponent(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL goBack(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL goForward(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL launchURL(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL mailMsg(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL newFDF(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL newDoc(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL openDoc(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL openFDF(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL popUpMenuEx(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL popUpMenu(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL response(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL setInterval(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL setTimeOut(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
diff --git a/fpdfsdk/src/javascript/color.cpp b/fpdfsdk/src/javascript/color.cpp
index 515548e1ac..d00ac70e80 100644
--- a/fpdfsdk/src/javascript/color.cpp
+++ b/fpdfsdk/src/javascript/color.cpp
@@ -160,7 +160,7 @@ JS_IMPLEMENT_COLORPROP(gray, m_crGray)
JS_IMPLEMENT_COLORPROP(ltGray, m_crLTGray)
FX_BOOL color::convert(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
int iSize = params.size();
@@ -198,7 +198,7 @@ FX_BOOL color::convert(IJS_Context* cc,
}
FX_BOOL color::equal(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
if (params.size() < 2)
diff --git a/fpdfsdk/src/javascript/color.h b/fpdfsdk/src/javascript/color.h
index 3a6356ae75..360f66709c 100644
--- a/fpdfsdk/src/javascript/color.h
+++ b/fpdfsdk/src/javascript/color.h
@@ -31,11 +31,11 @@ class color : public CJS_EmbedObj {
FX_BOOL yellow(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
FX_BOOL convert(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL equal(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
diff --git a/fpdfsdk/src/javascript/console.cpp b/fpdfsdk/src/javascript/console.cpp
index ebd7162650..f8dbd527d8 100644
--- a/fpdfsdk/src/javascript/console.cpp
+++ b/fpdfsdk/src/javascript/console.cpp
@@ -35,21 +35,21 @@ console::console(CJS_Object* pJSObject) : CJS_EmbedObj(pJSObject) {}
console::~console() {}
FX_BOOL console::clear(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
return TRUE;
}
FX_BOOL console::hide(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
return TRUE;
}
FX_BOOL console::println(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
if (params.size() < 1) {
@@ -59,7 +59,7 @@ FX_BOOL console::println(IJS_Context* cc,
}
FX_BOOL console::show(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
return TRUE;
diff --git a/fpdfsdk/src/javascript/console.h b/fpdfsdk/src/javascript/console.h
index 535fe9e94e..f4901045e4 100644
--- a/fpdfsdk/src/javascript/console.h
+++ b/fpdfsdk/src/javascript/console.h
@@ -16,19 +16,19 @@ class console : public CJS_EmbedObj {
public:
FX_BOOL clear(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL hide(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL println(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL show(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
};
diff --git a/fpdfsdk/src/javascript/global.cpp b/fpdfsdk/src/javascript/global.cpp
index 84af76a3de..f7c71e88b1 100644
--- a/fpdfsdk/src/javascript/global.cpp
+++ b/fpdfsdk/src/javascript/global.cpp
@@ -204,7 +204,7 @@ FX_BOOL JSGlobalAlternate::DoProperty(IJS_Context* cc,
}
FX_BOOL JSGlobalAlternate::setPersistent(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
CJS_Context* pContext = static_cast<CJS_Context*>(cc);
diff --git a/fpdfsdk/src/javascript/global.h b/fpdfsdk/src/javascript/global.h
index 174e63a760..6d2f632645 100644
--- a/fpdfsdk/src/javascript/global.h
+++ b/fpdfsdk/src/javascript/global.h
@@ -41,7 +41,7 @@ class JSGlobalAlternate : public CJS_EmbedObj {
~JSGlobalAlternate() override;
FX_BOOL setPersistent(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL QueryProperty(const FX_WCHAR* propname);
diff --git a/fpdfsdk/src/javascript/report.cpp b/fpdfsdk/src/javascript/report.cpp
index 269a038319..40fb682fbe 100644
--- a/fpdfsdk/src/javascript/report.cpp
+++ b/fpdfsdk/src/javascript/report.cpp
@@ -31,7 +31,7 @@ Report::Report(CJS_Object* pJSObject) : CJS_EmbedObj(pJSObject) {}
Report::~Report() {}
FX_BOOL Report::writeText(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
// Unsafe, not supported.
@@ -39,7 +39,7 @@ FX_BOOL Report::writeText(IJS_Context* cc,
}
FX_BOOL Report::save(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
// Unsafe, not supported.
diff --git a/fpdfsdk/src/javascript/report.h b/fpdfsdk/src/javascript/report.h
index 51b1c78303..36d1f686f1 100644
--- a/fpdfsdk/src/javascript/report.h
+++ b/fpdfsdk/src/javascript/report.h
@@ -16,11 +16,11 @@ class Report : public CJS_EmbedObj {
public:
FX_BOOL save(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL writeText(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
};
diff --git a/fpdfsdk/src/javascript/util.cpp b/fpdfsdk/src/javascript/util.cpp
index 14e15c1b6f..2c28cc55e3 100644
--- a/fpdfsdk/src/javascript/util.cpp
+++ b/fpdfsdk/src/javascript/util.cpp
@@ -115,7 +115,7 @@ int util::ParstDataType(std::wstring* sFormat) {
}
FX_BOOL util::printf(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
int iSize = params.size();
@@ -178,7 +178,7 @@ FX_BOOL util::printf(IJS_Context* cc,
}
FX_BOOL util::printd(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
int iSize = params.size();
@@ -390,7 +390,7 @@ void util::printd(const std::wstring& cFormat2,
}
FX_BOOL util::printx(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
int iSize = params.size();
@@ -490,7 +490,7 @@ void util::printx(const std::string& cFormat,
}
FX_BOOL util::scand(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
int iSize = params.size();
@@ -539,7 +539,7 @@ int64_t FX_atoi64(const char* nptr) {
}
FX_BOOL util::byteToChar(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
int iSize = params.size();
diff --git a/fpdfsdk/src/javascript/util.h b/fpdfsdk/src/javascript/util.h
index 1affeac8ad..7b9a18c878 100644
--- a/fpdfsdk/src/javascript/util.h
+++ b/fpdfsdk/src/javascript/util.h
@@ -18,23 +18,23 @@ class util : public CJS_EmbedObj {
public:
FX_BOOL printd(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL printf(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL printx(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL scand(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
FX_BOOL byteToChar(IJS_Context* cc,
- const CJS_Parameters& params,
+ const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);