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_edit/editint.h" | 7 #include "core/fpdfapi/fpdf_edit/editint.h" |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 1392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1403 m_ObjectOffset.Add(dwStart, j - dwStart); | 1403 m_ObjectOffset.Add(dwStart, j - dwStart); |
1404 dwStart = j; | 1404 dwStart = j; |
1405 } | 1405 } |
1406 } | 1406 } |
1407 void CPDF_Creator::InitNewObjNumOffsets() { | 1407 void CPDF_Creator::InitNewObjNumOffsets() { |
1408 FX_BOOL bIncremental = (m_dwFlags & FPDFCREATE_INCREMENTAL) != 0; | 1408 FX_BOOL bIncremental = (m_dwFlags & FPDFCREATE_INCREMENTAL) != 0; |
1409 FX_BOOL bNoOriginal = (m_dwFlags & FPDFCREATE_NO_ORIGINAL) != 0; | 1409 FX_BOOL bNoOriginal = (m_dwFlags & FPDFCREATE_NO_ORIGINAL) != 0; |
1410 for (const auto& pair : m_pDocument->m_IndirectObjs) { | 1410 for (const auto& pair : m_pDocument->m_IndirectObjs) { |
1411 const uint32_t objnum = pair.first; | 1411 const uint32_t objnum = pair.first; |
1412 const CPDF_Object* pObj = pair.second; | 1412 const CPDF_Object* pObj = pair.second; |
1413 if (pObj->GetObjNum() == -1) | 1413 if (pObj->GetObjNum() == CPDF_Object::kInvalidObjNum) |
1414 continue; | 1414 continue; |
1415 if (bIncremental) { | 1415 if (bIncremental) { |
1416 if (!pObj->IsModified()) | 1416 if (!pObj->IsModified()) |
1417 continue; | 1417 continue; |
1418 } else if (m_pParser && m_pParser->IsValidObjectNumber(objnum) && | 1418 } else if (m_pParser && m_pParser->IsValidObjectNumber(objnum) && |
1419 m_pParser->GetObjectType(objnum)) { | 1419 m_pParser->GetObjectType(objnum)) { |
1420 continue; | 1420 continue; |
1421 } | 1421 } |
1422 AppendNewObjNum(objnum); | 1422 AppendNewObjNum(objnum); |
1423 } | 1423 } |
(...skipping 645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2069 m_bNewCrypto = FALSE; | 2069 m_bNewCrypto = FALSE; |
2070 if (!m_bStandardSecurity) { | 2070 if (!m_bStandardSecurity) { |
2071 return; | 2071 return; |
2072 } | 2072 } |
2073 if (m_pEncryptDict) { | 2073 if (m_pEncryptDict) { |
2074 m_pEncryptDict->Release(); | 2074 m_pEncryptDict->Release(); |
2075 m_pEncryptDict = NULL; | 2075 m_pEncryptDict = NULL; |
2076 } | 2076 } |
2077 m_bStandardSecurity = FALSE; | 2077 m_bStandardSecurity = FALSE; |
2078 } | 2078 } |
OLD | NEW |