Add type cast definitions for CPDF_Array.
[pdfium.git] / fpdfsdk / src / fsdk_mgr.cpp
index 5d765a4..f43a45b 100644 (file)
@@ -479,11 +479,10 @@ FX_BOOL CPDFSDK_Document::ProcOpenAction() {
   if (!pOpenAction)
     return FALSE;
 
-  if (pOpenAction->GetType() == PDFOBJ_ARRAY)
+  if (pOpenAction->IsArray())
     return TRUE;
 
-  if (pOpenAction->GetType() == PDFOBJ_DICTIONARY) {
-    CPDF_Dictionary* pDict = (CPDF_Dictionary*)pOpenAction;
+  if (CPDF_Dictionary* pDict = pOpenAction->AsDictionary()) {
     CPDF_Action action(pDict);
     if (m_pEnv->GetActionHander())
       m_pEnv->GetActionHander()->DoAction_DocOpen(action, this);