| 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 "xfa/fxfa/xfa_ffdoc.h" | 7 #include "xfa/fxfa/xfa_ffdoc.h" |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 | 10 |
| (...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 | 352 |
| 353 if (m_dwDocType != XFA_DOCTYPE_XDP && m_pStream && m_bOwnStream) { | 353 if (m_dwDocType != XFA_DOCTYPE_XDP && m_pStream && m_bOwnStream) { |
| 354 m_pStream->Release(); | 354 m_pStream->Release(); |
| 355 m_pStream = nullptr; | 355 m_pStream = nullptr; |
| 356 } | 356 } |
| 357 | 357 |
| 358 for (const auto& pair : m_HashToDibDpiMap) | 358 for (const auto& pair : m_HashToDibDpiMap) |
| 359 delete pair.second.pDibSource; | 359 delete pair.second.pDibSource; |
| 360 | 360 |
| 361 m_HashToDibDpiMap.clear(); | 361 m_HashToDibDpiMap.clear(); |
| 362 | 362 m_pApp->ClearEventTargets(); |
| 363 FWL_GetApp()->GetNoteDriver()->ClearEventTargets(FALSE); | |
| 364 return TRUE; | 363 return TRUE; |
| 365 } | 364 } |
| 366 void CXFA_FFDoc::SetDocType(uint32_t dwType) { | 365 void CXFA_FFDoc::SetDocType(uint32_t dwType) { |
| 367 m_dwDocType = dwType; | 366 m_dwDocType = dwType; |
| 368 } | 367 } |
| 369 CPDF_Document* CXFA_FFDoc::GetPDFDoc() { | 368 CPDF_Document* CXFA_FFDoc::GetPDFDoc() { |
| 370 return m_pPDFDoc; | 369 return m_pPDFDoc; |
| 371 } | 370 } |
| 372 | 371 |
| 373 CFX_DIBitmap* CXFA_FFDoc::GetPDFNamedImage(const CFX_WideStringC& wsName, | 372 CFX_DIBitmap* CXFA_FFDoc::GetPDFNamedImage(const CFX_WideStringC& wsName, |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 444 | 443 |
| 445 return !!pExport->Export( | 444 return !!pExport->Export( |
| 446 pFile, pNode, 0, bsChecksum.GetLength() ? bsChecksum.c_str() : nullptr); | 445 pFile, pNode, 0, bsChecksum.GetLength() ? bsChecksum.c_str() : nullptr); |
| 447 } | 446 } |
| 448 | 447 |
| 449 FX_BOOL CXFA_FFDoc::ImportData(IFX_SeekableReadStream* pStream, FX_BOOL bXDP) { | 448 FX_BOOL CXFA_FFDoc::ImportData(IFX_SeekableReadStream* pStream, FX_BOOL bXDP) { |
| 450 std::unique_ptr<CXFA_DataImporter> importer( | 449 std::unique_ptr<CXFA_DataImporter> importer( |
| 451 new CXFA_DataImporter(m_pDocumentParser->GetDocument())); | 450 new CXFA_DataImporter(m_pDocumentParser->GetDocument())); |
| 452 return importer->ImportData(pStream); | 451 return importer->ImportData(pStream); |
| 453 } | 452 } |
| OLD | NEW |