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/src/javascript/Document.h" | 7 #include "fpdfsdk/src/javascript/Document.h" |
8 | 8 |
9 #include "fpdfsdk/include/fsdk_mgr.h" // For CPDFDoc_Environment. | 9 #include <vector> |
| 10 |
| 11 #include "fpdfsdk/include/fsdk_mgr.h" |
10 #include "fpdfsdk/include/javascript/IJavaScript.h" | 12 #include "fpdfsdk/include/javascript/IJavaScript.h" |
11 #include "fpdfsdk/src/javascript/Field.h" | 13 #include "fpdfsdk/src/javascript/Field.h" |
12 #include "fpdfsdk/src/javascript/Icon.h" | 14 #include "fpdfsdk/src/javascript/Icon.h" |
13 #include "fpdfsdk/src/javascript/JS_Context.h" | 15 #include "fpdfsdk/src/javascript/JS_Context.h" |
14 #include "fpdfsdk/src/javascript/JS_Define.h" | 16 #include "fpdfsdk/src/javascript/JS_Define.h" |
15 #include "fpdfsdk/src/javascript/JS_EventHandler.h" | 17 #include "fpdfsdk/src/javascript/JS_EventHandler.h" |
16 #include "fpdfsdk/src/javascript/JS_Object.h" | 18 #include "fpdfsdk/src/javascript/JS_Object.h" |
17 #include "fpdfsdk/src/javascript/JS_Runtime.h" | 19 #include "fpdfsdk/src/javascript/JS_Runtime.h" |
18 #include "fpdfsdk/src/javascript/JS_Value.h" | 20 #include "fpdfsdk/src/javascript/JS_Value.h" |
19 #include "fpdfsdk/src/javascript/app.h" | 21 #include "fpdfsdk/src/javascript/app.h" |
(...skipping 628 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
648 } | 650 } |
649 | 651 |
650 if (pPDFInterForm->CheckRequiredFields(&fieldObjects, true)) { | 652 if (pPDFInterForm->CheckRequiredFields(&fieldObjects, true)) { |
651 pRuntime->BeginBlock(); | 653 pRuntime->BeginBlock(); |
652 pInterForm->SubmitFields(strURL, fieldObjects, TRUE, !bFDF); | 654 pInterForm->SubmitFields(strURL, fieldObjects, TRUE, !bFDF); |
653 pRuntime->EndBlock(); | 655 pRuntime->EndBlock(); |
654 } | 656 } |
655 return TRUE; | 657 return TRUE; |
656 } | 658 } |
657 | 659 |
658 ////////////////////////////////////////////////////////////////////////////////
////////////// | |
659 | |
660 void Document::AttachDoc(CPDFSDK_Document* pDoc) { | 660 void Document::AttachDoc(CPDFSDK_Document* pDoc) { |
661 m_pDocument = pDoc; | 661 m_pDocument = pDoc; |
662 } | 662 } |
663 | 663 |
664 CPDFSDK_Document* Document::GetReaderDoc() { | 664 CPDFSDK_Document* Document::GetReaderDoc() { |
665 return m_pDocument; | 665 return m_pDocument; |
666 } | 666 } |
667 | 667 |
668 FX_BOOL Document::bookmarkRoot(IJS_Context* cc, | 668 FX_BOOL Document::bookmarkRoot(IJS_Context* cc, |
669 CJS_PropValue& vp, | 669 CJS_PropValue& vp, |
(...skipping 953 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1623 CJS_DelayData* pData = DelayDataForFieldAndControlIndex.GetAt(i); | 1623 CJS_DelayData* pData = DelayDataForFieldAndControlIndex.GetAt(i); |
1624 Field::DoDelay(m_pDocument, pData); | 1624 Field::DoDelay(m_pDocument, pData); |
1625 DelayDataForFieldAndControlIndex.SetAt(i, NULL); | 1625 DelayDataForFieldAndControlIndex.SetAt(i, NULL); |
1626 delete pData; | 1626 delete pData; |
1627 } | 1627 } |
1628 } | 1628 } |
1629 | 1629 |
1630 CJS_Document* Document::GetCJSDoc() const { | 1630 CJS_Document* Document::GetCJSDoc() const { |
1631 return static_cast<CJS_Document*>(m_pJSObject); | 1631 return static_cast<CJS_Document*>(m_pJSObject); |
1632 } | 1632 } |
OLD | NEW |