| 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 <limits.h> | 7 #include <limits.h> |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 1101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1112 int nPages = pPages->GetIntegerBy("Count"); | 1112 int nPages = pPages->GetIntegerBy("Count"); |
| 1113 if (iPage < 0 || iPage >= nPages) | 1113 if (iPage < 0 || iPage >= nPages) |
| 1114 return; | 1114 return; |
| 1115 | 1115 |
| 1116 std::set<CPDF_Dictionary*> stack = {pPages}; | 1116 std::set<CPDF_Dictionary*> stack = {pPages}; |
| 1117 if (InsertDeletePDFPage(this, pPages, iPage, nullptr, FALSE, &stack) < 0) | 1117 if (InsertDeletePDFPage(this, pPages, iPage, nullptr, FALSE, &stack) < 0) |
| 1118 return; | 1118 return; |
| 1119 | 1119 |
| 1120 m_PageList.RemoveAt(iPage); | 1120 m_PageList.RemoveAt(iPage); |
| 1121 } | 1121 } |
| 1122 | |
| 1123 void FPDFAPI_FlatPageAttr(CPDF_Dictionary* pPageDict, | |
| 1124 const CFX_ByteStringC& name) { | |
| 1125 if (pPageDict->KeyExist(name)) { | |
| 1126 return; | |
| 1127 } | |
| 1128 CPDF_Object* pObj = FPDFAPI_GetPageAttr(pPageDict, name); | |
| 1129 if (pObj) { | |
| 1130 pPageDict->SetAt(name, pObj->Clone()); | |
| 1131 } | |
| 1132 } | |
| OLD | NEW |