| 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 834 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 845                       if (!pRoot || | 845                       if (!pRoot || | 
| 846                           (pRef && | 846                           (pRef && | 
| 847                            (FX_DWORD)m_CrossRef.GetSize() > | 847                            (FX_DWORD)m_CrossRef.GetSize() > | 
| 848                                pRef->GetRefObjNum() && | 848                                pRef->GetRefObjNum() && | 
| 849                            m_CrossRef.GetAt(pRef->GetRefObjNum()) != 0)) { | 849                            m_CrossRef.GetAt(pRef->GetRefObjNum()) != 0)) { | 
| 850                         FX_POSITION pos = pTrailer->GetStartPos(); | 850                         FX_POSITION pos = pTrailer->GetStartPos(); | 
| 851                         while (pos) { | 851                         while (pos) { | 
| 852                           CFX_ByteString key; | 852                           CFX_ByteString key; | 
| 853                           CPDF_Object* pElement = | 853                           CPDF_Object* pElement = | 
| 854                               pTrailer->GetNextElement(pos, key); | 854                               pTrailer->GetNextElement(pos, key); | 
| 855                           FX_DWORD dwObjNum = pElement->GetObjNum(); | 855                           FX_DWORD dwObjNum = | 
|  | 856                               pElement ? pElement->GetObjNum() : 0; | 
| 856                           if (dwObjNum) { | 857                           if (dwObjNum) { | 
| 857                             m_pTrailer->SetAtReference(key, m_pDocument, | 858                             m_pTrailer->SetAtReference(key, m_pDocument, | 
| 858                                                        dwObjNum); | 859                                                        dwObjNum); | 
| 859                           } else { | 860                           } else { | 
| 860                             m_pTrailer->SetAt(key, pElement->Clone()); | 861                             m_pTrailer->SetAt(key, pElement->Clone()); | 
| 861                           } | 862                           } | 
| 862                         } | 863                         } | 
| 863                         pObj->Release(); | 864                         pObj->Release(); | 
| 864                       } else { | 865                       } else { | 
| 865                         pObj->Release(); | 866                         pObj->Release(); | 
| (...skipping 4080 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 4946   if (!m_pLinearizedDict) | 4947   if (!m_pLinearizedDict) | 
| 4947     return -1; | 4948     return -1; | 
| 4948   CPDF_Array* pRange = m_pLinearizedDict->GetArray(FX_BSTRC("H")); | 4949   CPDF_Array* pRange = m_pLinearizedDict->GetArray(FX_BSTRC("H")); | 
| 4949   if (!pRange) | 4950   if (!pRange) | 
| 4950     return -1; | 4951     return -1; | 
| 4951   CPDF_Object* pStreamLen = pRange->GetElementValue(1); | 4952   CPDF_Object* pStreamLen = pRange->GetElementValue(1); | 
| 4952   if (!pStreamLen) | 4953   if (!pStreamLen) | 
| 4953     return -1; | 4954     return -1; | 
| 4954   return pStreamLen->GetInteger(); | 4955   return pStreamLen->GetInteger(); | 
| 4955 } | 4956 } | 
| OLD | NEW | 
|---|