Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(307)

Side by Side Diff: fpdfsdk/src/fpdfformfill.cpp

Issue 1512763013: Get rid of most instance of 'foo != NULL' (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: nits Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « fpdfsdk/src/formfiller/FFL_TextField.cpp ('k') | fpdfsdk/src/fsdk_actionhandler.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "public/fpdf_formfill.h" 7 #include "public/fpdf_formfill.h"
8 8
9 #include "fpdfsdk/include/fsdk_define.h" 9 #include "fpdfsdk/include/fsdk_define.h"
10 #include "fpdfsdk/include/fsdk_mgr.h" 10 #include "fpdfsdk/include/fsdk_mgr.h"
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 CPDF_Document* pDoc = pSDKDoc->GetPDFDocument(); 309 CPDF_Document* pDoc = pSDKDoc->GetPDFDocument();
310 CPDF_Dictionary* pDic = pDoc->GetRoot(); 310 CPDF_Dictionary* pDic = pDoc->GetRoot();
311 if (!pDic) 311 if (!pDic)
312 return; 312 return;
313 313
314 CPDF_AAction aa = pDic->GetDict("AA"); 314 CPDF_AAction aa = pDic->GetDict("AA");
315 if (aa.ActionExist((CPDF_AAction::AActionType)aaType)) { 315 if (aa.ActionExist((CPDF_AAction::AActionType)aaType)) {
316 CPDF_Action action = aa.GetAction((CPDF_AAction::AActionType)aaType); 316 CPDF_Action action = aa.GetAction((CPDF_AAction::AActionType)aaType);
317 CPDFSDK_ActionHandler* pActionHandler = 317 CPDFSDK_ActionHandler* pActionHandler =
318 ((CPDFDoc_Environment*)hHandle)->GetActionHander(); 318 ((CPDFDoc_Environment*)hHandle)->GetActionHander();
319 ASSERT(pActionHandler != NULL);
320 pActionHandler->DoAction_Document(action, (CPDF_AAction::AActionType)aaType, 319 pActionHandler->DoAction_Document(action, (CPDF_AAction::AActionType)aaType,
321 pSDKDoc); 320 pSDKDoc);
322 } 321 }
323 } 322 }
324 323
325 DLLEXPORT void STDCALL FORM_DoPageAAction(FPDF_PAGE page, 324 DLLEXPORT void STDCALL FORM_DoPageAAction(FPDF_PAGE page,
326 FPDF_FORMHANDLE hHandle, 325 FPDF_FORMHANDLE hHandle,
327 int aaType) { 326 int aaType) {
328 if (!hHandle) 327 if (!hHandle)
329 return; 328 return;
(...skipping 13 matching lines...) Expand all
343 pActionHandler->DoAction_Page(action, CPDF_AAction::OpenPage, pSDKDoc); 342 pActionHandler->DoAction_Page(action, CPDF_AAction::OpenPage, pSDKDoc);
344 } 343 }
345 } else { 344 } else {
346 if (aa.ActionExist(CPDF_AAction::ClosePage)) { 345 if (aa.ActionExist(CPDF_AAction::ClosePage)) {
347 CPDF_Action action = aa.GetAction(CPDF_AAction::ClosePage); 346 CPDF_Action action = aa.GetAction(CPDF_AAction::ClosePage);
348 pActionHandler->DoAction_Page(action, CPDF_AAction::ClosePage, pSDKDoc); 347 pActionHandler->DoAction_Page(action, CPDF_AAction::ClosePage, pSDKDoc);
349 } 348 }
350 } 349 }
351 } 350 }
352 } 351 }
OLDNEW
« no previous file with comments | « fpdfsdk/src/formfiller/FFL_TextField.cpp ('k') | fpdfsdk/src/fsdk_actionhandler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698