| 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/fpdfxfa/fpdfxfa_util.h" | 9 #include "../../include/fpdfxfa/fpdfxfa_util.h" |
| 10 | 10 |
| 11 FX_BOOL FPDF_HasXFAField(CPDF_Document* pPDFDoc, int& docType) | |
| 12 { | |
| 13 if (!pPDFDoc) | |
| 14 return FALSE; | |
| 15 | |
| 16 CPDF_Dictionary* pRoot = pPDFDoc->GetRoot(); | |
| 17 if (!pRoot) | |
| 18 return FALSE; | |
| 19 | |
| 20 CPDF_Dictionary* pAcroForm = pRoot->GetDict("AcroForm"); | |
| 21 if (!pAcroForm) | |
| 22 return FALSE; | |
| 23 | |
| 24 CPDF_Object* pXFA = pAcroForm->GetElement("XFA"); | |
| 25 if (!pXFA) | |
| 26 return FALSE; | |
| 27 | |
| 28 FX_BOOL bDymasticXFA = FALSE; | |
| 29 bDymasticXFA = pRoot->GetBoolean("NeedsRendering", FALSE); | |
| 30 | |
| 31 if(bDymasticXFA) | |
| 32 docType = DOCTYPE_DYNIMIC_XFA; | |
| 33 else | |
| 34 docType = DOCTYPE_STATIC_XFA; | |
| 35 | |
| 36 return TRUE; | |
| 37 } | |
| 38 | |
| 39 CFX_PtrArray CXFA_FWLAdapterTimerMgr::ms_timerArray; | 11 CFX_PtrArray CXFA_FWLAdapterTimerMgr::ms_timerArray; |
| 40 | 12 |
| 41 FWL_ERR CXFA_FWLAdapterTimerMgr::Start(IFWL_Timer *pTimer, FX_DWORD dwElapse, FW
L_HTIMER &hTimer, FX_BOOL bImmediately /* = TRUE */) | 13 FWL_ERR CXFA_FWLAdapterTimerMgr::Start(IFWL_Timer *pTimer, FX_DWORD dwElapse, FW
L_HTIMER &hTimer, FX_BOOL bImmediately /* = TRUE */) |
| 42 { | 14 { |
| 43 if (m_pEnv) | 15 if (m_pEnv) |
| 44 { | 16 { |
| 45 FX_UINT32 uIDEvent = m_pEnv->FFI_SetTimer(dwElapse, TimerProc); | 17 FX_UINT32 uIDEvent = m_pEnv->FFI_SetTimer(dwElapse, TimerProc); |
| 46 CFWL_TimerInfo *pInfo = FX_NEW CFWL_TimerInfo; | 18 CFWL_TimerInfo *pInfo = FX_NEW CFWL_TimerInfo; |
| 47 pInfo->uIDEvent = uIDEvent; | 19 pInfo->uIDEvent = uIDEvent; |
| 48 pInfo->pTimer = pTimer; | 20 pInfo->pTimer = pTimer; |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 if (pTemp->uIDEvent == idEvent) | 59 if (pTemp->uIDEvent == idEvent) |
| 88 { | 60 { |
| 89 pInfo = pTemp; break; | 61 pInfo = pTemp; break; |
| 90 } | 62 } |
| 91 } | 63 } |
| 92 if (pInfo) | 64 if (pInfo) |
| 93 { | 65 { |
| 94 pInfo->pTimer->Run((FWL_HTIMER)pInfo); | 66 pInfo->pTimer->Run((FWL_HTIMER)pInfo); |
| 95 } | 67 } |
| 96 } | 68 } |
| OLD | NEW |