diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-10-30 13:13:18 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-10-30 13:13:18 -0700 |
commit | 71c5a4c83ba4a3bdb322a19a24dba1ac57655199 (patch) | |
tree | 8f60811daccdbcc19dabeeafdff3835ffc85beb9 /fpdfsdk/src | |
parent | bfba4cb7f22fc19a5e71559f09f2cde19fbb6a79 (diff) | |
download | pdfium-71c5a4c83ba4a3bdb322a19a24dba1ac57655199.tar.xz |
Merge to master: Restore early return in FORM_DoPageAAction()
The early return is present in master, but take the other code
cleanup changes from XFA.
(cherry picked from commit de4791d291b4252045d7922fb838c64d9b711fdf)
Original Review URL: https://codereview.chromium.org/1425223002 .
BUG=pdfium:259
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1415743008 .
Diffstat (limited to 'fpdfsdk/src')
-rw-r--r-- | fpdfsdk/src/fpdfformfill.cpp | 12 |
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); } |