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

Side by Side Diff: fpdfsdk/fpdfxfa/cpdfxfa_context.cpp

Issue 2576893002: Return unique_ptr from CXFA_FFApp::CreateDoc. (Closed)
Patch Set: Created 4 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/fpdfview.cpp ('k') | xfa/fxfa/app/xfa_ffapp.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 "fpdfsdk/fpdfxfa/cpdfxfa_context.h" 7 #include "fpdfsdk/fpdfxfa/cpdfxfa_context.h"
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 85
86 if (!m_pPDFDoc) 86 if (!m_pPDFDoc)
87 return false; 87 return false;
88 88
89 m_XFAPageList.RemoveAll(); 89 m_XFAPageList.RemoveAll();
90 90
91 CXFA_FFApp* pApp = GetXFAApp(); 91 CXFA_FFApp* pApp = GetXFAApp();
92 if (!pApp) 92 if (!pApp)
93 return false; 93 return false;
94 94
95 m_pXFADoc.reset(pApp->CreateDoc(&m_DocEnv, m_pPDFDoc.get())); 95 m_pXFADoc = pApp->CreateDoc(&m_DocEnv, m_pPDFDoc.get());
96 if (!m_pXFADoc) { 96 if (!m_pXFADoc) {
97 SetLastError(FPDF_ERR_XFALOAD); 97 SetLastError(FPDF_ERR_XFALOAD);
98 return false; 98 return false;
99 } 99 }
100 100
101 CXFA_FFDocHandler* pDocHandler = pApp->GetDocHandler(); 101 CXFA_FFDocHandler* pDocHandler = pApp->GetDocHandler();
102 if (!pDocHandler) { 102 if (!pDocHandler) {
103 SetLastError(FPDF_ERR_XFALOAD); 103 SetLastError(FPDF_ERR_XFALOAD);
104 return false; 104 return false;
105 } 105 }
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 return; 453 return;
454 } 454 }
455 } 455 }
456 456
457 IFWL_AdapterTimerMgr* CPDFXFA_Context::GetTimerMgr() { 457 IFWL_AdapterTimerMgr* CPDFXFA_Context::GetTimerMgr() {
458 CXFA_FWLAdapterTimerMgr* pAdapter = nullptr; 458 CXFA_FWLAdapterTimerMgr* pAdapter = nullptr;
459 if (m_pFormFillEnv) 459 if (m_pFormFillEnv)
460 pAdapter = new CXFA_FWLAdapterTimerMgr(m_pFormFillEnv); 460 pAdapter = new CXFA_FWLAdapterTimerMgr(m_pFormFillEnv);
461 return pAdapter; 461 return pAdapter;
462 } 462 }
OLDNEW
« no previous file with comments | « fpdfsdk/fpdfview.cpp ('k') | xfa/fxfa/app/xfa_ffapp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698