| 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 "../../../include/fpdfapi/fpdf_parser.h" | 7 #include "../../../include/fpdfapi/fpdf_parser.h" |
| 8 #include "../../../include/fxcrt/fx_string.h" | 8 #include "../../../include/fxcrt/fx_string.h" |
| 9 | 9 |
| 10 //static | 10 //static |
| (...skipping 1156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1167 } | 1167 } |
| 1168 FX_LPBYTE p = FX_Alloc(FX_BYTE, m_dwSize); | 1168 FX_LPBYTE p = FX_Alloc(FX_BYTE, m_dwSize); |
| 1169 FXSYS_memcpy32(p, m_pData, m_dwSize); | 1169 FXSYS_memcpy32(p, m_pData, m_dwSize); |
| 1170 return p; | 1170 return p; |
| 1171 } | 1171 } |
| 1172 void CPDF_Reference::SetRef(CPDF_IndirectObjects* pDoc, FX_DWORD objnum) | 1172 void CPDF_Reference::SetRef(CPDF_IndirectObjects* pDoc, FX_DWORD objnum) |
| 1173 { | 1173 { |
| 1174 m_pObjList = pDoc; | 1174 m_pObjList = pDoc; |
| 1175 m_RefObjNum = objnum; | 1175 m_RefObjNum = objnum; |
| 1176 } | 1176 } |
| 1177 CPDF_IndirectObjects::CPDF_IndirectObjects(IPDF_DocParser* pParser) | 1177 CPDF_IndirectObjects::CPDF_IndirectObjects(CPDF_Parser* pParser) |
| 1178 { | 1178 { |
| 1179 m_pParser = pParser; | 1179 m_pParser = pParser; |
| 1180 m_IndirectObjs.InitHashTable(1013); | 1180 m_IndirectObjs.InitHashTable(1013); |
| 1181 if (pParser) { | 1181 if (pParser) { |
| 1182 m_LastObjNum = m_pParser->GetLastObjNum(); | 1182 m_LastObjNum = m_pParser->GetLastObjNum(); |
| 1183 } else { | 1183 } else { |
| 1184 m_LastObjNum = 0; | 1184 m_LastObjNum = 0; |
| 1185 } | 1185 } |
| 1186 } | 1186 } |
| 1187 CPDF_IndirectObjects::~CPDF_IndirectObjects() | 1187 CPDF_IndirectObjects::~CPDF_IndirectObjects() |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1280 pObj->m_ObjNum = objnum; | 1280 pObj->m_ObjNum = objnum; |
| 1281 m_IndirectObjs.SetAt((FX_LPVOID)(FX_UINTPTR)objnum, pObj); | 1281 m_IndirectObjs.SetAt((FX_LPVOID)(FX_UINTPTR)objnum, pObj); |
| 1282 if (m_LastObjNum < objnum) { | 1282 if (m_LastObjNum < objnum) { |
| 1283 m_LastObjNum = objnum; | 1283 m_LastObjNum = objnum; |
| 1284 } | 1284 } |
| 1285 } | 1285 } |
| 1286 FX_DWORD CPDF_IndirectObjects::GetLastObjNum() const | 1286 FX_DWORD CPDF_IndirectObjects::GetLastObjNum() const |
| 1287 { | 1287 { |
| 1288 return m_LastObjNum; | 1288 return m_LastObjNum; |
| 1289 } | 1289 } |
| OLD | NEW |