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

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

Issue 2399943002: Remove CPDFSDK_Document from IJS_Context (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
« no previous file with comments | « fpdfsdk/fsdk_actionhandler.cpp ('k') | fpdfsdk/javascript/JS_EventHandler.h » ('j') | 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 "fpdfsdk/javascript/Document.h" 7 #include "fpdfsdk/javascript/Document.h"
8 8
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 CFX_WideString cSubject = 401 CFX_WideString cSubject =
402 iLength > 4 ? params[4].ToCFXWideString(pRuntime) : L""; 402 iLength > 4 ? params[4].ToCFXWideString(pRuntime) : L"";
403 CFX_WideString cMsg = iLength > 5 ? params[5].ToCFXWideString(pRuntime) : L""; 403 CFX_WideString cMsg = iLength > 5 ? params[5].ToCFXWideString(pRuntime) : L"";
404 404
405 CPDFSDK_InterForm* pInterForm = m_pDocument->GetInterForm(); 405 CPDFSDK_InterForm* pInterForm = m_pDocument->GetInterForm();
406 CFX_ByteTextBuf textBuf; 406 CFX_ByteTextBuf textBuf;
407 if (!pInterForm->ExportFormToFDFTextBuf(textBuf)) 407 if (!pInterForm->ExportFormToFDFTextBuf(textBuf))
408 return FALSE; 408 return FALSE;
409 409
410 pRuntime->BeginBlock(); 410 pRuntime->BeginBlock();
411 CPDFSDK_FormFillEnvironment* pEnv = pContext->GetReaderEnv(); 411 CPDFSDK_FormFillEnvironment* pEnv = pContext->GetFormFillEnv();
412 pEnv->JS_docmailForm(textBuf.GetBuffer(), textBuf.GetLength(), bUI, 412 pEnv->JS_docmailForm(textBuf.GetBuffer(), textBuf.GetLength(), bUI,
413 cTo.c_str(), cSubject.c_str(), cCc.c_str(), cBcc.c_str(), 413 cTo.c_str(), cSubject.c_str(), cCc.c_str(), cBcc.c_str(),
414 cMsg.c_str()); 414 cMsg.c_str());
415 pRuntime->EndBlock(); 415 pRuntime->EndBlock();
416 return TRUE; 416 return TRUE;
417 } 417 }
418 418
419 FX_BOOL Document::print(IJS_Context* cc, 419 FX_BOOL Document::print(IJS_Context* cc,
420 const std::vector<CJS_Value>& params, 420 const std::vector<CJS_Value>& params,
421 CJS_Value& vRet, 421 CJS_Value& vRet,
(...skipping 1303 matching lines...) Expand 10 before | Expand all | Expand 10 after
1725 1725
1726 for (const auto& pData : DelayDataForFieldAndControlIndex) { 1726 for (const auto& pData : DelayDataForFieldAndControlIndex) {
1727 if (m_pDocument.Get()) 1727 if (m_pDocument.Get())
1728 Field::DoDelay(m_pDocument->GetEnv(), pData.get()); 1728 Field::DoDelay(m_pDocument->GetEnv(), pData.get());
1729 } 1729 }
1730 } 1730 }
1731 1731
1732 CJS_Document* Document::GetCJSDoc() const { 1732 CJS_Document* Document::GetCJSDoc() const {
1733 return static_cast<CJS_Document*>(m_pJSObject); 1733 return static_cast<CJS_Document*>(m_pJSObject);
1734 } 1734 }
OLDNEW
« no previous file with comments | « fpdfsdk/fsdk_actionhandler.cpp ('k') | fpdfsdk/javascript/JS_EventHandler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698