| OLD | NEW |
| 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 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 369 const std::vector<CJS_Value>& params, | 369 const std::vector<CJS_Value>& params, |
| 370 CJS_Value& vRet, | 370 CJS_Value& vRet, |
| 371 CFX_WideString& sError) { | 371 CFX_WideString& sError) { |
| 372 // Unsafe, not supported. | 372 // Unsafe, not supported. |
| 373 return TRUE; | 373 return TRUE; |
| 374 } | 374 } |
| 375 | 375 |
| 376 // exports the form data and mails the resulting fdf file as an attachment to | 376 // exports the form data and mails the resulting fdf file as an attachment to |
| 377 // all recipients. | 377 // all recipients. |
| 378 // comment: need reader supports | 378 // comment: need reader supports |
| 379 // note: | |
| 380 // int CPDFSDK_Document::mailForm(FX_BOOL bUI,String cto,string ccc,string | |
| 381 // cbcc,string cSubject,string cms); | |
| 382 | |
| 383 FX_BOOL Document::mailForm(IJS_Context* cc, | 379 FX_BOOL Document::mailForm(IJS_Context* cc, |
| 384 const std::vector<CJS_Value>& params, | 380 const std::vector<CJS_Value>& params, |
| 385 CJS_Value& vRet, | 381 CJS_Value& vRet, |
| 386 CFX_WideString& sError) { | 382 CFX_WideString& sError) { |
| 387 if (!m_pFormFillEnv) { | 383 if (!m_pFormFillEnv) { |
| 388 sError = JSGetStringFromID(IDS_STRING_JSBADOBJECT); | 384 sError = JSGetStringFromID(IDS_STRING_JSBADOBJECT); |
| 389 return FALSE; | 385 return FALSE; |
| 390 } | 386 } |
| 391 if (!m_pFormFillEnv->GetSDKDocument()->GetPermissions( | 387 if (!m_pFormFillEnv->GetSDKDocument()->GetPermissions( |
| 392 FPDFPERM_EXTRACT_ACCESS)) { | 388 FPDFPERM_EXTRACT_ACCESS)) { |
| (...skipping 1346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1739 } | 1735 } |
| 1740 } | 1736 } |
| 1741 | 1737 |
| 1742 for (const auto& pData : DelayDataForFieldAndControlIndex) | 1738 for (const auto& pData : DelayDataForFieldAndControlIndex) |
| 1743 Field::DoDelay(m_pFormFillEnv.Get(), pData.get()); | 1739 Field::DoDelay(m_pFormFillEnv.Get(), pData.get()); |
| 1744 } | 1740 } |
| 1745 | 1741 |
| 1746 CJS_Document* Document::GetCJSDoc() const { | 1742 CJS_Document* Document::GetCJSDoc() const { |
| 1747 return static_cast<CJS_Document*>(m_pJSObject); | 1743 return static_cast<CJS_Document*>(m_pJSObject); |
| 1748 } | 1744 } |
| OLD | NEW |