summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fpdfsdk/src/fpdfformfill.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/fpdfsdk/src/fpdfformfill.cpp b/fpdfsdk/src/fpdfformfill.cpp
index 7c2c350501..aa45855967 100644
--- a/fpdfsdk/src/fpdfformfill.cpp
+++ b/fpdfsdk/src/fpdfformfill.cpp
@@ -328,24 +328,18 @@ DLLEXPORT void STDCALL FORM_DoPageAAction(FPDF_PAGE page,
CPDF_Page* pPage = CPDFPageFromFPDFPage(page);
if (!pPage)
return;
- CPDFSDK_PageView* pPageView = pSDKDoc->GetPageView(pPage, FALSE);
- if (pPageView) {
+ if (pSDKDoc->GetPageView(pPage, FALSE)) {
CPDFDoc_Environment* pEnv = pSDKDoc->GetEnv();
CPDFSDK_ActionHandler* pActionHandler = pEnv->GetActionHander();
CPDF_Dictionary* pPageDict = pPage->m_pFormDict;
CPDF_AAction aa = pPageDict->GetDict(FX_BSTRC("AA"));
-
- FX_BOOL bExistOAAction = FALSE;
- FX_BOOL bExistCAAction = FALSE;
if (FPDFPAGE_AACTION_OPEN == aaType) {
- bExistOAAction = aa.ActionExist(CPDF_AAction::OpenPage);
- if (bExistOAAction) {
+ if (aa.ActionExist(CPDF_AAction::OpenPage)) {
CPDF_Action action = aa.GetAction(CPDF_AAction::OpenPage);
pActionHandler->DoAction_Page(action, CPDF_AAction::OpenPage, pSDKDoc);
}
} else {
- bExistCAAction = aa.ActionExist(CPDF_AAction::ClosePage);
- if (bExistCAAction) {
+ if (aa.ActionExist(CPDF_AAction::ClosePage)) {
CPDF_Action action = aa.GetAction(CPDF_AAction::ClosePage);
pActionHandler->DoAction_Page(action, CPDF_AAction::ClosePage, pSDKDoc);
}