Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1008)

Side by Side Diff: core/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp

Issue 1918113002: Clean up CPDF_Page. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: more Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « BUILD.gn ('k') | core/fpdfapi/fpdf_font/cpdf_type3font.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « BUILD.gn ('k') | core/fpdfapi/fpdf_font/cpdf_type3font.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698