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

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

Issue 801913002: Simplify PDFium by removing code that's not used in the open source repo. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 6 years 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 "x:/pdf/fpdfapi5/include/fpdfapi.h"
8 #include "../include/fsdk_define.h" 7 #include "../include/fsdk_define.h"
9 #include "../include/fpdfedit.h" 8 #include "../include/fpdfedit.h"
10 9
11 10
12 #if _FX_OS_ == _FX_ANDROID_ 11 #if _FX_OS_ == _FX_ANDROID_
13 #include "time.h" 12 #include "time.h"
14 #else 13 #else
15 #include <ctime> 14 #include <ctime>
16 #endif 15 #endif
17 16
(...skipping 19 matching lines...) Expand all
37 } 36 }
38 } 37 }
39 } 38 }
40 39
41 CPDF_Dictionary* pInfoDict = NULL; 40 CPDF_Dictionary* pInfoDict = NULL;
42 pInfoDict = pDoc->GetInfo(); 41 pInfoDict = pDoc->GetInfo();
43 if (pInfoDict) 42 if (pInfoDict)
44 { 43 {
45 if(FSDK_IsSandBoxPolicyEnabled(FPDF_POLICY_MACHINETIME_ACCESS)) 44 if(FSDK_IsSandBoxPolicyEnabled(FPDF_POLICY_MACHINETIME_ACCESS))
46 pInfoDict->SetAt("CreationDate", new CPDF_String(DateStr )); 45 pInfoDict->SetAt("CreationDate", new CPDF_String(DateStr ));
47 #ifdef FOXIT_CHROME_BUILD 46 » » pInfoDict->SetAt("Creator",FX_NEW CPDF_String(L"PDFium"));
48 » » pInfoDict->SetAt("Creator",FX_NEW CPDF_String(L"Google"));
49 #else
50 » » pInfoDict->SetAt("Creator",FX_NEW CPDF_String(L"Foxit PDF SDK DL L 2.0 - Foxit Software"));
51 #endif
52 } 47 }
53 48
54 return pDoc; 49 return pDoc;
55 } 50 }
56 51
57 DLLEXPORT void STDCALL FPDFPage_Delete(FPDF_DOCUMENT document, int page_index) 52 DLLEXPORT void STDCALL FPDFPage_Delete(FPDF_DOCUMENT document, int page_index)
58 { 53 {
59 CPDF_Document* pDoc = (CPDF_Document*)document; 54 CPDF_Document* pDoc = (CPDF_Document*)document;
60 if (pDoc == NULL) 55 if (pDoc == NULL)
61 return; 56 return;
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 if (!pPage || !pPage->m_pFormDict || !pPage->m_pFormDict->KeyExist("Type ") || !pPage->m_pFormDict->GetElement("Type")->GetDirect() 316 if (!pPage || !pPage->m_pFormDict || !pPage->m_pFormDict->KeyExist("Type ") || !pPage->m_pFormDict->GetElement("Type")->GetDirect()
322 || pPage->m_pFormDict->GetElement("Type")->GetDirect()->GetStrin g().Compare("Page")) 317 || pPage->m_pFormDict->GetElement("Type")->GetDirect()->GetStrin g().Compare("Page"))
323 { 318 {
324 return; 319 return;
325 } 320 }
326 CPDF_Dictionary* pDict = pPage->m_pFormDict; 321 CPDF_Dictionary* pDict = pPage->m_pFormDict;
327 rotate %=4; 322 rotate %=4;
328 323
329 pDict->SetAt("Rotate", FX_NEW CPDF_Number(rotate * 90)); 324 pDict->SetAt("Rotate", FX_NEW CPDF_Number(rotate * 90));
330 } 325 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698