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

Unified Diff: fpdfsdk/src/fsdk_baseform.cpp

Issue 1394993006: Merge to XFA: Pass IJS_Runtime, not IJS_Context, to native object constructors. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « fpdfsdk/src/fsdk_actionhandler.cpp ('k') | fpdfsdk/src/javascript/Document.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/fsdk_baseform.cpp
diff --git a/fpdfsdk/src/fsdk_baseform.cpp b/fpdfsdk/src/fsdk_baseform.cpp
index 4a6b98782cc89bb985ab21e457b71b667dd5568a..fb79227df199784c2af8699e0bb6fede87d60f0c 100644
--- a/fpdfsdk/src/fsdk_baseform.cpp
+++ b/fpdfsdk/src/fsdk_baseform.cpp
@@ -1996,8 +1996,7 @@ void CPDFSDK_Widget::AddImageToAppearance(const CFX_ByteString& sAPType,
CPDF_Stream* pImage) {
ASSERT(pImage != NULL);
- CPDF_Document* pDoc =
- m_pPageView->GetPDFDocument(); // pDocument->GetDocument();
+ CPDF_Document* pDoc = m_pPageView->GetPDFDocument();
ASSERT(pDoc != NULL);
CPDF_Dictionary* pAPDict = m_pAnnot->GetAnnotDict()->GetDict("AP");
@@ -2453,7 +2452,6 @@ void CPDFSDK_InterForm::OnCalculate(CPDF_FormField* pFormField) {
for (int i = 0; i < nSize; i++) {
if (CPDF_FormField* pField =
m_pInterForm->GetFieldInCalculationOrder(i)) {
- // ASSERT(pField != NULL);
int nType = pField->GetFieldType();
if (nType == FIELDTYPE_COMBOBOX || nType == FIELDTYPE_TEXTFIELD) {
CPDF_AAction aAction = pField->GetAdditionalAction();
@@ -2471,7 +2469,7 @@ void CPDFSDK_InterForm::OnCalculate(CPDF_FormField* pFormField) {
pContext->OnField_Calculate(pFormField, pField, sValue, bRC);
CFX_WideString sInfo;
- FX_BOOL bRet = pContext->RunScript(csJS, sInfo);
+ FX_BOOL bRet = pContext->RunScript(csJS, &sInfo);
pRuntime->ReleaseContext(pContext);
if (bRet) {
@@ -2533,7 +2531,7 @@ CFX_WideString CPDFSDK_InterForm::OnFormat(CPDF_FormField* pFormField,
pContext->OnField_Format(pFormField, Value, TRUE);
CFX_WideString sInfo;
- FX_BOOL bRet = pContext->RunScript(script, sInfo);
+ FX_BOOL bRet = pContext->RunScript(script, &sInfo);
pRuntime->ReleaseContext(pContext);
if (bRet) {
@@ -2831,7 +2829,7 @@ FX_BOOL CPDFSDK_InterForm::ExportFieldsToFDFTextBuf(const CFX_PtrArray& fields,
m_pDocument->GetPath(), (CFX_PtrArray&)fields, bIncludeOrExclude);
if (!pFDF)
return FALSE;
- FX_BOOL bRet = pFDF->WriteBuf(textBuf); // = FALSE;//
+ FX_BOOL bRet = pFDF->WriteBuf(textBuf);
delete pFDF;
return bRet;
« no previous file with comments | « fpdfsdk/src/fsdk_actionhandler.cpp ('k') | fpdfsdk/src/javascript/Document.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698