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

Side by Side Diff: xfa/fxfa/app/xfa_ffwidgethandler.cpp

Issue 2031873003: Get rid of NULLs in xfa/ (Closed) Base URL: https://pdfium.googlesource.com/pdfium@nullptr_fpdfsdk
Patch Set: Created 4 years, 6 months 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 | « xfa/fxfa/app/xfa_ffwidgetacc.cpp ('k') | xfa/fxfa/app/xfa_fontmgr.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 "xfa/fxfa/include/xfa_ffwidgethandler.h" 7 #include "xfa/fxfa/include/xfa_ffwidgethandler.h"
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 } 475 }
476 476
477 CXFA_Node* CXFA_FFWidgetHandler::CreateSubform(CXFA_Node* pParent, 477 CXFA_Node* CXFA_FFWidgetHandler::CreateSubform(CXFA_Node* pParent,
478 CXFA_Node* pBefore) const { 478 CXFA_Node* pBefore) const {
479 return CreateFormItem(XFA_ELEMENT_Subform, pParent, pBefore); 479 return CreateFormItem(XFA_ELEMENT_Subform, pParent, pBefore);
480 } 480 }
481 481
482 CXFA_Node* CXFA_FFWidgetHandler::CreateFormItem(XFA_ELEMENT eElement, 482 CXFA_Node* CXFA_FFWidgetHandler::CreateFormItem(XFA_ELEMENT eElement,
483 CXFA_Node* pParent, 483 CXFA_Node* pParent,
484 CXFA_Node* pBefore) const { 484 CXFA_Node* pBefore) const {
485 CXFA_Node* pTemplateParent = pParent ? pParent->GetTemplateNode() : NULL; 485 CXFA_Node* pTemplateParent = pParent ? pParent->GetTemplateNode() : nullptr;
486 CXFA_Node* pNewFormItem = pTemplateParent->CloneTemplateToForm(FALSE); 486 CXFA_Node* pNewFormItem = pTemplateParent->CloneTemplateToForm(FALSE);
487 if (pParent) 487 if (pParent)
488 pParent->InsertChild(pNewFormItem, pBefore); 488 pParent->InsertChild(pNewFormItem, pBefore);
489 return pNewFormItem; 489 return pNewFormItem;
490 } 490 }
491 491
492 CXFA_Node* CXFA_FFWidgetHandler::CreateCopyNode(XFA_ELEMENT eElement, 492 CXFA_Node* CXFA_FFWidgetHandler::CreateCopyNode(XFA_ELEMENT eElement,
493 CXFA_Node* pParent, 493 CXFA_Node* pParent,
494 CXFA_Node* pBefore) const { 494 CXFA_Node* pBefore) const {
495 CXFA_Node* pTemplateParent = pParent ? pParent->GetTemplateNode() : NULL; 495 CXFA_Node* pTemplateParent = pParent ? pParent->GetTemplateNode() : nullptr;
496 CXFA_Node* pNewNode = 496 CXFA_Node* pNewNode =
497 CreateTemplateNode(eElement, pTemplateParent, 497 CreateTemplateNode(eElement, pTemplateParent,
498 pBefore ? pBefore->GetTemplateNode() : NULL) 498 pBefore ? pBefore->GetTemplateNode() : nullptr)
499 ->Clone(FALSE); 499 ->Clone(FALSE);
500 if (pParent) 500 if (pParent)
501 pParent->InsertChild(pNewNode, pBefore); 501 pParent->InsertChild(pNewNode, pBefore);
502 return pNewNode; 502 return pNewNode;
503 } 503 }
504 504
505 CXFA_Node* CXFA_FFWidgetHandler::CreateTemplateNode(XFA_ELEMENT eElement, 505 CXFA_Node* CXFA_FFWidgetHandler::CreateTemplateNode(XFA_ELEMENT eElement,
506 CXFA_Node* pParent, 506 CXFA_Node* pParent,
507 CXFA_Node* pBefore) const { 507 CXFA_Node* pBefore) const {
508 CXFA_Document* pXFADoc = GetXFADoc(); 508 CXFA_Document* pXFADoc = GetXFADoc();
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 } 546 }
547 547
548 CXFA_Document* CXFA_FFWidgetHandler::GetObjFactory() const { 548 CXFA_Document* CXFA_FFWidgetHandler::GetObjFactory() const {
549 return GetXFADoc()->GetParser()->GetFactory(); 549 return GetXFADoc()->GetParser()->GetFactory();
550 } 550 }
551 551
552 CXFA_Document* CXFA_FFWidgetHandler::GetXFADoc() const { 552 CXFA_Document* CXFA_FFWidgetHandler::GetXFADoc() const {
553 return ((CXFA_FFDoc*)(m_pDocView->GetDoc()))->GetXFADoc(); 553 return ((CXFA_FFDoc*)(m_pDocView->GetDoc()))->GetXFADoc();
554 } 554 }
555 555
OLDNEW
« no previous file with comments | « xfa/fxfa/app/xfa_ffwidgetacc.cpp ('k') | xfa/fxfa/app/xfa_fontmgr.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698