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

Side by Side Diff: fpdfsdk/fpdfeditpage.cpp

Issue 1925453002: Move CPDF_Document code into cpdf_document.cpp. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: nits Created 4 years, 7 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
« no previous file with comments | « fpdfsdk/fpdfdoc_unittest.cpp ('k') | fpdfsdk/pdfwindow/PWL_FontMap.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 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"
(...skipping 18 matching lines...) Expand all
29 #include "fpdfsdk/fpdfxfa/include/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(nullptr);
40 pDoc->CreateNewDoc(); 40 pDoc->CreateNewDoc();
41 time_t currentTime; 41 time_t currentTime;
42 42
43 CFX_ByteString DateStr; 43 CFX_ByteString DateStr;
44 44
45 if (FSDK_IsSandBoxPolicyEnabled(FPDF_POLICY_MACHINETIME_ACCESS)) { 45 if (FSDK_IsSandBoxPolicyEnabled(FPDF_POLICY_MACHINETIME_ACCESS)) {
46 if (-1 != time(&currentTime)) { 46 if (-1 != time(&currentTime)) {
47 tm* pTM = localtime(&currentTime); 47 tm* pTM = localtime(&currentTime);
48 if (pTM) { 48 if (pTM) {
49 DateStr.Format("D:%04d%02d%02d%02d%02d%02d", pTM->tm_year + 1900, 49 DateStr.Format("D:%04d%02d%02d%02d%02d%02d", pTM->tm_year + 1900,
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 !pPage->m_pFormDict->GetObjectBy("Type")->GetDirect() || 312 !pPage->m_pFormDict->GetObjectBy("Type")->GetDirect() ||
313 pPage->m_pFormDict->GetObjectBy("Type")->GetDirect()->GetString().Compare( 313 pPage->m_pFormDict->GetObjectBy("Type")->GetDirect()->GetString().Compare(
314 "Page")) { 314 "Page")) {
315 return; 315 return;
316 } 316 }
317 CPDF_Dictionary* pDict = pPage->m_pFormDict; 317 CPDF_Dictionary* pDict = pPage->m_pFormDict;
318 rotate %= 4; 318 rotate %= 4;
319 319
320 pDict->SetAt("Rotate", new CPDF_Number(rotate * 90)); 320 pDict->SetAt("Rotate", new CPDF_Number(rotate * 90));
321 } 321 }
OLDNEW
« no previous file with comments | « fpdfsdk/fpdfdoc_unittest.cpp ('k') | fpdfsdk/pdfwindow/PWL_FontMap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698