| 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 "core/fpdfapi/fpdf_parser/include/cpdf_document.h" | 7 #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h" |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 722 #ifndef PDF_ENABLE_XFA | 722 #ifndef PDF_ENABLE_XFA |
| 723 return 0; | 723 return 0; |
| 724 #else // PDF_ENABLE_XFA | 724 #else // PDF_ENABLE_XFA |
| 725 return 0xFFFFFFFF; | 725 return 0xFFFFFFFF; |
| 726 #endif | 726 #endif |
| 727 } | 727 } |
| 728 return m_pParser->GetPermissions(); | 728 return m_pParser->GetPermissions(); |
| 729 } | 729 } |
| 730 | 730 |
| 731 FX_BOOL CPDF_Document::IsFormStream(uint32_t objnum, FX_BOOL& bForm) const { | 731 FX_BOOL CPDF_Document::IsFormStream(uint32_t objnum, FX_BOOL& bForm) const { |
| 732 auto it = m_IndirectObjs.find(objnum); | 732 CPDF_Object* pObj = GetIndirectObject(objnum); |
| 733 if (it != m_IndirectObjs.end()) { | 733 if (pObj) { |
| 734 CPDF_Stream* pStream = it->second->AsStream(); | 734 CPDF_Stream* pStream = pObj->AsStream(); |
| 735 bForm = pStream && pStream->GetDict()->GetStringBy("Subtype") == "Form"; | 735 bForm = pStream && pStream->GetDict()->GetStringBy("Subtype") == "Form"; |
| 736 return TRUE; | 736 return TRUE; |
| 737 } | 737 } |
| 738 if (!m_pParser) { | 738 if (!m_pParser) { |
| 739 bForm = FALSE; | 739 bForm = FALSE; |
| 740 return TRUE; | 740 return TRUE; |
| 741 } | 741 } |
| 742 return m_pParser->IsFormStream(objnum, bForm); | 742 return m_pParser->IsFormStream(objnum, bForm); |
| 743 } | 743 } |
| 744 | 744 |
| (...skipping 698 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1443 } | 1443 } |
| 1444 } | 1444 } |
| 1445 pFontDesc->SetAtInteger("StemV", fStemV); | 1445 pFontDesc->SetAtInteger("StemV", fStemV); |
| 1446 AddIndirectObject(pFontDesc); | 1446 AddIndirectObject(pFontDesc); |
| 1447 pFontDict->SetAtReference("FontDescriptor", this, pFontDesc); | 1447 pFontDict->SetAtReference("FontDescriptor", this, pFontDesc); |
| 1448 CFRelease(traits); | 1448 CFRelease(traits); |
| 1449 CFRelease(languages); | 1449 CFRelease(languages); |
| 1450 return LoadFont(pBaseDict); | 1450 return LoadFont(pBaseDict); |
| 1451 } | 1451 } |
| 1452 #endif // _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ | 1452 #endif // _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ |
| OLD | NEW |