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

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

Issue 1413883005: More master side changes for convergence with XFA. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Remove fn. Created 5 years, 2 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
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 22 matching lines...) Expand all
33 } 33 }
34 34
35 CPDF_Dictionary* pInfoDict = NULL; 35 CPDF_Dictionary* pInfoDict = NULL;
36 pInfoDict = pDoc->GetInfo(); 36 pInfoDict = pDoc->GetInfo();
37 if (pInfoDict) { 37 if (pInfoDict) {
38 if (FSDK_IsSandBoxPolicyEnabled(FPDF_POLICY_MACHINETIME_ACCESS)) 38 if (FSDK_IsSandBoxPolicyEnabled(FPDF_POLICY_MACHINETIME_ACCESS))
39 pInfoDict->SetAt("CreationDate", new CPDF_String(DateStr)); 39 pInfoDict->SetAt("CreationDate", new CPDF_String(DateStr));
40 pInfoDict->SetAt("Creator", new CPDF_String(L"PDFium")); 40 pInfoDict->SetAt("Creator", new CPDF_String(L"PDFium"));
41 } 41 }
42 42
43 return pDoc; 43 return FPDFDocumentFromCPDFDocument(pDoc);
44 } 44 }
45 45
46 DLLEXPORT void STDCALL FPDFPage_Delete(FPDF_DOCUMENT document, int page_index) { 46 DLLEXPORT void STDCALL FPDFPage_Delete(FPDF_DOCUMENT document, int page_index) {
47 CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document); 47 CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document);
48 if (!pDoc || page_index < 0 || page_index >= pDoc->GetPageCount()) 48 if (!pDoc || page_index < 0 || page_index >= pDoc->GetPageCount())
49 return; 49 return;
50 50
51 pDoc->DeletePage(page_index); 51 pDoc->DeletePage(page_index);
52 } 52 }
53 53
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
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

Powered by Google App Engine
This is Rietveld 408576698