| Index: fpdfsdk/src/fsdk_mgr.cpp
|
| diff --git a/fpdfsdk/src/fsdk_mgr.cpp b/fpdfsdk/src/fsdk_mgr.cpp
|
| index f134b790a931454e28ccb2f5a353ef6bb650a2b6..7b071a9b5582d2ce2e4ccb9c0a4d8e426989c3fe 100644
|
| --- a/fpdfsdk/src/fsdk_mgr.cpp
|
| +++ b/fpdfsdk/src/fsdk_mgr.cpp
|
| @@ -427,30 +427,32 @@ void CPDFSDK_Document:: ProcJavascriptFun()
|
|
|
| FX_BOOL CPDFSDK_Document::ProcOpenAction()
|
| {
|
| - if(!m_pDoc) return FALSE;
|
| -
|
| - CPDF_Dictionary* pRoot = m_pDoc->GetPDFDoc()->GetRoot();
|
| - if (!pRoot) return FALSE;
|
| - CPDF_Object* pOpenAction = pRoot->GetDict("OpenAction");//
|
| - if(!pOpenAction) pOpenAction = pRoot->GetArray("OpenAction");//
|
| - if(!pOpenAction) return FALSE;
|
| -
|
| + if(!m_pDoc)
|
| + return FALSE;
|
| +
|
| + CPDF_Dictionary* pRoot = m_pDoc->GetPDFDoc()->GetRoot();
|
| + if (!pRoot)
|
| + return FALSE;
|
| +
|
| + CPDF_Object* pOpenAction = pRoot->GetDict("OpenAction");
|
| + if(!pOpenAction)
|
| + pOpenAction = pRoot->GetArray("OpenAction");
|
| +
|
| + if(!pOpenAction)
|
| + return FALSE;
|
| +
|
| if(pOpenAction->GetType()==PDFOBJ_ARRAY)
|
| - {
|
| - }
|
| - else if(pOpenAction->GetType()==PDFOBJ_DICTIONARY)
|
| - {
|
| - CPDF_Dictionary * pDict=(CPDF_Dictionary*)pOpenAction;
|
| - CPDF_Action Action = pDict;
|
| -
|
| - if(m_pEnv->GetActionHander())
|
| - m_pEnv->GetActionHander()->DoAction_DocOpen(Action,this);
|
| - }
|
| - else
|
| + return TRUE;
|
| +
|
| + if(pOpenAction->GetType()==PDFOBJ_DICTIONARY)
|
| {
|
| - return FALSE;
|
| - }
|
| - return TRUE;
|
| + CPDF_Dictionary * pDict=(CPDF_Dictionary*)pOpenAction;
|
| + CPDF_Action action(pDict);
|
| + if(m_pEnv->GetActionHander())
|
| + m_pEnv->GetActionHander()->DoAction_DocOpen(action, this);
|
| + return TRUE;
|
| + }
|
| + return FALSE;
|
| }
|
|
|
| CPDF_OCContext* CPDFSDK_Document::GetOCContext()
|
|
|