summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fpdfsdk/javascript/Document.cpp8
-rw-r--r--fpdfsdk/javascript/Document.h5
-rw-r--r--testing/resources/javascript/document_methods.in1
-rw-r--r--testing/resources/javascript/document_methods_expected.txt3
4 files changed, 17 insertions, 0 deletions
diff --git a/fpdfsdk/javascript/Document.cpp b/fpdfsdk/javascript/Document.cpp
index 8fb07b085b..8fb9ce60dc 100644
--- a/fpdfsdk/javascript/Document.cpp
+++ b/fpdfsdk/javascript/Document.cpp
@@ -137,6 +137,7 @@ JS_STATIC_METHOD_ENTRY(resetForm)
JS_STATIC_METHOD_ENTRY(removeIcon)
JS_STATIC_METHOD_ENTRY(saveAs)
JS_STATIC_METHOD_ENTRY(submitForm)
+JS_STATIC_METHOD_ENTRY(syncAnnotScan)
JS_STATIC_METHOD_ENTRY(mailDoc)
END_JS_STATIC_METHOD()
@@ -569,6 +570,13 @@ FX_BOOL Document::saveAs(IJS_Context* cc,
return TRUE;
}
+FX_BOOL Document::syncAnnotScan(IJS_Context* cc,
+ const std::vector<CJS_Value>& params,
+ CJS_Value& vRet,
+ CFX_WideString& sError) {
+ return TRUE;
+}
+
FX_BOOL Document::submitForm(IJS_Context* cc,
const std::vector<CJS_Value>& params,
CJS_Value& vRet,
diff --git a/fpdfsdk/javascript/Document.h b/fpdfsdk/javascript/Document.h
index 1c20ac4221..feef228c6e 100644
--- a/fpdfsdk/javascript/Document.h
+++ b/fpdfsdk/javascript/Document.h
@@ -255,6 +255,10 @@ class Document : public CJS_EmbedObj {
const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError);
+ FX_BOOL syncAnnotScan(IJS_Context* cc,
+ const std::vector<CJS_Value>& params,
+ CJS_Value& vRet,
+ CFX_WideString& sError);
FX_BOOL mailDoc(IJS_Context* cc,
const std::vector<CJS_Value>& params,
CJS_Value& vRet,
@@ -371,6 +375,7 @@ class CJS_Document : public CJS_Object {
JS_STATIC_METHOD(resetForm, Document);
JS_STATIC_METHOD(saveAs, Document);
JS_STATIC_METHOD(submitForm, Document);
+ JS_STATIC_METHOD(syncAnnotScan, Document);
JS_STATIC_METHOD(mailDoc, Document);
};
diff --git a/testing/resources/javascript/document_methods.in b/testing/resources/javascript/document_methods.in
index bc0f3f1126..cdbd6845c8 100644
--- a/testing/resources/javascript/document_methods.in
+++ b/testing/resources/javascript/document_methods.in
@@ -314,6 +314,7 @@ try {
testUnsupported('this.removeIcon');
testUnsupported('this.replacePages');
testUnsupported('this.saveAs');
+ testUnsupported('this.syncAnnotScan');
app.alert('*** Testing Supported Methods ***');
testAddIcon();
diff --git a/testing/resources/javascript/document_methods_expected.txt b/testing/resources/javascript/document_methods_expected.txt
index ed601f279b..70a7481708 100644
--- a/testing/resources/javascript/document_methods_expected.txt
+++ b/testing/resources/javascript/document_methods_expected.txt
@@ -68,6 +68,9 @@ Alert: PASS: this.replacePages(1, 2, "clams", [1, 2, 3]) = undefined
Alert: PASS: typeof this.saveAs = function
Alert: PASS: this.saveAs() = undefined
Alert: PASS: this.saveAs(1, 2, "clams", [1, 2, 3]) = undefined
+Alert: PASS: typeof this.syncAnnotScan = function
+Alert: PASS: this.syncAnnotScan() = undefined
+Alert: PASS: this.syncAnnotScan(1, 2, "clams", [1, 2, 3]) = undefined
Alert: *** Testing Supported Methods ***
Alert: PASS: typeof this.addIcon = function
Alert: PASS: this.addIcon() threw error Document.addIcon: Incorrect number of parameters passed to function.