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

Side by Side Diff: fpdfsdk/javascript/Document.h

Issue 2453683011: Remove FX_BOOL from fpdfsdk. (Closed)
Patch Set: Regenerate patch after rebase. Created 4 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « fpdfsdk/javascript/Annot.cpp ('k') | fpdfsdk/javascript/Document.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #ifndef FPDFSDK_JAVASCRIPT_DOCUMENT_H_ 7 #ifndef FPDFSDK_JAVASCRIPT_DOCUMENT_H_
8 #define FPDFSDK_JAVASCRIPT_DOCUMENT_H_ 8 #define FPDFSDK_JAVASCRIPT_DOCUMENT_H_
9 9
10 #include <list> 10 #include <list>
11 #include <memory> 11 #include <memory>
12 #include <vector> 12 #include <vector>
13 13
14 #include "core/fpdfapi/page/cpdf_pageobject.h" 14 #include "core/fpdfapi/page/cpdf_pageobject.h"
15 #include "core/fpdfapi/page/cpdf_textobject.h" 15 #include "core/fpdfapi/page/cpdf_textobject.h"
16 #include "fpdfsdk/cpdfsdk_formfillenvironment.h" 16 #include "fpdfsdk/cpdfsdk_formfillenvironment.h"
17 #include "fpdfsdk/javascript/JS_Define.h" 17 #include "fpdfsdk/javascript/JS_Define.h"
18 18
19 class PrintParamsObj : public CJS_EmbedObj { 19 class PrintParamsObj : public CJS_EmbedObj {
20 public: 20 public:
21 explicit PrintParamsObj(CJS_Object* pJSObject); 21 explicit PrintParamsObj(CJS_Object* pJSObject);
22 ~PrintParamsObj() override {} 22 ~PrintParamsObj() override {}
23 23
24 public: 24 public:
25 FX_BOOL bUI; 25 bool bUI;
26 int nStart; 26 int nStart;
27 int nEnd; 27 int nEnd;
28 FX_BOOL bSilent; 28 bool bSilent;
29 FX_BOOL bShrinkToFit; 29 bool bShrinkToFit;
30 FX_BOOL bPrintAsImage; 30 bool bPrintAsImage;
31 FX_BOOL bReverse; 31 bool bReverse;
32 FX_BOOL bAnnotations; 32 bool bAnnotations;
33 }; 33 };
34 34
35 class CJS_PrintParamsObj : public CJS_Object { 35 class CJS_PrintParamsObj : public CJS_Object {
36 public: 36 public:
37 explicit CJS_PrintParamsObj(v8::Local<v8::Object> pObject) 37 explicit CJS_PrintParamsObj(v8::Local<v8::Object> pObject)
38 : CJS_Object(pObject) {} 38 : CJS_Object(pObject) {}
39 ~CJS_PrintParamsObj() override {} 39 ~CJS_PrintParamsObj() override {}
40 40
41 DECLARE_JS_CLASS(); 41 DECLARE_JS_CLASS();
42 }; 42 };
(...skipping 11 matching lines...) Expand all
54 54
55 struct CJS_DelayData; 55 struct CJS_DelayData;
56 struct CJS_DelayAnnot; 56 struct CJS_DelayAnnot;
57 struct CJS_AnnotObj; 57 struct CJS_AnnotObj;
58 58
59 class Document : public CJS_EmbedObj { 59 class Document : public CJS_EmbedObj {
60 public: 60 public:
61 explicit Document(CJS_Object* pJSObject); 61 explicit Document(CJS_Object* pJSObject);
62 ~Document() override; 62 ~Document() override;
63 63
64 FX_BOOL ADBE(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); 64 bool ADBE(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
65 FX_BOOL author(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); 65 bool author(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
66 FX_BOOL baseURL(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); 66 bool baseURL(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
67 FX_BOOL bookmarkRoot(IJS_Context* cc, 67 bool bookmarkRoot(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
68 CJS_PropValue& vp, 68 bool calculate(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
69 CFX_WideString& sError); 69 bool Collab(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
70 FX_BOOL calculate(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); 70 bool creationDate(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
71 FX_BOOL Collab(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); 71 bool creator(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
72 FX_BOOL creationDate(IJS_Context* cc, 72 bool delay(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
73 CJS_PropValue& vp, 73 bool dirty(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
74 CFX_WideString& sError); 74 bool documentFileName(IJS_Context* cc,
75 FX_BOOL creator(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); 75 CJS_PropValue& vp,
76 FX_BOOL delay(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); 76 CFX_WideString& sError);
77 FX_BOOL dirty(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); 77 bool external(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
78 FX_BOOL documentFileName(IJS_Context* cc, 78 bool filesize(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
79 CJS_PropValue& vp, 79 bool icons(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
80 CFX_WideString& sError); 80 bool info(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
81 FX_BOOL external(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); 81 bool keywords(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
82 FX_BOOL filesize(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); 82 bool layout(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
83 FX_BOOL icons(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); 83 bool media(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
84 FX_BOOL info(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); 84 bool modDate(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
85 FX_BOOL keywords(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); 85 bool mouseX(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
86 FX_BOOL layout(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); 86 bool mouseY(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
87 FX_BOOL media(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); 87 bool numFields(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
88 FX_BOOL modDate(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); 88 bool numPages(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
89 FX_BOOL mouseX(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); 89 bool pageNum(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
90 FX_BOOL mouseY(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); 90 bool pageWindowRect(IJS_Context* cc,
91 FX_BOOL numFields(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); 91 CJS_PropValue& vp,
92 FX_BOOL numPages(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); 92 CFX_WideString& sError);
93 FX_BOOL pageNum(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); 93 bool path(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
94 FX_BOOL pageWindowRect(IJS_Context* cc, 94 bool producer(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
95 CJS_PropValue& vp, 95 bool subject(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
96 CFX_WideString& sError); 96 bool title(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
97 FX_BOOL path(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); 97 bool zoom(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
98 FX_BOOL producer(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); 98 bool zoomType(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
99 FX_BOOL subject(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
100 FX_BOOL title(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
101 FX_BOOL zoom(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
102 FX_BOOL zoomType(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
103 99
104 FX_BOOL addAnnot(IJS_Context* cc, 100 bool addAnnot(IJS_Context* cc,
105 const std::vector<CJS_Value>& params, 101 const std::vector<CJS_Value>& params,
106 CJS_Value& vRet, 102 CJS_Value& vRet,
107 CFX_WideString& sError); 103 CFX_WideString& sError);
108 FX_BOOL addField(IJS_Context* cc, 104 bool addField(IJS_Context* cc,
109 const std::vector<CJS_Value>& params, 105 const std::vector<CJS_Value>& params,
110 CJS_Value& vRet, 106 CJS_Value& vRet,
111 CFX_WideString& sError); 107 CFX_WideString& sError);
112 FX_BOOL addLink(IJS_Context* cc, 108 bool addLink(IJS_Context* cc,
113 const std::vector<CJS_Value>& params, 109 const std::vector<CJS_Value>& params,
114 CJS_Value& vRet, 110 CJS_Value& vRet,
115 CFX_WideString& sError); 111 CFX_WideString& sError);
116 FX_BOOL addIcon(IJS_Context* cc, 112 bool addIcon(IJS_Context* cc,
117 const std::vector<CJS_Value>& params, 113 const std::vector<CJS_Value>& params,
118 CJS_Value& vRet, 114 CJS_Value& vRet,
119 CFX_WideString& sError); 115 CFX_WideString& sError);
120 FX_BOOL calculateNow(IJS_Context* cc, 116 bool calculateNow(IJS_Context* cc,
117 const std::vector<CJS_Value>& params,
118 CJS_Value& vRet,
119 CFX_WideString& sError);
120 bool closeDoc(IJS_Context* cc,
121 const std::vector<CJS_Value>& params,
122 CJS_Value& vRet,
123 CFX_WideString& sError);
124 bool createDataObject(IJS_Context* cc,
125 const std::vector<CJS_Value>& params,
126 CJS_Value& vRet,
127 CFX_WideString& sError);
128 bool deletePages(IJS_Context* cc,
129 const std::vector<CJS_Value>& params,
130 CJS_Value& vRet,
131 CFX_WideString& sError);
132 bool exportAsText(IJS_Context* cc,
133 const std::vector<CJS_Value>& params,
134 CJS_Value& vRet,
135 CFX_WideString& sError);
136 bool exportAsFDF(IJS_Context* cc,
137 const std::vector<CJS_Value>& params,
138 CJS_Value& vRet,
139 CFX_WideString& sError);
140 bool exportAsXFDF(IJS_Context* cc,
141 const std::vector<CJS_Value>& params,
142 CJS_Value& vRet,
143 CFX_WideString& sError);
144 bool extractPages(IJS_Context* cc,
145 const std::vector<CJS_Value>& params,
146 CJS_Value& vRet,
147 CFX_WideString& sError);
148 bool getAnnot(IJS_Context* cc,
149 const std::vector<CJS_Value>& params,
150 CJS_Value& vRet,
151 CFX_WideString& sError);
152 bool getAnnots(IJS_Context* cc,
153 const std::vector<CJS_Value>& params,
154 CJS_Value& vRet,
155 CFX_WideString& sError);
156 bool getAnnot3D(IJS_Context* cc,
157 const std::vector<CJS_Value>& params,
158 CJS_Value& vRet,
159 CFX_WideString& sError);
160 bool getAnnots3D(IJS_Context* cc,
161 const std::vector<CJS_Value>& params,
162 CJS_Value& vRet,
163 CFX_WideString& sError);
164 bool getField(IJS_Context* cc,
165 const std::vector<CJS_Value>& params,
166 CJS_Value& vRet,
167 CFX_WideString& sError);
168 bool getIcon(IJS_Context* cc,
169 const std::vector<CJS_Value>& params,
170 CJS_Value& vRet,
171 CFX_WideString& sError);
172 bool getLinks(IJS_Context* cc,
173 const std::vector<CJS_Value>& params,
174 CJS_Value& vRet,
175 CFX_WideString& sError);
176 bool getNthFieldName(IJS_Context* cc,
121 const std::vector<CJS_Value>& params, 177 const std::vector<CJS_Value>& params,
122 CJS_Value& vRet, 178 CJS_Value& vRet,
123 CFX_WideString& sError); 179 CFX_WideString& sError);
124 FX_BOOL closeDoc(IJS_Context* cc, 180 bool getOCGs(IJS_Context* cc,
125 const std::vector<CJS_Value>& params, 181 const std::vector<CJS_Value>& params,
126 CJS_Value& vRet, 182 CJS_Value& vRet,
127 CFX_WideString& sError); 183 CFX_WideString& sError);
128 FX_BOOL createDataObject(IJS_Context* cc, 184 bool getPageBox(IJS_Context* cc,
185 const std::vector<CJS_Value>& params,
186 CJS_Value& vRet,
187 CFX_WideString& sError);
188 bool getPageNthWord(IJS_Context* cc,
189 const std::vector<CJS_Value>& params,
190 CJS_Value& vRet,
191 CFX_WideString& sError);
192 bool getPageNthWordQuads(IJS_Context* cc,
129 const std::vector<CJS_Value>& params, 193 const std::vector<CJS_Value>& params,
130 CJS_Value& vRet, 194 CJS_Value& vRet,
131 CFX_WideString& sError); 195 CFX_WideString& sError);
132 FX_BOOL deletePages(IJS_Context* cc, 196 bool getPageNumWords(IJS_Context* cc,
133 const std::vector<CJS_Value>& params,
134 CJS_Value& vRet,
135 CFX_WideString& sError);
136 FX_BOOL exportAsText(IJS_Context* cc,
137 const std::vector<CJS_Value>& params, 197 const std::vector<CJS_Value>& params,
138 CJS_Value& vRet, 198 CJS_Value& vRet,
139 CFX_WideString& sError); 199 CFX_WideString& sError);
140 FX_BOOL exportAsFDF(IJS_Context* cc, 200 bool getPrintParams(IJS_Context* cc,
141 const std::vector<CJS_Value>& params, 201 const std::vector<CJS_Value>& params,
142 CJS_Value& vRet, 202 CJS_Value& vRet,
143 CFX_WideString& sError); 203 CFX_WideString& sError);
144 FX_BOOL exportAsXFDF(IJS_Context* cc, 204 bool getURL(IJS_Context* cc,
145 const std::vector<CJS_Value>& params, 205 const std::vector<CJS_Value>& params,
146 CJS_Value& vRet, 206 CJS_Value& vRet,
147 CFX_WideString& sError); 207 CFX_WideString& sError);
148 FX_BOOL extractPages(IJS_Context* cc, 208 bool gotoNamedDest(IJS_Context* cc,
149 const std::vector<CJS_Value>& params,
150 CJS_Value& vRet,
151 CFX_WideString& sError);
152 FX_BOOL getAnnot(IJS_Context* cc,
153 const std::vector<CJS_Value>& params,
154 CJS_Value& vRet,
155 CFX_WideString& sError);
156 FX_BOOL getAnnots(IJS_Context* cc,
157 const std::vector<CJS_Value>& params,
158 CJS_Value& vRet,
159 CFX_WideString& sError);
160 FX_BOOL getAnnot3D(IJS_Context* cc,
161 const std::vector<CJS_Value>& params, 209 const std::vector<CJS_Value>& params,
162 CJS_Value& vRet, 210 CJS_Value& vRet,
163 CFX_WideString& sError); 211 CFX_WideString& sError);
164 FX_BOOL getAnnots3D(IJS_Context* cc, 212 bool importAnFDF(IJS_Context* cc,
213 const std::vector<CJS_Value>& params,
214 CJS_Value& vRet,
215 CFX_WideString& sError);
216 bool importAnXFDF(IJS_Context* cc,
217 const std::vector<CJS_Value>& params,
218 CJS_Value& vRet,
219 CFX_WideString& sError);
220 bool importTextData(IJS_Context* cc,
165 const std::vector<CJS_Value>& params, 221 const std::vector<CJS_Value>& params,
166 CJS_Value& vRet, 222 CJS_Value& vRet,
167 CFX_WideString& sError); 223 CFX_WideString& sError);
168 FX_BOOL getField(IJS_Context* cc, 224 bool insertPages(IJS_Context* cc,
169 const std::vector<CJS_Value>& params, 225 const std::vector<CJS_Value>& params,
170 CJS_Value& vRet, 226 CJS_Value& vRet,
171 CFX_WideString& sError); 227 CFX_WideString& sError);
172 FX_BOOL getIcon(IJS_Context* cc, 228 bool mailForm(IJS_Context* cc,
173 const std::vector<CJS_Value>& params, 229 const std::vector<CJS_Value>& params,
174 CJS_Value& vRet, 230 CJS_Value& vRet,
175 CFX_WideString& sError); 231 CFX_WideString& sError);
176 FX_BOOL getLinks(IJS_Context* cc, 232 bool print(IJS_Context* cc,
177 const std::vector<CJS_Value>& params, 233 const std::vector<CJS_Value>& params,
178 CJS_Value& vRet, 234 CJS_Value& vRet,
179 CFX_WideString& sError); 235 CFX_WideString& sError);
180 FX_BOOL getNthFieldName(IJS_Context* cc, 236 bool removeField(IJS_Context* cc,
181 const std::vector<CJS_Value>& params, 237 const std::vector<CJS_Value>& params,
182 CJS_Value& vRet, 238 CJS_Value& vRet,
183 CFX_WideString& sError); 239 CFX_WideString& sError);
184 FX_BOOL getOCGs(IJS_Context* cc, 240 bool replacePages(IJS_Context* cc,
185 const std::vector<CJS_Value>& params, 241 const std::vector<CJS_Value>& params,
186 CJS_Value& vRet, 242 CJS_Value& vRet,
187 CFX_WideString& sError); 243 CFX_WideString& sError);
188 FX_BOOL getPageBox(IJS_Context* cc, 244 bool resetForm(IJS_Context* cc,
245 const std::vector<CJS_Value>& params,
246 CJS_Value& vRet,
247 CFX_WideString& sError);
248 bool saveAs(IJS_Context* cc,
249 const std::vector<CJS_Value>& params,
250 CJS_Value& vRet,
251 CFX_WideString& sError);
252 bool submitForm(IJS_Context* cc,
253 const std::vector<CJS_Value>& params,
254 CJS_Value& vRet,
255 CFX_WideString& sError);
256 bool syncAnnotScan(IJS_Context* cc,
189 const std::vector<CJS_Value>& params, 257 const std::vector<CJS_Value>& params,
190 CJS_Value& vRet, 258 CJS_Value& vRet,
191 CFX_WideString& sError); 259 CFX_WideString& sError);
192 FX_BOOL getPageNthWord(IJS_Context* cc, 260 bool mailDoc(IJS_Context* cc,
193 const std::vector<CJS_Value>& params, 261 const std::vector<CJS_Value>& params,
194 CJS_Value& vRet, 262 CJS_Value& vRet,
195 CFX_WideString& sError); 263 CFX_WideString& sError);
196 FX_BOOL getPageNthWordQuads(IJS_Context* cc, 264 bool removeIcon(IJS_Context* cc,
197 const std::vector<CJS_Value>& params, 265 const std::vector<CJS_Value>& params,
198 CJS_Value& vRet, 266 CJS_Value& vRet,
199 CFX_WideString& sError); 267 CFX_WideString& sError);
200 FX_BOOL getPageNumWords(IJS_Context* cc, 268 bool URL(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
201 const std::vector<CJS_Value>& params,
202 CJS_Value& vRet,
203 CFX_WideString& sError);
204 FX_BOOL getPrintParams(IJS_Context* cc,
205 const std::vector<CJS_Value>& params,
206 CJS_Value& vRet,
207 CFX_WideString& sError);
208 FX_BOOL getURL(IJS_Context* cc,
209 const std::vector<CJS_Value>& params,
210 CJS_Value& vRet,
211 CFX_WideString& sError);
212 FX_BOOL gotoNamedDest(IJS_Context* cc,
213 const std::vector<CJS_Value>& params,
214 CJS_Value& vRet,
215 CFX_WideString& sError);
216 FX_BOOL importAnFDF(IJS_Context* cc,
217 const std::vector<CJS_Value>& params,
218 CJS_Value& vRet,
219 CFX_WideString& sError);
220 FX_BOOL importAnXFDF(IJS_Context* cc,
221 const std::vector<CJS_Value>& params,
222 CJS_Value& vRet,
223 CFX_WideString& sError);
224 FX_BOOL importTextData(IJS_Context* cc,
225 const std::vector<CJS_Value>& params,
226 CJS_Value& vRet,
227 CFX_WideString& sError);
228 FX_BOOL insertPages(IJS_Context* cc,
229 const std::vector<CJS_Value>& params,
230 CJS_Value& vRet,
231 CFX_WideString& sError);
232 FX_BOOL mailForm(IJS_Context* cc,
233 const std::vector<CJS_Value>& params,
234 CJS_Value& vRet,
235 CFX_WideString& sError);
236 FX_BOOL print(IJS_Context* cc,
237 const std::vector<CJS_Value>& params,
238 CJS_Value& vRet,
239 CFX_WideString& sError);
240 FX_BOOL removeField(IJS_Context* cc,
241 const std::vector<CJS_Value>& params,
242 CJS_Value& vRet,
243 CFX_WideString& sError);
244 FX_BOOL replacePages(IJS_Context* cc,
245 const std::vector<CJS_Value>& params,
246 CJS_Value& vRet,
247 CFX_WideString& sError);
248 FX_BOOL resetForm(IJS_Context* cc,
249 const std::vector<CJS_Value>& params,
250 CJS_Value& vRet,
251 CFX_WideString& sError);
252 FX_BOOL saveAs(IJS_Context* cc,
253 const std::vector<CJS_Value>& params,
254 CJS_Value& vRet,
255 CFX_WideString& sError);
256 FX_BOOL submitForm(IJS_Context* cc,
257 const std::vector<CJS_Value>& params,
258 CJS_Value& vRet,
259 CFX_WideString& sError);
260 FX_BOOL syncAnnotScan(IJS_Context* cc,
261 const std::vector<CJS_Value>& params,
262 CJS_Value& vRet,
263 CFX_WideString& sError);
264 FX_BOOL mailDoc(IJS_Context* cc,
265 const std::vector<CJS_Value>& params,
266 CJS_Value& vRet,
267 CFX_WideString& sError);
268 FX_BOOL removeIcon(IJS_Context* cc,
269 const std::vector<CJS_Value>& params,
270 CJS_Value& vRet,
271 CFX_WideString& sError);
272 FX_BOOL URL(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
273 269
274 void SetFormFillEnv(CPDFSDK_FormFillEnvironment* pFormFillEnv); 270 void SetFormFillEnv(CPDFSDK_FormFillEnvironment* pFormFillEnv);
275 CPDFSDK_FormFillEnvironment* GetFormFillEnv() const { 271 CPDFSDK_FormFillEnvironment* GetFormFillEnv() const {
276 return m_pFormFillEnv.Get(); 272 return m_pFormFillEnv.Get();
277 } 273 }
278 void AddDelayData(CJS_DelayData* pData); 274 void AddDelayData(CJS_DelayData* pData);
279 void DoFieldDelay(const CFX_WideString& sFieldName, int nControlIndex); 275 void DoFieldDelay(const CFX_WideString& sFieldName, int nControlIndex);
280 CJS_Document* GetCJSDoc() const; 276 CJS_Document* GetCJSDoc() const;
281 277
282 private: 278 private:
283 bool IsEnclosedInRect(CFX_FloatRect rect, CFX_FloatRect LinkRect); 279 bool IsEnclosedInRect(CFX_FloatRect rect, CFX_FloatRect LinkRect);
284 int CountWords(CPDF_TextObject* pTextObj); 280 int CountWords(CPDF_TextObject* pTextObj);
285 CFX_WideString GetObjWordStr(CPDF_TextObject* pTextObj, int nWordIndex); 281 CFX_WideString GetObjWordStr(CPDF_TextObject* pTextObj, int nWordIndex);
286 282
287 FX_BOOL getPropertyInternal(IJS_Context* cc, 283 bool getPropertyInternal(IJS_Context* cc,
288 CJS_PropValue& vp, 284 CJS_PropValue& vp,
289 const CFX_ByteString& propName, 285 const CFX_ByteString& propName,
290 CFX_WideString& sError); 286 CFX_WideString& sError);
291 287
292 CPDFSDK_FormFillEnvironment::ObservedPtr m_pFormFillEnv; 288 CPDFSDK_FormFillEnvironment::ObservedPtr m_pFormFillEnv;
293 CFX_WideString m_cwBaseURL; 289 CFX_WideString m_cwBaseURL;
294 std::list<std::unique_ptr<CJS_DelayData>> m_DelayData; 290 std::list<std::unique_ptr<CJS_DelayData>> m_DelayData;
295 std::vector<std::unique_ptr<IconElement>> m_Icons; 291 std::vector<std::unique_ptr<IconElement>> m_Icons;
296 bool m_bDelay; 292 bool m_bDelay;
297 }; 293 };
298 294
299 class CJS_Document : public CJS_Object { 295 class CJS_Document : public CJS_Object {
300 public: 296 public:
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 JS_STATIC_METHOD(replacePages, Document); 373 JS_STATIC_METHOD(replacePages, Document);
378 JS_STATIC_METHOD(removeIcon, Document); 374 JS_STATIC_METHOD(removeIcon, Document);
379 JS_STATIC_METHOD(resetForm, Document); 375 JS_STATIC_METHOD(resetForm, Document);
380 JS_STATIC_METHOD(saveAs, Document); 376 JS_STATIC_METHOD(saveAs, Document);
381 JS_STATIC_METHOD(submitForm, Document); 377 JS_STATIC_METHOD(submitForm, Document);
382 JS_STATIC_METHOD(syncAnnotScan, Document); 378 JS_STATIC_METHOD(syncAnnotScan, Document);
383 JS_STATIC_METHOD(mailDoc, Document); 379 JS_STATIC_METHOD(mailDoc, Document);
384 }; 380 };
385 381
386 #endif // FPDFSDK_JAVASCRIPT_DOCUMENT_H_ 382 #endif // FPDFSDK_JAVASCRIPT_DOCUMENT_H_
OLDNEW
« no previous file with comments | « fpdfsdk/javascript/Annot.cpp ('k') | fpdfsdk/javascript/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698