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 "../../public/fpdf_ext.h" | 7 #include "../../public/fpdf_ext.h" |
8 #include "../include/formfiller/FFL_FormFiller.h" | 8 #include "../include/formfiller/FFL_FormFiller.h" |
9 #include "../include/fpdfxfa/fpdfxfa_app.h" | 9 #include "../include/fpdfxfa/fpdfxfa_app.h" |
10 #include "../include/fpdfxfa/fpdfxfa_doc.h" | 10 #include "../include/fpdfxfa/fpdfxfa_doc.h" |
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
369 m_pInfo->m_pJsPlatform->Doc_mail(m_pInfo->m_pJsPlatform, mailData, length, | 369 m_pInfo->m_pJsPlatform->Doc_mail(m_pInfo->m_pJsPlatform, mailData, length, |
370 bUI, pTo, pSubject, pCC, pBcc, pMsg); | 370 bUI, pTo, pSubject, pCC, pBcc, pMsg); |
371 bsTo.ReleaseBuffer(); | 371 bsTo.ReleaseBuffer(); |
372 bsCC.ReleaseBuffer(); | 372 bsCC.ReleaseBuffer(); |
373 bsBcc.ReleaseBuffer(); | 373 bsBcc.ReleaseBuffer(); |
374 bsSubject.ReleaseBuffer(); | 374 bsSubject.ReleaseBuffer(); |
375 bsMsg.ReleaseBuffer(); | 375 bsMsg.ReleaseBuffer(); |
376 } | 376 } |
377 } | 377 } |
378 | 378 |
379 IFXJS_Runtime* CPDFDoc_Environment::GetJSRuntime() { | 379 IJS_Runtime* CPDFDoc_Environment::GetJSRuntime() { |
380 if (!IsJSInitiated()) | 380 if (!IsJSInitiated()) |
381 return NULL; | 381 return NULL; |
382 if (!m_pJSRuntime) | 382 if (!m_pJSRuntime) |
383 m_pJSRuntime.reset(IFXJS_Runtime::Create(this)); | 383 m_pJSRuntime.reset(IJS_Runtime::Create(this)); |
384 return m_pJSRuntime.get(); | 384 return m_pJSRuntime.get(); |
385 } | 385 } |
386 | 386 |
387 CPDFSDK_AnnotHandlerMgr* CPDFDoc_Environment::GetAnnotHandlerMgr() { | 387 CPDFSDK_AnnotHandlerMgr* CPDFDoc_Environment::GetAnnotHandlerMgr() { |
388 if (!m_pAnnotHandlerMgr) | 388 if (!m_pAnnotHandlerMgr) |
389 m_pAnnotHandlerMgr = new CPDFSDK_AnnotHandlerMgr(this); | 389 m_pAnnotHandlerMgr = new CPDFSDK_AnnotHandlerMgr(this); |
390 return m_pAnnotHandlerMgr; | 390 return m_pAnnotHandlerMgr; |
391 } | 391 } |
392 | 392 |
393 CPDFSDK_ActionHandler* CPDFDoc_Environment::GetActionHander() { | 393 CPDFSDK_ActionHandler* CPDFDoc_Environment::GetActionHander() { |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
619 | 619 |
620 void CPDFSDK_Document::OnCloseDocument() { | 620 void CPDFSDK_Document::OnCloseDocument() { |
621 KillFocusAnnot(); | 621 KillFocusAnnot(); |
622 } | 622 } |
623 | 623 |
624 FX_BOOL CPDFSDK_Document::GetPermissions(int nFlag) { | 624 FX_BOOL CPDFSDK_Document::GetPermissions(int nFlag) { |
625 FX_DWORD dwPermissions = m_pDoc->GetPDFDoc()->GetUserPermissions(); | 625 FX_DWORD dwPermissions = m_pDoc->GetPDFDoc()->GetUserPermissions(); |
626 return dwPermissions & nFlag; | 626 return dwPermissions & nFlag; |
627 } | 627 } |
628 | 628 |
629 IFXJS_Runtime* CPDFSDK_Document::GetJsRuntime() { | 629 IJS_Runtime* CPDFSDK_Document::GetJsRuntime() { |
630 ASSERT(m_pEnv != NULL); | 630 ASSERT(m_pEnv != NULL); |
631 return m_pEnv->GetJSRuntime(); | 631 return m_pEnv->GetJSRuntime(); |
632 } | 632 } |
633 | 633 |
634 CFX_WideString CPDFSDK_Document::GetPath() { | 634 CFX_WideString CPDFSDK_Document::GetPath() { |
635 ASSERT(m_pEnv != NULL); | 635 ASSERT(m_pEnv != NULL); |
636 return m_pEnv->JS_docGetFilePath(); | 636 return m_pEnv->JS_docGetFilePath(); |
637 } | 637 } |
638 | 638 |
639 CPDFSDK_PageView::CPDFSDK_PageView(CPDFSDK_Document* pSDKDoc, | 639 CPDFSDK_PageView::CPDFSDK_PageView(CPDFSDK_Document* pSDKDoc, |
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1188 if (!pFocusAnnot) | 1188 if (!pFocusAnnot) |
1189 return NULL; | 1189 return NULL; |
1190 | 1190 |
1191 for (int i = 0; i < m_fxAnnotArray.GetSize(); i++) { | 1191 for (int i = 0; i < m_fxAnnotArray.GetSize(); i++) { |
1192 CPDFSDK_Annot* pAnnot = (CPDFSDK_Annot*)m_fxAnnotArray.GetAt(i); | 1192 CPDFSDK_Annot* pAnnot = (CPDFSDK_Annot*)m_fxAnnotArray.GetAt(i); |
1193 if (pAnnot == pFocusAnnot) | 1193 if (pAnnot == pFocusAnnot) |
1194 return pAnnot; | 1194 return pAnnot; |
1195 } | 1195 } |
1196 return NULL; | 1196 return NULL; |
1197 } | 1197 } |
OLD | NEW |