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 "public/fpdf_formfill.h" | 7 #include "public/fpdf_formfill.h" |
8 | 8 |
9 #include "fpdfsdk/include/fsdk_define.h" | 9 #include "fpdfsdk/include/fsdk_define.h" |
10 #include "fpdfsdk/include/fsdk_mgr.h" | 10 #include "fpdfsdk/include/fsdk_mgr.h" |
(...skipping 689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
700 CPDF_Document* pDoc = pSDKDoc->GetPDFDocument(); | 700 CPDF_Document* pDoc = pSDKDoc->GetPDFDocument(); |
701 CPDF_Dictionary* pDic = pDoc->GetRoot(); | 701 CPDF_Dictionary* pDic = pDoc->GetRoot(); |
702 if (!pDic) | 702 if (!pDic) |
703 return; | 703 return; |
704 | 704 |
705 CPDF_AAction aa = pDic->GetDict("AA"); | 705 CPDF_AAction aa = pDic->GetDict("AA"); |
706 if (aa.ActionExist((CPDF_AAction::AActionType)aaType)) { | 706 if (aa.ActionExist((CPDF_AAction::AActionType)aaType)) { |
707 CPDF_Action action = aa.GetAction((CPDF_AAction::AActionType)aaType); | 707 CPDF_Action action = aa.GetAction((CPDF_AAction::AActionType)aaType); |
708 CPDFSDK_ActionHandler* pActionHandler = | 708 CPDFSDK_ActionHandler* pActionHandler = |
709 ((CPDFDoc_Environment*)hHandle)->GetActionHander(); | 709 ((CPDFDoc_Environment*)hHandle)->GetActionHander(); |
710 ASSERT(pActionHandler != NULL); | |
711 pActionHandler->DoAction_Document(action, (CPDF_AAction::AActionType)aaType, | 710 pActionHandler->DoAction_Document(action, (CPDF_AAction::AActionType)aaType, |
712 pSDKDoc); | 711 pSDKDoc); |
713 } | 712 } |
714 } | 713 } |
715 | 714 |
716 DLLEXPORT void STDCALL FORM_DoPageAAction(FPDF_PAGE page, | 715 DLLEXPORT void STDCALL FORM_DoPageAAction(FPDF_PAGE page, |
717 FPDF_FORMHANDLE hHandle, | 716 FPDF_FORMHANDLE hHandle, |
718 int aaType) { | 717 int aaType) { |
719 if (!hHandle) | 718 if (!hHandle) |
720 return; | 719 return; |
(...skipping 13 matching lines...) Expand all Loading... |
734 pActionHandler->DoAction_Page(action, CPDF_AAction::OpenPage, pSDKDoc); | 733 pActionHandler->DoAction_Page(action, CPDF_AAction::OpenPage, pSDKDoc); |
735 } | 734 } |
736 } else { | 735 } else { |
737 if (aa.ActionExist(CPDF_AAction::ClosePage)) { | 736 if (aa.ActionExist(CPDF_AAction::ClosePage)) { |
738 CPDF_Action action = aa.GetAction(CPDF_AAction::ClosePage); | 737 CPDF_Action action = aa.GetAction(CPDF_AAction::ClosePage); |
739 pActionHandler->DoAction_Page(action, CPDF_AAction::ClosePage, pSDKDoc); | 738 pActionHandler->DoAction_Page(action, CPDF_AAction::ClosePage, pSDKDoc); |
740 } | 739 } |
741 } | 740 } |
742 } | 741 } |
743 } | 742 } |
OLD | NEW |