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/fpdfapi/fpdf_parser.h" | 7 #include "../../../include/fpdfapi/fpdf_parser.h" |
8 #include "../../../include/fpdfapi/fpdf_module.h" | 8 #include "../../../include/fpdfapi/fpdf_module.h" |
9 | 9 |
10 // static | |
11 CPDF_Document* CPDF_Document::FromFPDFDocument(FPDF_DOCUMENT document) { | |
12 return static_cast<CPDF_Document*>(document); | |
13 } | |
14 | 10 |
15 CPDF_Document::CPDF_Document(CPDF_Parser* pParser) | 11 CPDF_Document::CPDF_Document(CPDF_Parser* pParser) |
16 : CPDF_IndirectObjects(pParser) { | 12 : CPDF_IndirectObjects(pParser) { |
17 ASSERT(pParser != NULL); | 13 ASSERT(pParser != NULL); |
18 m_pRootDict = NULL; | 14 m_pRootDict = NULL; |
19 m_pInfoDict = NULL; | 15 m_pInfoDict = NULL; |
20 m_bLinearized = FALSE; | 16 m_bLinearized = FALSE; |
21 m_dwFirstPageNo = 0; | 17 m_dwFirstPageNo = 0; |
22 m_dwFirstPageObjNum = 0; | 18 m_dwFirstPageObjNum = 0; |
23 m_pDocPage = CPDF_ModuleMgr::Get()->GetPageModule()->CreateDocData(this); | 19 m_pDocPage = CPDF_ModuleMgr::Get()->GetPageModule()->CreateDocData(this); |
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
361 void CPDF_Document::ClearPageData() { | 357 void CPDF_Document::ClearPageData() { |
362 if (m_pDocPage) { | 358 if (m_pDocPage) { |
363 CPDF_ModuleMgr::Get()->GetPageModule()->ClearDoc(this); | 359 CPDF_ModuleMgr::Get()->GetPageModule()->ClearDoc(this); |
364 } | 360 } |
365 } | 361 } |
366 void CPDF_Document::ClearRenderData() { | 362 void CPDF_Document::ClearRenderData() { |
367 if (m_pDocRender) { | 363 if (m_pDocRender) { |
368 CPDF_ModuleMgr::Get()->GetRenderModule()->ClearDocData(m_pDocRender); | 364 CPDF_ModuleMgr::Get()->GetRenderModule()->ClearDocData(m_pDocRender); |
369 } | 365 } |
370 } | 366 } |
OLD | NEW |