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 | 8 |
9 #include "core/fpdfapi/fpdf_edit/include/cpdf_pagecontentgenerator.h" | 9 #include "core/fpdfapi/fpdf_edit/include/cpdf_pagecontentgenerator.h" |
10 #include "core/fpdfapi/fpdf_page/include/cpdf_form.h" | 10 #include "core/fpdfapi/fpdf_page/include/cpdf_form.h" |
11 #include "core/fpdfapi/fpdf_page/include/cpdf_formobject.h" | 11 #include "core/fpdfapi/fpdf_page/include/cpdf_formobject.h" |
12 #include "core/fpdfapi/fpdf_page/include/cpdf_generalstatedata.h" | 12 #include "core/fpdfapi/fpdf_page/include/cpdf_generalstatedata.h" |
13 #include "core/fpdfapi/fpdf_page/include/cpdf_imageobject.h" | 13 #include "core/fpdfapi/fpdf_page/include/cpdf_imageobject.h" |
14 #include "core/fpdfapi/fpdf_page/include/cpdf_page.h" | 14 #include "core/fpdfapi/fpdf_page/include/cpdf_page.h" |
15 #include "core/fpdfapi/fpdf_page/include/cpdf_pageobject.h" | 15 #include "core/fpdfapi/fpdf_page/include/cpdf_pageobject.h" |
16 #include "core/fpdfapi/fpdf_page/include/cpdf_pathobject.h" | 16 #include "core/fpdfapi/fpdf_page/include/cpdf_pathobject.h" |
17 #include "core/fpdfapi/fpdf_page/include/cpdf_shadingobject.h" | 17 #include "core/fpdfapi/fpdf_page/include/cpdf_shadingobject.h" |
18 #include "core/fpdfapi/fpdf_parser/include/cpdf_array.h" | 18 #include "core/fpdfapi/fpdf_parser/include/cpdf_array.h" |
19 #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h" | 19 #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h" |
20 #include "core/fpdfapi/fpdf_parser/include/cpdf_number.h" | 20 #include "core/fpdfapi/fpdf_parser/include/cpdf_number.h" |
21 #include "core/fpdfapi/fpdf_parser/include/cpdf_string.h" | 21 #include "core/fpdfapi/fpdf_parser/include/cpdf_string.h" |
22 #include "fpdfsdk/include/fsdk_define.h" | 22 #include "fpdfsdk/include/fsdk_define.h" |
23 #include "public/fpdf_formfill.h" | 23 #include "public/fpdf_formfill.h" |
24 #include "third_party/base/stl_util.h" | 24 #include "third_party/base/stl_util.h" |
25 | 25 |
26 #ifdef PDF_ENABLE_XFA | 26 #ifdef PDF_ENABLE_XFA |
27 #include "fpdfsdk/include/fpdfxfa/fpdfxfa_app.h" | 27 #include "fpdfsdk/fpdfxfa/include/fpdfxfa_app.h" |
28 #include "fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h" | 28 #include "fpdfsdk/fpdfxfa/include/fpdfxfa_doc.h" |
29 #include "fpdfsdk/include/fpdfxfa/fpdfxfa_page.h" | 29 #include "fpdfsdk/fpdfxfa/include/fpdfxfa_page.h" |
30 #endif // PDF_ENABLE_XFA | 30 #endif // PDF_ENABLE_XFA |
31 | 31 |
32 #if _FX_OS_ == _FX_ANDROID_ | 32 #if _FX_OS_ == _FX_ANDROID_ |
33 #include "time.h" | 33 #include "time.h" |
34 #else | 34 #else |
35 #include <ctime> | 35 #include <ctime> |
36 #endif | 36 #endif |
37 | 37 |
38 DLLEXPORT FPDF_DOCUMENT STDCALL FPDF_CreateNewDocument() { | 38 DLLEXPORT FPDF_DOCUMENT STDCALL FPDF_CreateNewDocument() { |
39 CPDF_Document* pDoc = new CPDF_Document; | 39 CPDF_Document* pDoc = new CPDF_Document; |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 !pPage->m_pFormDict->GetObjectBy("Type")->GetDirect() || | 313 !pPage->m_pFormDict->GetObjectBy("Type")->GetDirect() || |
314 pPage->m_pFormDict->GetObjectBy("Type")->GetDirect()->GetString().Compare( | 314 pPage->m_pFormDict->GetObjectBy("Type")->GetDirect()->GetString().Compare( |
315 "Page")) { | 315 "Page")) { |
316 return; | 316 return; |
317 } | 317 } |
318 CPDF_Dictionary* pDict = pPage->m_pFormDict; | 318 CPDF_Dictionary* pDict = pPage->m_pFormDict; |
319 rotate %= 4; | 319 rotate %= 4; |
320 | 320 |
321 pDict->SetAt("Rotate", new CPDF_Number(rotate * 90)); | 321 pDict->SetAt("Rotate", new CPDF_Number(rotate * 90)); |
322 } | 322 } |
OLD | NEW |