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

Side by Side Diff: fpdfsdk/javascript/Field.cpp

Issue 2394313002: Convert IJS_Runtime to CPDFSDK_FormFillEnvironment (Closed)
Patch Set: Rebase to master Created 4 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 "fpdfsdk/javascript/Field.h" 7 #include "fpdfsdk/javascript/Field.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <memory> 10 #include <memory>
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 iControlNo = -1; 205 iControlNo = -1;
206 return; 206 return;
207 } 207 }
208 } 208 }
209 strFieldName = strFieldNameParsed.substr(0, iStart); 209 strFieldName = strFieldNameParsed.substr(0, iStart);
210 } 210 }
211 211
212 FX_BOOL Field::AttachField(Document* pDocument, 212 FX_BOOL Field::AttachField(Document* pDocument,
213 const CFX_WideString& csFieldName) { 213 const CFX_WideString& csFieldName) {
214 m_pJSDoc = pDocument; 214 m_pJSDoc = pDocument;
215 m_pFormFillEnv.Reset(pDocument->GetReaderDoc()->GetEnv()); 215 m_pFormFillEnv.Reset(pDocument->GetFormFillEnv());
216 m_bCanSet = 216 m_bCanSet =
217 m_pFormFillEnv->GetSDKDocument()->GetPermissions(FPDFPERM_FILL_FORM) || 217 m_pFormFillEnv->GetSDKDocument()->GetPermissions(FPDFPERM_FILL_FORM) ||
218 m_pFormFillEnv->GetSDKDocument()->GetPermissions(FPDFPERM_ANNOT_FORM) || 218 m_pFormFillEnv->GetSDKDocument()->GetPermissions(FPDFPERM_ANNOT_FORM) ||
219 m_pFormFillEnv->GetSDKDocument()->GetPermissions(FPDFPERM_MODIFY); 219 m_pFormFillEnv->GetSDKDocument()->GetPermissions(FPDFPERM_MODIFY);
220 220
221 CPDFSDK_InterForm* pRDInterForm = 221 CPDFSDK_InterForm* pRDInterForm =
222 m_pFormFillEnv->GetSDKDocument()->GetInterForm(); 222 m_pFormFillEnv->GetSDKDocument()->GetInterForm();
223 CPDF_InterForm* pInterForm = pRDInterForm->GetInterForm(); 223 CPDF_InterForm* pInterForm = pRDInterForm->GetInterForm();
224 CFX_WideString swFieldNameTemp = csFieldName; 224 CFX_WideString swFieldNameTemp = csFieldName;
225 swFieldNameTemp.Replace(L"..", L"."); 225 swFieldNameTemp.Replace(L"..", L".");
(...skipping 3287 matching lines...) Expand 10 before | Expand all | Expand 10 after
3513 } 3513 }
3514 } 3514 }
3515 3515
3516 void Field::AddField(CPDFSDK_FormFillEnvironment* pFormFillEnv, 3516 void Field::AddField(CPDFSDK_FormFillEnvironment* pFormFillEnv,
3517 int nPageIndex, 3517 int nPageIndex,
3518 int nFieldType, 3518 int nFieldType,
3519 const CFX_WideString& sName, 3519 const CFX_WideString& sName,
3520 const CFX_FloatRect& rcCoords) { 3520 const CFX_FloatRect& rcCoords) {
3521 // Not supported. 3521 // Not supported.
3522 } 3522 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698