Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 262 { | 262 { |
| 263 CPDF_Action subaction = action.GetSubAction(i); | 263 CPDF_Action subaction = action.GetSubAction(i); |
| 264 if (!ExecuteDocumentPageAction(subaction, type, pDocument,/* pDo cView,*/ list)) return FALSE; | 264 if (!ExecuteDocumentPageAction(subaction, type, pDocument,/* pDo cView,*/ list)) return FALSE; |
| 265 } | 265 } |
| 266 | 266 |
| 267 return TRUE; | 267 return TRUE; |
| 268 } | 268 } |
| 269 | 269 |
| 270 FX_BOOL CPDFSDK_ActionHandler::IsValidField(CPDFSDK_Document* pDocument, CPDF_Di ctionary* pFieldDict) | 270 FX_BOOL CPDFSDK_ActionHandler::IsValidField(CPDFSDK_Document* pDocument, CPDF_Di ctionary* pFieldDict) |
| 271 { | 271 { |
| 272 » ASSERT(m_pEvi != NULL); | 272 ASSERT(m_pEvi != NULL); |
| 273 » ASSERT(pDocument != NULL); | 273 ASSERT(pDocument != NULL); |
|
Nico
2014/08/06 21:17:17
The rest of the file uses tabs, we shouldn't mix t
| |
| 274 » ASSERT(pFieldDict != NULL); | 274 ASSERT(pFieldDict != NULL); |
| 275 | 275 |
| 276 » if (1/*m_pApp->IsValidDocument(pDocument)*/) | 276 CPDFSDK_InterForm* pInterForm = pDocument->GetInterForm(); |
| 277 » { | 277 ASSERT(pInterForm != NULL); |
| 278 » » CPDFSDK_InterForm* pInterForm = pDocument->GetInterForm(); | |
| 279 » » ASSERT(pInterForm != NULL); | |
| 280 | 278 |
| 281 » » CPDF_InterForm* pPDFInterForm = pInterForm->GetInterForm(); | 279 CPDF_InterForm* pPDFInterForm = pInterForm->GetInterForm(); |
| 282 » » ASSERT(pPDFInterForm != NULL); | 280 ASSERT(pPDFInterForm != NULL); |
| 283 | 281 |
| 284 » » return pPDFInterForm->GetFieldByDict(pFieldDict) != NULL; | 282 return pPDFInterForm->GetFieldByDict(pFieldDict) != NULL; |
| 285 » } | |
| 286 | |
| 287 » return FALSE; | |
| 288 } | 283 } |
| 289 | 284 |
| 290 FX_BOOL CPDFSDK_ActionHandler::ExecuteFieldAction(const CPDF_Action& action, CPD F_AAction::AActionType type, | 285 FX_BOOL CPDFSDK_ActionHandler::ExecuteFieldAction(const CPDF_Action& action, CPD F_AAction::AActionType type, |
| 291 CPDFSDK_Document* pDocument,/* CReader_DocView* pDocView,*/ CPDF_FormField* pF ormField, | 286 CPDFSDK_Document* pDocument,/* CReader_DocView* pDocView,*/ CPDF_FormField* pF ormField, |
| 292 PDFSDK_FieldAction& data, CFX_PtrList& list) | 287 PDFSDK_FieldAction& data, CFX_PtrList& list) |
| 293 { | 288 { |
| 294 ASSERT(pDocument != NULL); | 289 ASSERT(pDocument != NULL); |
| 295 | 290 |
| 296 if (list.Find((CPDF_Dictionary*)action)) | 291 if (list.Find((CPDF_Dictionary*)action)) |
| 297 return FALSE; | 292 return FALSE; |
| (...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 841 FX_BOOL CPDFSDK_MediaActionHandler::DoAction_Sound(const CPDF_Action& action, CP DFSDK_Document* pDocument) | 836 FX_BOOL CPDFSDK_MediaActionHandler::DoAction_Sound(const CPDF_Action& action, CP DFSDK_Document* pDocument) |
| 842 { | 837 { |
| 843 return FALSE; | 838 return FALSE; |
| 844 } | 839 } |
| 845 | 840 |
| 846 FX_BOOL CPDFSDK_MediaActionHandler::DoAction_Movie(const CPDF_Action& action, CP DFSDK_Document* pDocument) | 841 FX_BOOL CPDFSDK_MediaActionHandler::DoAction_Movie(const CPDF_Action& action, CP DFSDK_Document* pDocument) |
| 847 { | 842 { |
| 848 return FALSE; | 843 return FALSE; |
| 849 } | 844 } |
| 850 | 845 |
| OLD | NEW |