summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/fsdk_baseform.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-10-13 15:00:10 -0700
committerTom Sepez <tsepez@chromium.org>2015-10-13 15:00:10 -0700
commit3342090d65e852f3f37a8f04d3fbe3ff2467d05c (patch)
tree04ea6a1adeae79279a4d4e0f147161c2b4601dcb /fpdfsdk/src/fsdk_baseform.cpp
parentf6c67325ebb931ecad6c0f0e90302d854db75900 (diff)
downloadpdfium-3342090d65e852f3f37a8f04d3fbe3ff2467d05c.tar.xz
Merge to XFA: Pass IJS_Runtime, not IJS_Context, to native object constructors.
Original Review URL: https://codereview.chromium.org/1389163007 . (cherry picked from commit 848a13b6777cbff8cc4aea3ab3d69eaa0b82ae6c) Merge conflics in: fpdfsdk/src/javascript/JS_Runtime.cpp fpdfsdk/src/javascript/JS_Runtime_Stub.cpp fpdfsdk/src/jsapi/fxjs_v8.cpp R=thestig@chromium.org Review URL: https://codereview.chromium.org/1394993006 .
Diffstat (limited to 'fpdfsdk/src/fsdk_baseform.cpp')
-rw-r--r--fpdfsdk/src/fsdk_baseform.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/fpdfsdk/src/fsdk_baseform.cpp b/fpdfsdk/src/fsdk_baseform.cpp
index 4a6b98782c..fb79227df1 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;