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 <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "fpdfsdk/include/fsdk_mgr.h" | 9 #include "fpdfsdk/include/fsdk_mgr.h" |
10 | 10 |
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
571 | 571 |
572 void CPDFSDK_Document::OnCloseDocument() { | 572 void CPDFSDK_Document::OnCloseDocument() { |
573 KillFocusAnnot(); | 573 KillFocusAnnot(); |
574 } | 574 } |
575 | 575 |
576 FX_BOOL CPDFSDK_Document::GetPermissions(int nFlag) { | 576 FX_BOOL CPDFSDK_Document::GetPermissions(int nFlag) { |
577 return GetPDFDocument()->GetUserPermissions() & nFlag; | 577 return GetPDFDocument()->GetUserPermissions() & nFlag; |
578 } | 578 } |
579 | 579 |
580 IJS_Runtime* CPDFSDK_Document::GetJsRuntime() { | 580 IJS_Runtime* CPDFSDK_Document::GetJsRuntime() { |
581 ASSERT(m_pEnv != NULL); | |
582 return m_pEnv->GetJSRuntime(); | 581 return m_pEnv->GetJSRuntime(); |
583 } | 582 } |
584 | 583 |
585 CFX_WideString CPDFSDK_Document::GetPath() { | 584 CFX_WideString CPDFSDK_Document::GetPath() { |
586 ASSERT(m_pEnv != NULL); | |
587 return m_pEnv->JS_docGetFilePath(); | 585 return m_pEnv->JS_docGetFilePath(); |
588 } | 586 } |
589 | 587 |
590 CPDFSDK_PageView::CPDFSDK_PageView(CPDFSDK_Document* pSDKDoc, | 588 CPDFSDK_PageView::CPDFSDK_PageView(CPDFSDK_Document* pSDKDoc, |
591 UnderlyingPageType* page) | 589 UnderlyingPageType* page) |
592 : m_page(page), | 590 : m_page(page), |
593 m_pSDKDoc(pSDKDoc), | 591 m_pSDKDoc(pSDKDoc), |
594 m_CaptureWidget(nullptr), | 592 m_CaptureWidget(nullptr), |
595 m_bEnterWidget(FALSE), | 593 m_bEnterWidget(FALSE), |
596 m_bExitWidget(FALSE), | 594 m_bExitWidget(FALSE), |
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
920 CPDFSDK_Annot* pFocusAnnot = m_pSDKDoc->GetFocusAnnot(); | 918 CPDFSDK_Annot* pFocusAnnot = m_pSDKDoc->GetFocusAnnot(); |
921 if (!pFocusAnnot) | 919 if (!pFocusAnnot) |
922 return nullptr; | 920 return nullptr; |
923 | 921 |
924 for (CPDFSDK_Annot* pAnnot : m_fxAnnotArray) { | 922 for (CPDFSDK_Annot* pAnnot : m_fxAnnotArray) { |
925 if (pAnnot == pFocusAnnot) | 923 if (pAnnot == pFocusAnnot) |
926 return pAnnot; | 924 return pAnnot; |
927 } | 925 } |
928 return nullptr; | 926 return nullptr; |
929 } | 927 } |
OLD | NEW |