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

Side by Side Diff: fpdfsdk/src/fsdk_actionhandler.cpp

Issue 1177483002: Use stdint.h types throughout PDFium. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 years, 6 months 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/src/fpdfview.cpp ('k') | fpdfsdk/src/fsdk_baseannot.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 #include "../include/fsdk_define.h" 7 #include "../include/fsdk_define.h"
8 #include "../include/fsdk_mgr.h" 8 #include "../include/fsdk_mgr.h"
9 #include "../include/fsdk_actionhandler.h" 9 #include "../include/fsdk_actionhandler.h"
10 #include "../include/javascript/IJavaScript.h" 10 #include "../include/javascript/IJavaScript.h"
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 { 151 {
152 RunDocumentOpenJavaScript(pDocument, L"", swJS); 152 RunDocumentOpenJavaScript(pDocument, L"", swJS);
153 } 153 }
154 } 154 }
155 } 155 }
156 else 156 else
157 { 157 {
158 DoAction_NoJs(action, pDocument); 158 DoAction_NoJs(action, pDocument);
159 } 159 }
160 160
161 » for (FX_INT32 i=0,sz=action.GetSubActionsCount(); i<sz; i++) 161 » for (int32_t i=0,sz=action.GetSubActionsCount(); i<sz; i++)
162 { 162 {
163 CPDF_Action subaction = action.GetSubAction(i); 163 CPDF_Action subaction = action.GetSubAction(i);
164 if (!ExecuteDocumentOpenAction(subaction, pDocument, list)) retu rn FALSE; 164 if (!ExecuteDocumentOpenAction(subaction, pDocument, list)) retu rn FALSE;
165 } 165 }
166 166
167 return TRUE; 167 return TRUE;
168 } 168 }
169 169
170 FX_BOOL CPDFSDK_ActionHandler::ExecuteLinkAction(const CPDF_Action& action, CPDFSDK_Document* pDocument, 170 FX_BOOL CPDFSDK_ActionHandler::ExecuteLinkAction(const CPDF_Action& action, CPDFSDK_Document* pDocument,
171 CFX_PtrList& list) 171 CFX_PtrList& list)
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 206
207 pRuntime->ReleaseContext(pContext); 207 pRuntime->ReleaseContext(pContext);
208 } 208 }
209 } 209 }
210 } 210 }
211 else 211 else
212 { 212 {
213 DoAction_NoJs(action, pDocument); 213 DoAction_NoJs(action, pDocument);
214 } 214 }
215 215
216 » for (FX_INT32 i=0,sz=action.GetSubActionsCount(); i<sz; i++) 216 » for (int32_t i=0,sz=action.GetSubActionsCount(); i<sz; i++)
217 { 217 {
218 CPDF_Action subaction = action.GetSubAction(i); 218 CPDF_Action subaction = action.GetSubAction(i);
219 if (!ExecuteLinkAction(subaction, pDocument, list)) return FALSE ; 219 if (!ExecuteLinkAction(subaction, pDocument, list)) return FALSE ;
220 } 220 }
221 221
222 return TRUE; 222 return TRUE;
223 } 223 }
224 224
225 FX_BOOL CPDFSDK_ActionHandler::ExecuteDocumentPageAction(const CPDF_Action& acti on, CPDF_AAction::AActionType type, 225 FX_BOOL CPDFSDK_ActionHandler::ExecuteDocumentPageAction(const CPDF_Action& acti on, CPDF_AAction::AActionType type,
226 CPDFSDK_Document* pDocument, CFX_PtrList& list) 226 CPDFSDK_Document* pDocument, CFX_PtrList& list)
(...skipping 20 matching lines...) Expand all
247 } 247 }
248 } 248 }
249 else 249 else
250 { 250 {
251 DoAction_NoJs(action, pDocument); 251 DoAction_NoJs(action, pDocument);
252 } 252 }
253 253
254 if (!IsValidDocView(pDocument)) 254 if (!IsValidDocView(pDocument))
255 return FALSE; 255 return FALSE;
256 256
257 » for (FX_INT32 i=0,sz=action.GetSubActionsCount(); i<sz; i++) 257 » for (int32_t i=0,sz=action.GetSubActionsCount(); i<sz; i++)
258 { 258 {
259 CPDF_Action subaction = action.GetSubAction(i); 259 CPDF_Action subaction = action.GetSubAction(i);
260 if (!ExecuteDocumentPageAction(subaction, type, pDocument, list) ) return FALSE; 260 if (!ExecuteDocumentPageAction(subaction, type, pDocument, list) ) return FALSE;
261 } 261 }
262 262
263 return TRUE; 263 return TRUE;
264 } 264 }
265 265
266 FX_BOOL CPDFSDK_ActionHandler::IsValidField(CPDFSDK_Document* pDocument, CPDF_Di ctionary* pFieldDict) 266 FX_BOOL CPDFSDK_ActionHandler::IsValidField(CPDFSDK_Document* pDocument, CPDF_Di ctionary* pFieldDict)
267 { 267 {
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 if (!IsValidField(pDocument, pFormField->GetFiel dDict())) 302 if (!IsValidField(pDocument, pFormField->GetFiel dDict()))
303 return FALSE; 303 return FALSE;
304 } 304 }
305 } 305 }
306 } 306 }
307 else 307 else
308 { 308 {
309 DoAction_NoJs(action, pDocument); 309 DoAction_NoJs(action, pDocument);
310 } 310 }
311 311
312 » for (FX_INT32 i=0,sz=action.GetSubActionsCount(); i<sz; i++) 312 » for (int32_t i=0,sz=action.GetSubActionsCount(); i<sz; i++)
313 { 313 {
314 CPDF_Action subaction = action.GetSubAction(i); 314 CPDF_Action subaction = action.GetSubAction(i);
315 if (!ExecuteFieldAction(subaction, type, pDocument, pFormField, data, list)) return FALSE; 315 if (!ExecuteFieldAction(subaction, type, pDocument, pFormField, data, list)) return FALSE;
316 } 316 }
317 317
318 return TRUE; 318 return TRUE;
319 } 319 }
320 320
321 FX_BOOL CPDFSDK_ActionHandler::ExecuteScreenAction(const CPDF_Action& action, CP DF_AAction::AActionType type, 321 FX_BOOL CPDFSDK_ActionHandler::ExecuteScreenAction(const CPDF_Action& action, CP DF_AAction::AActionType type,
322 CPDFSDK_Document* pDocument, CPDFSDK_Annot* pScreen, CFX_PtrList& list) 322 CPDFSDK_Document* pDocument, CPDFSDK_Annot* pScreen, CFX_PtrList& list)
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 392
393 pRuntime->ReleaseContext(pContext); 393 pRuntime->ReleaseContext(pContext);
394 } 394 }
395 } 395 }
396 } 396 }
397 else 397 else
398 { 398 {
399 DoAction_NoJs(action, pDocument); 399 DoAction_NoJs(action, pDocument);
400 } 400 }
401 401
402 » for (FX_INT32 i=0,sz=action.GetSubActionsCount(); i<sz; i++) 402 » for (int32_t i=0,sz=action.GetSubActionsCount(); i<sz; i++)
403 { 403 {
404 CPDF_Action subaction = action.GetSubAction(i); 404 CPDF_Action subaction = action.GetSubAction(i);
405 if (!ExecuteScreenAction(subaction, type, pDocument, pScreen, li st)) return FALSE; 405 if (!ExecuteScreenAction(subaction, type, pDocument, pScreen, li st)) return FALSE;
406 } 406 }
407 407
408 return TRUE; 408 return TRUE;
409 } 409 }
410 410
411 FX_BOOL CPDFSDK_ActionHandler::ExecuteBookMark(const CPDF_Action& action, CPDFSD K_Document* pDocument, 411 FX_BOOL CPDFSDK_ActionHandler::ExecuteBookMark(const CPDF_Action& action, CPDFSD K_Document* pDocument,
412 CPDF_Bookmark* pBookmark, CFX_PtrList& list) 412 CPDF_Bookmark* pBookmark, CFX_PtrList& list)
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 447
448 pRuntime->ReleaseContext(pContext); 448 pRuntime->ReleaseContext(pContext);
449 } 449 }
450 } 450 }
451 } 451 }
452 else 452 else
453 { 453 {
454 DoAction_NoJs(action, pDocument); 454 DoAction_NoJs(action, pDocument);
455 } 455 }
456 456
457 » for (FX_INT32 i=0,sz=action.GetSubActionsCount(); i<sz; i++) 457 » for (int32_t i=0,sz=action.GetSubActionsCount(); i<sz; i++)
458 { 458 {
459 CPDF_Action subaction = action.GetSubAction(i); 459 CPDF_Action subaction = action.GetSubAction(i);
460 if (!ExecuteBookMark(subaction, pDocument, pBookmark, list)) ret urn FALSE; 460 if (!ExecuteBookMark(subaction, pDocument, pBookmark, list)) ret urn FALSE;
461 } 461 }
462 462
463 return TRUE; 463 return TRUE;
464 } 464 }
465 465
466 void CPDFSDK_ActionHandler::DoAction_NoJs(const CPDF_Action& action, CPDFSDK_Doc ument* pDocument) 466 void CPDFSDK_ActionHandler::DoAction_NoJs(const CPDF_Action& action, CPDFSDK_Doc ument* pDocument)
467 { 467 {
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
821 821
822 FX_BOOL CPDFSDK_MediaActionHandler::DoAction_Sound(const CPDF_Action& action, CP DFSDK_Document* pDocument) 822 FX_BOOL CPDFSDK_MediaActionHandler::DoAction_Sound(const CPDF_Action& action, CP DFSDK_Document* pDocument)
823 { 823 {
824 return FALSE; 824 return FALSE;
825 } 825 }
826 826
827 FX_BOOL CPDFSDK_MediaActionHandler::DoAction_Movie(const CPDF_Action& action, CP DFSDK_Document* pDocument) 827 FX_BOOL CPDFSDK_MediaActionHandler::DoAction_Movie(const CPDF_Action& action, CP DFSDK_Document* pDocument)
828 { 828 {
829 return FALSE; 829 return FALSE;
830 } 830 }
OLDNEW
« no previous file with comments | « fpdfsdk/src/fpdfview.cpp ('k') | fpdfsdk/src/fsdk_baseannot.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698