Merge to XFA: Use stdint.h types throughout PDFium.
[pdfium.git] / fpdfsdk / src / fpdfxfa / fpdfxfa_util.cpp
index 9bf1b63..ac5ef21 100644 (file)
@@ -8,41 +8,13 @@
 #include "../../include/fsdk_mgr.h"\r
 #include "../../include/fpdfxfa/fpdfxfa_util.h"\r
 \r
-FX_BOOL FPDF_HasXFAField(CPDF_Document* pPDFDoc, int& docType)\r
-{\r
-       if (!pPDFDoc)\r
-               return FALSE;\r
-\r
-       CPDF_Dictionary* pRoot = pPDFDoc->GetRoot();\r
-       if (!pRoot)\r
-               return FALSE;\r
-\r
-       CPDF_Dictionary* pAcroForm = pRoot->GetDict("AcroForm");\r
-       if (!pAcroForm) \r
-               return FALSE;\r
-\r
-       CPDF_Object* pXFA = pAcroForm->GetElement("XFA");\r
-       if (!pXFA) \r
-               return FALSE;\r
-\r
-       FX_BOOL bDymasticXFA = FALSE;\r
-       bDymasticXFA = pRoot->GetBoolean("NeedsRendering", FALSE);\r
-\r
-       if(bDymasticXFA)\r
-               docType = DOCTYPE_DYNIMIC_XFA;\r
-       else\r
-               docType = DOCTYPE_STATIC_XFA;\r
-\r
-       return TRUE;\r
-}\r
-\r
 CFX_PtrArray CXFA_FWLAdapterTimerMgr::ms_timerArray;\r
 \r
 FWL_ERR CXFA_FWLAdapterTimerMgr::Start(IFWL_Timer *pTimer, FX_DWORD dwElapse, FWL_HTIMER &hTimer, FX_BOOL bImmediately /* = TRUE */)\r
 {\r
        if (m_pEnv)\r
        {\r
-               FX_UINT32 uIDEvent = m_pEnv->FFI_SetTimer(dwElapse, TimerProc);\r
+               uint32_t uIDEvent = m_pEnv->FFI_SetTimer(dwElapse, TimerProc);\r
                CFWL_TimerInfo *pInfo = FX_NEW CFWL_TimerInfo;\r
                pInfo->uIDEvent = uIDEvent;\r
                pInfo->pTimer = pTimer;\r
@@ -65,7 +37,7 @@ FWL_ERR CXFA_FWLAdapterTimerMgr::Stop(FWL_HTIMER hTimer)
 \r
                m_pEnv->FFI_KillTimer(pInfo->uIDEvent);\r
 \r
-               FX_INT32 index = ms_timerArray.Find(pInfo);\r
+               int32_t index = ms_timerArray.Find(pInfo);\r
                if (index >= 0)\r
                {\r
                        ms_timerArray.RemoveAt(index);\r
@@ -77,11 +49,11 @@ FWL_ERR CXFA_FWLAdapterTimerMgr::Stop(FWL_HTIMER hTimer)
        return FWL_ERR_Indefinite;\r
 }\r
 \r
-void CXFA_FWLAdapterTimerMgr::TimerProc(FX_INT32 idEvent)\r
+void CXFA_FWLAdapterTimerMgr::TimerProc(int32_t idEvent)\r
 {\r
        CFWL_TimerInfo *pInfo = NULL;\r
-       FX_INT32 iCount = CXFA_FWLAdapterTimerMgr::ms_timerArray.GetSize();\r
-       for (FX_INT32 i = 0; i < iCount; i++)\r
+       int32_t iCount = CXFA_FWLAdapterTimerMgr::ms_timerArray.GetSize();\r
+       for (int32_t i = 0; i < iCount; i++)\r
        {\r
                CFWL_TimerInfo *pTemp = (CFWL_TimerInfo*)CXFA_FWLAdapterTimerMgr::ms_timerArray.GetAt(i);\r
                if (pTemp->uIDEvent == idEvent)\r