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

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

Issue 700373006: Correct typo in form fill environment functions (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: More corrections Created 6 years, 1 month 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/include/fpdfformfill.h ('k') | no next file » | 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 "../include/fpdfview.h" 7 #include "../include/fpdfview.h"
8 #include "../include/fpdfformfill.h" 8 #include "../include/fpdfformfill.h"
9 #include "../include/fsdk_define.h" 9 #include "../include/fsdk_define.h"
10 #include "../include/fsdk_mgr.h" 10 #include "../include/fsdk_mgr.h"
(...skipping 23 matching lines...) Expand all
34 { 34 {
35 delete pInterForm; 35 delete pInterForm;
36 return -1; 36 return -1;
37 } 37 }
38 38
39 int nType = pFormField->GetFieldType(); 39 int nType = pFormField->GetFieldType();
40 delete pInterForm; 40 delete pInterForm;
41 return nType; 41 return nType;
42 } 42 }
43 43
44 DLLEXPORT FPDF_FORMHANDLE STDCALL FPDFDOC_InitFormFillEnviroument(FPDF_DOCUMENT document, FPDF_FORMFILLINFO* formInfo) 44 DLLEXPORT FPDF_FORMHANDLE STDCALL FPDFDOC_InitFormFillEnvironment(FPDF_DOCUMENT document, FPDF_FORMFILLINFO* formInfo)
45 { 45 {
46 if(!document || !formInfo || formInfo->version!=1) 46 if(!document || !formInfo || formInfo->version!=1)
47 return NULL; 47 return NULL;
48 CPDF_Document * pDocument = (CPDF_Document*) document; 48 CPDF_Document * pDocument = (CPDF_Document*) document;
49 CPDFDoc_Environment * pEnv = NULL; 49 CPDFDoc_Environment * pEnv = NULL;
50 pEnv = new CPDFDoc_Environment(pDocument); 50 pEnv = new CPDFDoc_Environment(pDocument);
51 if (!pEnv) 51 if (!pEnv)
52 return NULL; 52 return NULL;
53 pEnv->RegAppHandle(formInfo); 53 pEnv->RegAppHandle(formInfo);
54 54
55 if(pEnv->GetPDFDocument()) 55 if(pEnv->GetPDFDocument())
56 { 56 {
57 CPDFSDK_Document* pSDKDoc = new CPDFSDK_Document(pEnv->GetPDFDoc ument(), pEnv); 57 CPDFSDK_Document* pSDKDoc = new CPDFSDK_Document(pEnv->GetPDFDoc ument(), pEnv);
58 if(pSDKDoc) 58 if(pSDKDoc)
59 pEnv->SetCurrentDoc(pSDKDoc); 59 pEnv->SetCurrentDoc(pSDKDoc);
60 } 60 }
61 return pEnv; 61 return pEnv;
62 } 62 }
63 63
64 DLLEXPORT void STDCALL FPDFDOC_ExitFormFillEnviroument(FPDF_FORMHANDLE hHandle) 64 DLLEXPORT void STDCALL FPDFDOC_ExitFormFillEnvironment(FPDF_FORMHANDLE hHandle)
65 { 65 {
66 if(!hHandle) 66 if(!hHandle)
67 return; 67 return;
68 CPDFSDK_Document* pSDKDoc = ((CPDFDoc_Environment*)hHandle)->GetCurrentD oc(); 68 CPDFSDK_Document* pSDKDoc = ((CPDFDoc_Environment*)hHandle)->GetCurrentD oc();
69 if(pSDKDoc) 69 if(pSDKDoc)
70 { 70 {
71 ((CPDFDoc_Environment*)hHandle)->SetCurrentDoc(NULL); 71 ((CPDFDoc_Environment*)hHandle)->SetCurrentDoc(NULL);
72 delete pSDKDoc; 72 delete pSDKDoc;
73 } 73 }
74 delete (CPDFDoc_Environment*)hHandle; 74 delete (CPDFDoc_Environment*)hHandle;
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 if (bExistCAAction) 432 if (bExistCAAction)
433 { 433 {
434 CPDF_Action action = aa.GetAction(CPDF_AAction:: ClosePage); 434 CPDF_Action action = aa.GetAction(CPDF_AAction:: ClosePage);
435 pActionHandler->DoAction_Page(action, CPDF_AActi on::ClosePage, pSDKDoc); 435 pActionHandler->DoAction_Page(action, CPDF_AActi on::ClosePage, pSDKDoc);
436 } 436 }
437 } 437 }
438 } 438 }
439 } 439 }
440 440
441 441
OLDNEW
« no previous file with comments | « fpdfsdk/include/fpdfformfill.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698