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

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

Issue 1430803003: Merge to XFA: Clean up CPDF_AnnotList. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: more merging 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 #include "../include/fpdfxfa/fpdfxfa_doc.h" 10 #include "../include/fpdfxfa/fpdfxfa_doc.h"
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 double a, 273 double a,
274 double b, 274 double b,
275 double c, 275 double c,
276 double d, 276 double d,
277 double e, 277 double e,
278 double f) { 278 double f) {
279 CPDF_Page* pPage = CPDFPageFromFPDFPage(page); 279 CPDF_Page* pPage = CPDFPageFromFPDFPage(page);
280 if (!pPage) 280 if (!pPage)
281 return; 281 return;
282 CPDF_AnnotList AnnotList(pPage); 282 CPDF_AnnotList AnnotList(pPage);
283 for (int i = 0; i < AnnotList.Count(); i++) { 283 for (size_t i = 0; i < AnnotList.Count(); ++i) {
284 CPDF_Annot* pAnnot = AnnotList.GetAt(i); 284 CPDF_Annot* pAnnot = AnnotList.GetAt(i);
285 // transformAnnots Rectangle 285 // transformAnnots Rectangle
286 CPDF_Rect rect; 286 CPDF_Rect rect;
287 pAnnot->GetRect(rect); 287 pAnnot->GetRect(rect);
288 CFX_AffineMatrix matrix((FX_FLOAT)a, (FX_FLOAT)b, (FX_FLOAT)c, (FX_FLOAT)d, 288 CFX_AffineMatrix matrix((FX_FLOAT)a, (FX_FLOAT)b, (FX_FLOAT)c, (FX_FLOAT)d,
289 (FX_FLOAT)e, (FX_FLOAT)f); 289 (FX_FLOAT)e, (FX_FLOAT)f);
290 rect.Transform(&matrix); 290 rect.Transform(&matrix);
291 CPDF_Array* pRectArray = NULL; 291 CPDF_Array* pRectArray = NULL;
292 pRectArray = pAnnot->GetAnnotDict()->GetArray("Rect"); 292 pRectArray = pAnnot->GetAnnotDict()->GetArray("Rect");
293 if (!pRectArray) 293 if (!pRectArray)
(...skipping 15 matching lines...) Expand all
309 !pPage->m_pFormDict->GetElement("Type")->GetDirect() || 309 !pPage->m_pFormDict->GetElement("Type")->GetDirect() ||
310 pPage->m_pFormDict->GetElement("Type")->GetDirect()->GetString().Compare( 310 pPage->m_pFormDict->GetElement("Type")->GetDirect()->GetString().Compare(
311 "Page")) { 311 "Page")) {
312 return; 312 return;
313 } 313 }
314 CPDF_Dictionary* pDict = pPage->m_pFormDict; 314 CPDF_Dictionary* pDict = pPage->m_pFormDict;
315 rotate %= 4; 315 rotate %= 4;
316 316
317 pDict->SetAt("Rotate", new CPDF_Number(rotate * 90)); 317 pDict->SetAt("Rotate", new CPDF_Number(rotate * 90));
318 } 318 }
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