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

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

Issue 1652543003: Merge to XFA: Add tests for CBA_AnnotIterator. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 4 years, 10 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 | « fpdfsdk/src/fsdk_baseform_embeddertest.cpp ('k') | pdfium.gyp » ('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 <algorithm> 7 #include <algorithm>
8 #include <memory> 8 #include <memory>
9 9
10 #include "fpdfsdk/include/fsdk_mgr.h" 10 #include "fpdfsdk/include/fsdk_mgr.h"
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 m_pActionHandler.reset(new CPDFSDK_ActionHandler()); 383 m_pActionHandler.reset(new CPDFSDK_ActionHandler());
384 return m_pActionHandler.get(); 384 return m_pActionHandler.get();
385 } 385 }
386 386
387 CFFL_IFormFiller* CPDFDoc_Environment::GetIFormFiller() { 387 CFFL_IFormFiller* CPDFDoc_Environment::GetIFormFiller() {
388 if (!m_pIFormFiller) 388 if (!m_pIFormFiller)
389 m_pIFormFiller.reset(new CFFL_IFormFiller(this)); 389 m_pIFormFiller.reset(new CFFL_IFormFiller(this));
390 return m_pIFormFiller.get(); 390 return m_pIFormFiller.get();
391 } 391 }
392 392
393 // static
394 CPDFSDK_Document* CPDFSDK_Document::FromFPDFFormHandle(
395 FPDF_FORMHANDLE hHandle) {
396 CPDFDoc_Environment* pEnv = static_cast<CPDFDoc_Environment*>(hHandle);
397 return pEnv ? pEnv->GetSDKDocument() : nullptr;
398 }
399
393 CPDFSDK_Document::CPDFSDK_Document(UnderlyingDocumentType* pDoc, 400 CPDFSDK_Document::CPDFSDK_Document(UnderlyingDocumentType* pDoc,
394 CPDFDoc_Environment* pEnv) 401 CPDFDoc_Environment* pEnv)
395 : m_pDoc(pDoc), 402 : m_pDoc(pDoc),
396 m_pFocusAnnot(nullptr), 403 m_pFocusAnnot(nullptr),
397 m_pEnv(pEnv), 404 m_pEnv(pEnv),
398 m_bChangeMask(FALSE), 405 m_bChangeMask(FALSE),
399 m_bBeingDestroyed(FALSE) {} 406 m_bBeingDestroyed(FALSE) {}
400 407
401 CPDFSDK_Document::~CPDFSDK_Document() { 408 CPDFSDK_Document::~CPDFSDK_Document() {
402 m_bBeingDestroyed = TRUE; 409 m_bBeingDestroyed = TRUE;
(...skipping 769 matching lines...) Expand 10 before | Expand all | Expand 10 after
1172 CPDFSDK_Annot* pFocusAnnot = m_pSDKDoc->GetFocusAnnot(); 1179 CPDFSDK_Annot* pFocusAnnot = m_pSDKDoc->GetFocusAnnot();
1173 if (!pFocusAnnot) 1180 if (!pFocusAnnot)
1174 return nullptr; 1181 return nullptr;
1175 1182
1176 for (CPDFSDK_Annot* pAnnot : m_fxAnnotArray) { 1183 for (CPDFSDK_Annot* pAnnot : m_fxAnnotArray) {
1177 if (pAnnot == pFocusAnnot) 1184 if (pAnnot == pFocusAnnot)
1178 return pAnnot; 1185 return pAnnot;
1179 } 1186 }
1180 return nullptr; 1187 return nullptr;
1181 } 1188 }
OLDNEW
« no previous file with comments | « fpdfsdk/src/fsdk_baseform_embeddertest.cpp ('k') | pdfium.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698