| 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 "../../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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |