| 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 CPDF_Document::CPDF_Document(CPDF_Parser* pParser) | 10 CPDF_Document::CPDF_Document(CPDF_Parser* pParser) |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 m_dwFirstPageNo = pNo->GetInteger(); | 79 m_dwFirstPageNo = pNo->GetInteger(); |
| 80 } | 80 } |
| 81 CPDF_Object* pObjNum = pLinearized->GetElement(FX_BSTRC("O")); | 81 CPDF_Object* pObjNum = pLinearized->GetElement(FX_BSTRC("O")); |
| 82 if (pObjNum && pObjNum->GetType() == PDFOBJ_NUMBER) { | 82 if (pObjNum && pObjNum->GetType() == PDFOBJ_NUMBER) { |
| 83 m_dwFirstPageObjNum = pObjNum->GetInteger(); | 83 m_dwFirstPageObjNum = pObjNum->GetInteger(); |
| 84 } | 84 } |
| 85 } | 85 } |
| 86 void CPDF_Document::LoadPages() { | 86 void CPDF_Document::LoadPages() { |
| 87 m_PageList.SetSize(_GetPageCount()); | 87 m_PageList.SetSize(_GetPageCount()); |
| 88 } | 88 } |
| 89 extern void FPDF_TTFaceMapper_ReleaseDoc(CPDF_Document*); | |
| 90 CPDF_Document::~CPDF_Document() { | 89 CPDF_Document::~CPDF_Document() { |
| 91 if (m_pDocPage) { | 90 if (m_pDocPage) { |
| 92 CPDF_ModuleMgr::Get()->GetPageModule()->ReleaseDoc(this); | 91 CPDF_ModuleMgr::Get()->GetPageModule()->ReleaseDoc(this); |
| 93 CPDF_ModuleMgr::Get()->GetPageModule()->ClearStockFont(this); | 92 CPDF_ModuleMgr::Get()->GetPageModule()->ClearStockFont(this); |
| 94 } | 93 } |
| 95 if (m_pDocRender) { | 94 if (m_pDocRender) { |
| 96 CPDF_ModuleMgr::Get()->GetRenderModule()->DestroyDocData(m_pDocRender); | 95 CPDF_ModuleMgr::Get()->GetRenderModule()->DestroyDocData(m_pDocRender); |
| 97 } | 96 } |
| 98 } | 97 } |
| 99 #define FX_MAX_PAGE_LEVEL 1024 | 98 #define FX_MAX_PAGE_LEVEL 1024 |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 void CPDF_Document::ClearPageData() { | 351 void CPDF_Document::ClearPageData() { |
| 353 if (m_pDocPage) { | 352 if (m_pDocPage) { |
| 354 CPDF_ModuleMgr::Get()->GetPageModule()->ClearDoc(this); | 353 CPDF_ModuleMgr::Get()->GetPageModule()->ClearDoc(this); |
| 355 } | 354 } |
| 356 } | 355 } |
| 357 void CPDF_Document::ClearRenderData() { | 356 void CPDF_Document::ClearRenderData() { |
| 358 if (m_pDocRender) { | 357 if (m_pDocRender) { |
| 359 CPDF_ModuleMgr::Get()->GetRenderModule()->ClearDocData(m_pDocRender); | 358 CPDF_ModuleMgr::Get()->GetRenderModule()->ClearDocData(m_pDocRender); |
| 360 } | 359 } |
| 361 } | 360 } |
| OLD | NEW |