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 <set> | 7 #include <set> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 848 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
859 (pRoot->GetType() == PDFOBJ_REFERENCE && | 859 (pRoot->GetType() == PDFOBJ_REFERENCE && |
860 (FX_DWORD)m_CrossRef.GetSize() > | 860 (FX_DWORD)m_CrossRef.GetSize() > |
861 ((CPDF_Reference*)pRoot)->GetRefObjNum() && | 861 ((CPDF_Reference*)pRoot)->GetRefObjNum() && |
862 m_CrossRef.GetAt(((CPDF_Reference*)pRoot) | 862 m_CrossRef.GetAt(((CPDF_Reference*)pRoot) |
863 ->GetRefObjNum()) != 0)) { | 863 ->GetRefObjNum()) != 0)) { |
864 FX_POSITION pos = pTrailer->GetStartPos(); | 864 FX_POSITION pos = pTrailer->GetStartPos(); |
865 while (pos) { | 865 while (pos) { |
866 CFX_ByteString key; | 866 CFX_ByteString key; |
867 CPDF_Object* pObj = | 867 CPDF_Object* pObj = |
868 pTrailer->GetNextElement(pos, key); | 868 pTrailer->GetNextElement(pos, key); |
869 m_pTrailer->SetAt(key, pObj->Clone(), m_pDocument); | 869 m_pTrailer->SetAtWithIndirect(key, pObj->Clone(), |
| 870 m_pDocument); |
870 } | 871 } |
871 pObj->Release(); | 872 pObj->Release(); |
872 } else { | 873 } else { |
873 pObj->Release(); | 874 pObj->Release(); |
874 } | 875 } |
875 } else { | 876 } else { |
876 if (pObj->IsStream()) { | 877 if (pObj->IsStream()) { |
877 m_pTrailer = ToDictionary(pTrailer->Clone()); | 878 m_pTrailer = ToDictionary(pTrailer->Clone()); |
878 pObj->Release(); | 879 pObj->Release(); |
879 } else { | 880 } else { |
(...skipping 3728 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4608 return FALSE; | 4609 return FALSE; |
4609 } | 4610 } |
4610 CPDF_PageNode::~CPDF_PageNode() { | 4611 CPDF_PageNode::~CPDF_PageNode() { |
4611 int32_t iSize = m_childNode.GetSize(); | 4612 int32_t iSize = m_childNode.GetSize(); |
4612 for (int32_t i = 0; i < iSize; ++i) { | 4613 for (int32_t i = 0; i < iSize; ++i) { |
4613 CPDF_PageNode* pNode = (CPDF_PageNode*)m_childNode[i]; | 4614 CPDF_PageNode* pNode = (CPDF_PageNode*)m_childNode[i]; |
4614 delete pNode; | 4615 delete pNode; |
4615 } | 4616 } |
4616 m_childNode.RemoveAll(); | 4617 m_childNode.RemoveAll(); |
4617 } | 4618 } |
OLD | NEW |