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 void CPDF_Object::Release() | 8 void CPDF_Object::Release() |
9 { | 9 { |
10 if (m_ObjNum) { | 10 if (m_ObjNum) { |
(...skipping 976 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
987 if (FXSYS_memcmp32(srcBuf, destBuf, actualSize) != 0) { | 987 if (FXSYS_memcmp32(srcBuf, destBuf, actualSize) != 0) { |
988 return FALSE; | 988 return FALSE; |
989 } | 989 } |
990 size -= actualSize; | 990 size -= actualSize; |
991 srcOffset += actualSize; | 991 srcOffset += actualSize; |
992 destOffset += actualSize; | 992 destOffset += actualSize; |
993 } | 993 } |
994 return TRUE; | 994 return TRUE; |
995 } | 995 } |
996 if (m_GenNum != (FX_DWORD) - 1 || pOther->m_GenNum != (FX_DWORD) - 1) { | 996 if (m_GenNum != (FX_DWORD) - 1 || pOther->m_GenNum != (FX_DWORD) - 1) { |
| 997 // TODO(tsepez); unused pFile is probably a bug below. |
997 IFX_FileRead* pFile = NULL; | 998 IFX_FileRead* pFile = NULL; |
998 FX_LPBYTE pBuf = NULL; | 999 FX_LPBYTE pBuf = NULL; |
999 FX_DWORD offset = 0; | 1000 FX_DWORD offset = 0; |
1000 if (m_GenNum != (FX_DWORD) - 1) { | 1001 if (m_GenNum != (FX_DWORD) - 1) { |
1001 pFile = m_pFile; | 1002 pFile = m_pFile; |
1002 pBuf = pOther->m_pDataBuf; | 1003 pBuf = pOther->m_pDataBuf; |
1003 offset = m_FileOffset; | 1004 offset = m_FileOffset; |
1004 } | 1005 } |
1005 if (pOther->m_GenNum != (FX_DWORD) - 1) { | 1006 if (pOther->m_GenNum != (FX_DWORD) - 1) { |
1006 pFile = pOther->m_pFile; | 1007 pFile = pOther->m_pFile; |
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1286 pObj->m_ObjNum = objnum; | 1287 pObj->m_ObjNum = objnum; |
1287 m_IndirectObjs.SetAt((FX_LPVOID)(FX_UINTPTR)objnum, pObj); | 1288 m_IndirectObjs.SetAt((FX_LPVOID)(FX_UINTPTR)objnum, pObj); |
1288 if (m_LastObjNum < objnum) { | 1289 if (m_LastObjNum < objnum) { |
1289 m_LastObjNum = objnum; | 1290 m_LastObjNum = objnum; |
1290 } | 1291 } |
1291 } | 1292 } |
1292 FX_DWORD CPDF_IndirectObjects::GetLastObjNum() const | 1293 FX_DWORD CPDF_IndirectObjects::GetLastObjNum() const |
1293 { | 1294 { |
1294 return m_LastObjNum; | 1295 return m_LastObjNum; |
1295 } | 1296 } |
OLD | NEW |