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_define.h" | 7 #include "fpdfsdk/include/fsdk_define.h" |
8 #include "fpdfsdk/include/fsdk_mgr.h" | 8 #include "fpdfsdk/include/fsdk_mgr.h" |
9 #include "fpdfsdk/include/fpdfxfa/fpdfxfa_util.h" | 9 #include "fpdfsdk/include/fpdfxfa/fpdfxfa_util.h" |
10 #include "fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h" | 10 #include "fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 if (m_pPDFPage) { | 46 if (m_pPDFPage) { |
47 if (m_pPDFPage->m_pFormDict == pDict) | 47 if (m_pPDFPage->m_pFormDict == pDict) |
48 return TRUE; | 48 return TRUE; |
49 | 49 |
50 delete m_pPDFPage; | 50 delete m_pPDFPage; |
51 m_pPDFPage = NULL; | 51 m_pPDFPage = NULL; |
52 } | 52 } |
53 | 53 |
54 m_pPDFPage = new CPDF_Page; | 54 m_pPDFPage = new CPDF_Page; |
55 m_pPDFPage->Load(pPDFDoc, pDict); | 55 m_pPDFPage->Load(pPDFDoc, pDict); |
56 m_pPDFPage->ParseContent(); | 56 m_pPDFPage->ParseContent(nullptr); |
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(); |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 | 105 |
106 FX_BOOL CPDFXFA_Page::LoadPDFPage(CPDF_Dictionary* pageDict) { | 106 FX_BOOL CPDFXFA_Page::LoadPDFPage(CPDF_Dictionary* pageDict) { |
107 if (!m_pDocument || m_iPageIndex < 0 || !pageDict) | 107 if (!m_pDocument || m_iPageIndex < 0 || !pageDict) |
108 return FALSE; | 108 return FALSE; |
109 | 109 |
110 if (m_pPDFPage) | 110 if (m_pPDFPage) |
111 delete m_pPDFPage; | 111 delete m_pPDFPage; |
112 | 112 |
113 m_pPDFPage = new CPDF_Page(); | 113 m_pPDFPage = new CPDF_Page(); |
114 m_pPDFPage->Load(m_pDocument->GetPDFDoc(), pageDict); | 114 m_pPDFPage->Load(m_pDocument->GetPDFDoc(), pageDict); |
115 m_pPDFPage->ParseContent(); | 115 m_pPDFPage->ParseContent(nullptr); |
116 | 116 |
117 return TRUE; | 117 return TRUE; |
118 } | 118 } |
119 | 119 |
120 FX_FLOAT CPDFXFA_Page::GetPageWidth() { | 120 FX_FLOAT CPDFXFA_Page::GetPageWidth() { |
121 ASSERT(m_pDocument != NULL); | 121 ASSERT(m_pDocument != NULL); |
122 | 122 |
123 if (!m_pPDFPage && !m_pXFAPageView) | 123 if (!m_pPDFPage && !m_pXFAPageView) |
124 return 0.0f; | 124 return 0.0f; |
125 | 125 |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 case DOCTYPE_PDF: | 246 case DOCTYPE_PDF: |
247 case DOCTYPE_STATIC_XFA: { | 247 case DOCTYPE_STATIC_XFA: { |
248 if (m_pPDFPage) { | 248 if (m_pPDFPage) { |
249 m_pPDFPage->GetDisplayMatrix(matrix, xPos, yPos, xSize, ySize, iRotate); | 249 m_pPDFPage->GetDisplayMatrix(matrix, xPos, yPos, xSize, ySize, iRotate); |
250 } | 250 } |
251 } break; | 251 } break; |
252 default: | 252 default: |
253 return; | 253 return; |
254 } | 254 } |
255 } | 255 } |
OLD | NEW |