| OLD | NEW |
| 1 // Copyright 2016 PDFium Authors. All rights reserved. | 1 // Copyright 2016 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/cpdfsdk_pageview.h" | 7 #include "fpdfsdk/cpdfsdk_pageview.h" |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 UnderlyingPageType* page) | 32 UnderlyingPageType* page) |
| 33 : m_page(page), | 33 : m_page(page), |
| 34 m_pSDKDoc(pSDKDoc), | 34 m_pSDKDoc(pSDKDoc), |
| 35 #ifndef PDF_ENABLE_XFA | 35 #ifndef PDF_ENABLE_XFA |
| 36 m_bOwnsPage(false), | 36 m_bOwnsPage(false), |
| 37 #endif // PDF_ENABLE_XFA | 37 #endif // PDF_ENABLE_XFA |
| 38 m_bEnterWidget(FALSE), | 38 m_bEnterWidget(FALSE), |
| 39 m_bExitWidget(FALSE), | 39 m_bExitWidget(FALSE), |
| 40 m_bOnWidget(FALSE), | 40 m_bOnWidget(FALSE), |
| 41 m_bValid(FALSE), | 41 m_bValid(FALSE), |
| 42 m_bLocked(FALSE) { | 42 m_bLocked(FALSE), |
| 43 m_bBeingDestroyed(false) { |
| 43 CPDFSDK_InterForm* pInterForm = pSDKDoc->GetInterForm(); | 44 CPDFSDK_InterForm* pInterForm = pSDKDoc->GetInterForm(); |
| 44 if (pInterForm) { | 45 if (pInterForm) { |
| 45 CPDF_InterForm* pPDFInterForm = pInterForm->GetInterForm(); | 46 CPDF_InterForm* pPDFInterForm = pInterForm->GetInterForm(); |
| 46 #ifdef PDF_ENABLE_XFA | 47 #ifdef PDF_ENABLE_XFA |
| 47 if (page->GetPDFPage()) | 48 if (page->GetPDFPage()) |
| 48 pPDFInterForm->FixPageFields(page->GetPDFPage()); | 49 pPDFInterForm->FixPageFields(page->GetPDFPage()); |
| 49 #else // PDF_ENABLE_XFA | 50 #else // PDF_ENABLE_XFA |
| 50 pPDFInterForm->FixPageFields(page); | 51 pPDFInterForm->FixPageFields(page); |
| 51 #endif // PDF_ENABLE_XFA | 52 #endif // PDF_ENABLE_XFA |
| 52 } | 53 } |
| (...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 582 return pAnnot; | 583 return pAnnot; |
| 583 } | 584 } |
| 584 return nullptr; | 585 return nullptr; |
| 585 } | 586 } |
| 586 | 587 |
| 587 int CPDFSDK_PageView::GetPageIndexForStaticPDF() const { | 588 int CPDFSDK_PageView::GetPageIndexForStaticPDF() const { |
| 588 CPDF_Dictionary* pDict = GetPDFPage()->m_pFormDict; | 589 CPDF_Dictionary* pDict = GetPDFPage()->m_pFormDict; |
| 589 CPDF_Document* pDoc = m_pSDKDoc->GetPDFDocument(); | 590 CPDF_Document* pDoc = m_pSDKDoc->GetPDFDocument(); |
| 590 return (pDoc && pDict) ? pDoc->GetPageIndex(pDict->GetObjNum()) : -1; | 591 return (pDoc && pDict) ? pDoc->GetPageIndex(pDict->GetObjNum()) : -1; |
| 591 } | 592 } |
| OLD | NEW |