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 "../../include/fsdk_define.h" | 7 #include "../../include/fsdk_define.h" |
8 #include "../../include/fsdk_mgr.h" | 8 #include "../../include/fsdk_mgr.h" |
9 #include "../../include/fpdfxfa/fpdfxfa_util.h" | 9 #include "../../include/fpdfxfa/fpdfxfa_util.h" |
10 #include "../../include/fpdfxfa/fpdfxfa_doc.h" | 10 #include "../../include/fpdfxfa/fpdfxfa_doc.h" |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 return TRUE; | 57 return TRUE; |
58 } | 58 } |
59 | 59 |
60 return FALSE; | 60 return FALSE; |
61 } | 61 } |
62 | 62 |
63 FX_BOOL CPDFXFA_Page::LoadXFAPageView() { | 63 FX_BOOL CPDFXFA_Page::LoadXFAPageView() { |
64 if (!m_pDocument) | 64 if (!m_pDocument) |
65 return FALSE; | 65 return FALSE; |
66 IXFA_Doc* pXFADoc = m_pDocument->GetXFADoc(); | 66 IXFA_Doc* pXFADoc = m_pDocument->GetXFADoc(); |
67 if (pXFADoc) { | 67 if (!pXFADoc) |
68 IXFA_DocView* pXFADocView = m_pDocument->GetXFADocView(); | 68 return FALSE; |
69 if (!pXFADocView) | |
70 return FALSE; | |
71 | 69 |
72 IXFA_PageView* pPageView = pXFADocView->GetPageView(m_iPageIndex); | 70 IXFA_DocView* pXFADocView = m_pDocument->GetXFADocView(); |
73 if (!pPageView) | 71 if (!pXFADocView) |
74 return FALSE; | 72 return FALSE; |
75 | 73 |
76 if (m_pXFAPageView) | 74 IXFA_PageView* pPageView = pXFADocView->GetPageView(m_iPageIndex); |
77 if (m_pXFAPageView == pPageView) | 75 if (!pPageView) |
78 return TRUE; | 76 return FALSE; |
79 | 77 |
80 m_pXFAPageView = pPageView; | 78 if (m_pXFAPageView == pPageView) |
81 int iStatus = m_pXFAPageView->LoadPageView(NULL); | 79 return TRUE; |
82 | 80 |
83 return TRUE; | 81 m_pXFAPageView = pPageView; |
84 } | 82 (void)m_pXFAPageView->LoadPageView(nullptr); |
85 | 83 return TRUE; |
86 return FALSE; | |
87 } | 84 } |
88 | 85 |
89 FX_BOOL CPDFXFA_Page::LoadPage() { | 86 FX_BOOL CPDFXFA_Page::LoadPage() { |
90 if (!m_pDocument || m_iPageIndex < 0) | 87 if (!m_pDocument || m_iPageIndex < 0) |
91 return FALSE; | 88 return FALSE; |
92 | 89 |
93 int iDocType = m_pDocument->GetDocType(); | 90 int iDocType = m_pDocument->GetDocType(); |
94 switch (iDocType) { | 91 switch (iDocType) { |
95 case DOCTYPE_PDF: | 92 case DOCTYPE_PDF: |
96 case DOCTYPE_STATIC_XFA: { | 93 case DOCTYPE_STATIC_XFA: { |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 case DOCTYPE_PDF: | 246 case DOCTYPE_PDF: |
250 case DOCTYPE_STATIC_XFA: { | 247 case DOCTYPE_STATIC_XFA: { |
251 if (m_pPDFPage) { | 248 if (m_pPDFPage) { |
252 m_pPDFPage->GetDisplayMatrix(matrix, xPos, yPos, xSize, ySize, iRotate); | 249 m_pPDFPage->GetDisplayMatrix(matrix, xPos, yPos, xSize, ySize, iRotate); |
253 } | 250 } |
254 } break; | 251 } break; |
255 default: | 252 default: |
256 return; | 253 return; |
257 } | 254 } |
258 } | 255 } |
OLD | NEW |