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

Side by Side Diff: fpdfsdk/src/fpdfeditpage.cpp

Issue 1425093003: Clean up CPDF_AnnotList. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: revert error Created 5 years, 1 month 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 | « fpdfsdk/src/fpdf_ext.cpp ('k') | fpdfsdk/src/fsdk_baseform.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 "../../public/fpdf_edit.h" 7 #include "../../public/fpdf_edit.h"
8 #include "../../public/fpdf_formfill.h" 8 #include "../../public/fpdf_formfill.h"
9 #include "../include/fsdk_define.h" 9 #include "../include/fsdk_define.h"
10 10
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 double a, 270 double a,
271 double b, 271 double b,
272 double c, 272 double c,
273 double d, 273 double d,
274 double e, 274 double e,
275 double f) { 275 double f) {
276 CPDF_Page* pPage = CPDFPageFromFPDFPage(page); 276 CPDF_Page* pPage = CPDFPageFromFPDFPage(page);
277 if (!pPage) 277 if (!pPage)
278 return; 278 return;
279 CPDF_AnnotList AnnotList(pPage); 279 CPDF_AnnotList AnnotList(pPage);
280 for (int i = 0; i < AnnotList.Count(); i++) { 280 for (size_t i = 0; i < AnnotList.Count(); ++i) {
281 CPDF_Annot* pAnnot = AnnotList.GetAt(i); 281 CPDF_Annot* pAnnot = AnnotList.GetAt(i);
282 // transformAnnots Rectangle 282 // transformAnnots Rectangle
283 CPDF_Rect rect; 283 CPDF_Rect rect;
284 pAnnot->GetRect(rect); 284 pAnnot->GetRect(rect);
285 CFX_AffineMatrix matrix((FX_FLOAT)a, (FX_FLOAT)b, (FX_FLOAT)c, (FX_FLOAT)d, 285 CFX_AffineMatrix matrix((FX_FLOAT)a, (FX_FLOAT)b, (FX_FLOAT)c, (FX_FLOAT)d,
286 (FX_FLOAT)e, (FX_FLOAT)f); 286 (FX_FLOAT)e, (FX_FLOAT)f);
287 rect.Transform(&matrix); 287 rect.Transform(&matrix);
288 CPDF_Array* pRectArray = NULL; 288 CPDF_Array* pRectArray = NULL;
289 pRectArray = pAnnot->GetAnnotDict()->GetArray("Rect"); 289 pRectArray = pAnnot->GetAnnotDict()->GetArray("Rect");
290 if (!pRectArray) 290 if (!pRectArray)
(...skipping 15 matching lines...) Expand all
306 !pPage->m_pFormDict->GetElement("Type")->GetDirect() || 306 !pPage->m_pFormDict->GetElement("Type")->GetDirect() ||
307 pPage->m_pFormDict->GetElement("Type")->GetDirect()->GetString().Compare( 307 pPage->m_pFormDict->GetElement("Type")->GetDirect()->GetString().Compare(
308 "Page")) { 308 "Page")) {
309 return; 309 return;
310 } 310 }
311 CPDF_Dictionary* pDict = pPage->m_pFormDict; 311 CPDF_Dictionary* pDict = pPage->m_pFormDict;
312 rotate %= 4; 312 rotate %= 4;
313 313
314 pDict->SetAt("Rotate", new CPDF_Number(rotate * 90)); 314 pDict->SetAt("Rotate", new CPDF_Number(rotate * 90));
315 } 315 }
OLDNEW
« no previous file with comments | « fpdfsdk/src/fpdf_ext.cpp ('k') | fpdfsdk/src/fsdk_baseform.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698