| OLD | NEW |
| 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 | 8 |
| 9 #include "../../public/fpdf_ext.h" | 9 #include "../../public/fpdf_ext.h" |
| 10 #include "../../third_party/base/nonstd_unique_ptr.h" | 10 #include "../../third_party/base/nonstd_unique_ptr.h" |
| (...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 380 } | 380 } |
| 381 | 381 |
| 382 CFFL_IFormFiller* CPDFDoc_Environment::GetIFormFiller() { | 382 CFFL_IFormFiller* CPDFDoc_Environment::GetIFormFiller() { |
| 383 if (!m_pIFormFiller) | 383 if (!m_pIFormFiller) |
| 384 m_pIFormFiller.reset(new CFFL_IFormFiller(this)); | 384 m_pIFormFiller.reset(new CFFL_IFormFiller(this)); |
| 385 return m_pIFormFiller.get(); | 385 return m_pIFormFiller.get(); |
| 386 } | 386 } |
| 387 | 387 |
| 388 CPDFSDK_Document::CPDFSDK_Document(CPDF_Document* pDoc, | 388 CPDFSDK_Document::CPDFSDK_Document(CPDF_Document* pDoc, |
| 389 CPDFDoc_Environment* pEnv) | 389 CPDFDoc_Environment* pEnv) |
| 390 : m_pDoc(pDoc), m_pFocusAnnot(nullptr), m_pEnv(pEnv), m_bChangeMask(FALSE) { | 390 : m_pDoc(pDoc), |
| 391 m_pFocusAnnot(nullptr), |
| 392 m_pEnv(pEnv), |
| 393 m_bChangeMask(FALSE), |
| 394 m_bBeingDestroyed(FALSE) { |
| 391 } | 395 } |
| 392 | 396 |
| 393 CPDFSDK_Document::~CPDFSDK_Document() { | 397 CPDFSDK_Document::~CPDFSDK_Document() { |
| 394 m_bBeingDestroyed = TRUE; | 398 m_bBeingDestroyed = TRUE; |
| 395 | 399 |
| 396 for (auto& it : m_pageMap) | 400 for (auto& it : m_pageMap) |
| 397 it.second->KillFocusAnnotIfNeeded(); | 401 it.second->KillFocusAnnotIfNeeded(); |
| 398 | 402 |
| 399 for (auto& it : m_pageMap) | 403 for (auto& it : m_pageMap) |
| 400 delete it.second; | 404 delete it.second; |
| (...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 922 CPDFSDK_Annot* pFocusAnnot = m_pSDKDoc->GetFocusAnnot(); | 926 CPDFSDK_Annot* pFocusAnnot = m_pSDKDoc->GetFocusAnnot(); |
| 923 if (!pFocusAnnot) | 927 if (!pFocusAnnot) |
| 924 return nullptr; | 928 return nullptr; |
| 925 | 929 |
| 926 for (CPDFSDK_Annot* pAnnot : m_fxAnnotArray) { | 930 for (CPDFSDK_Annot* pAnnot : m_fxAnnotArray) { |
| 927 if (pAnnot == pFocusAnnot) | 931 if (pAnnot == pFocusAnnot) |
| 928 return pAnnot; | 932 return pAnnot; |
| 929 } | 933 } |
| 930 return nullptr; | 934 return nullptr; |
| 931 } | 935 } |
| OLD | NEW |