| 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 1347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1358 m_ObjectOffset.Add(dwStart, j - dwStart); | 1358 m_ObjectOffset.Add(dwStart, j - dwStart); |
| 1359 dwStart = j; | 1359 dwStart = j; |
| 1360 } | 1360 } |
| 1361 } | 1361 } |
| 1362 | 1362 |
| 1363 void CPDF_Creator::InitNewObjNumOffsets() { | 1363 void CPDF_Creator::InitNewObjNumOffsets() { |
| 1364 FX_BOOL bIncremental = (m_dwFlags & FPDFCREATE_INCREMENTAL) != 0; | 1364 FX_BOOL bIncremental = (m_dwFlags & FPDFCREATE_INCREMENTAL) != 0; |
| 1365 FX_BOOL bNoOriginal = (m_dwFlags & FPDFCREATE_NO_ORIGINAL) != 0; | 1365 FX_BOOL bNoOriginal = (m_dwFlags & FPDFCREATE_NO_ORIGINAL) != 0; |
| 1366 for (const auto& pair : *m_pDocument) { | 1366 for (const auto& pair : *m_pDocument) { |
| 1367 const uint32_t objnum = pair.first; | 1367 const uint32_t objnum = pair.first; |
| 1368 const CPDF_Object* pObj = pair.second; | 1368 const CPDF_Object* pObj = pair.second.get(); |
| 1369 if (bIncremental || pObj->GetObjNum() == CPDF_Object::kInvalidObjNum) | 1369 if (bIncremental || pObj->GetObjNum() == CPDF_Object::kInvalidObjNum) |
| 1370 continue; | 1370 continue; |
| 1371 if (m_pParser && m_pParser->IsValidObjectNumber(objnum) && | 1371 if (m_pParser && m_pParser->IsValidObjectNumber(objnum) && |
| 1372 m_pParser->GetObjectType(objnum)) { | 1372 m_pParser->GetObjectType(objnum)) { |
| 1373 continue; | 1373 continue; |
| 1374 } | 1374 } |
| 1375 AppendNewObjNum(objnum); | 1375 AppendNewObjNum(objnum); |
| 1376 } | 1376 } |
| 1377 | 1377 |
| 1378 int32_t iCount = m_NewObjNumArray.GetSize(); | 1378 int32_t iCount = m_NewObjNumArray.GetSize(); |
| (...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2016 m_pCryptoHandler = nullptr; | 2016 m_pCryptoHandler = nullptr; |
| 2017 } | 2017 } |
| 2018 void CPDF_Creator::ResetStandardSecurity() { | 2018 void CPDF_Creator::ResetStandardSecurity() { |
| 2019 if (!m_bLocalCryptoHandler) | 2019 if (!m_bLocalCryptoHandler) |
| 2020 return; | 2020 return; |
| 2021 | 2021 |
| 2022 delete m_pCryptoHandler; | 2022 delete m_pCryptoHandler; |
| 2023 m_pCryptoHandler = nullptr; | 2023 m_pCryptoHandler = nullptr; |
| 2024 m_bLocalCryptoHandler = FALSE; | 2024 m_bLocalCryptoHandler = FALSE; |
| 2025 } | 2025 } |
| OLD | NEW |