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/include/fsdk_mgr.h" | 7 #include "fpdfsdk/include/fsdk_mgr.h" |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <memory> | 10 #include <memory> |
(...skipping 886 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
897 | 897 |
898 FX_BOOL CPDFSDK_PageView::OnKeyUp(int nKeyCode, int nFlag) { | 898 FX_BOOL CPDFSDK_PageView::OnKeyUp(int nKeyCode, int nFlag) { |
899 return FALSE; | 899 return FALSE; |
900 } | 900 } |
901 | 901 |
902 void CPDFSDK_PageView::LoadFXAnnots() { | 902 void CPDFSDK_PageView::LoadFXAnnots() { |
903 CPDFDoc_Environment* pEnv = m_pSDKDoc->GetEnv(); | 903 CPDFDoc_Environment* pEnv = m_pSDKDoc->GetEnv(); |
904 #ifdef PDF_ENABLE_XFA | 904 #ifdef PDF_ENABLE_XFA |
905 CPDFSDK_AnnotHandlerMgr* pAnnotHandlerMgr = pEnv->GetAnnotHandlerMgr(); | 905 CPDFSDK_AnnotHandlerMgr* pAnnotHandlerMgr = pEnv->GetAnnotHandlerMgr(); |
906 #else | 906 #else |
907 FX_BOOL enableAPUpdate = CPDF_InterForm::UpdatingAPEnabled(); | 907 FX_BOOL bUpdateAP = CPDF_InterForm::UpdateAPEnabled(); |
908 // Disable the default AP construction. | 908 // Disable the default AP construction. |
909 CPDF_InterForm::EnableUpdateAP(FALSE); | 909 CPDF_InterForm::SetUpdateAP(FALSE); |
910 m_pAnnotList.reset(new CPDF_AnnotList(m_page)); | 910 m_pAnnotList.reset(new CPDF_AnnotList(m_page)); |
911 CPDF_InterForm::EnableUpdateAP(enableAPUpdate); | 911 CPDF_InterForm::SetUpdateAP(bUpdateAP); |
912 const size_t nCount = m_pAnnotList->Count(); | 912 const size_t nCount = m_pAnnotList->Count(); |
913 #endif // PDF_ENABLE_XFA | 913 #endif // PDF_ENABLE_XFA |
914 | 914 |
915 SetLock(TRUE); | 915 SetLock(TRUE); |
916 | 916 |
917 #ifdef PDF_ENABLE_XFA | 917 #ifdef PDF_ENABLE_XFA |
918 CFX_RetainPtr<CPDFXFA_Page> protector(m_page); | 918 CFX_RetainPtr<CPDFXFA_Page> protector(m_page); |
919 if (m_pSDKDoc->GetXFADocument()->GetDocType() == DOCTYPE_DYNAMIC_XFA) { | 919 if (m_pSDKDoc->GetXFADocument()->GetDocType() == DOCTYPE_DYNAMIC_XFA) { |
920 CXFA_FFPageView* pageView = m_page->GetXFAPageView(); | 920 CXFA_FFPageView* pageView = m_page->GetXFAPageView(); |
921 std::unique_ptr<IXFA_WidgetIterator> pWidgetHander( | 921 std::unique_ptr<IXFA_WidgetIterator> pWidgetHander( |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1043 int CPDFSDK_PageView::GetPageIndexForStaticPDF() const { | 1043 int CPDFSDK_PageView::GetPageIndexForStaticPDF() const { |
1044 #ifdef PDF_ENABLE_XFA | 1044 #ifdef PDF_ENABLE_XFA |
1045 CPDF_Page* pPage = m_page->GetPDFPage(); | 1045 CPDF_Page* pPage = m_page->GetPDFPage(); |
1046 #else // PDF_ENABLE_XFA | 1046 #else // PDF_ENABLE_XFA |
1047 CPDF_Page* pPage = m_page; | 1047 CPDF_Page* pPage = m_page; |
1048 #endif // PDF_ENABLE_XFA | 1048 #endif // PDF_ENABLE_XFA |
1049 CPDF_Dictionary* pDict = pPage->m_pFormDict; | 1049 CPDF_Dictionary* pDict = pPage->m_pFormDict; |
1050 CPDF_Document* pDoc = m_pSDKDoc->GetPDFDocument(); | 1050 CPDF_Document* pDoc = m_pSDKDoc->GetPDFDocument(); |
1051 return (pDoc && pDict) ? pDoc->GetPageIndex(pDict->GetObjNum()) : -1; | 1051 return (pDoc && pDict) ? pDoc->GetPageIndex(pDict->GetObjNum()) : -1; |
1052 } | 1052 } |
OLD | NEW |