| 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) : CPDF_IndirectObjects(pParse
r) | 10 CPDF_Document::CPDF_Document(CPDF_Parser* pParser) : CPDF_IndirectObjects(pParse
r) |
| (...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 { | 336 { |
| 337 if (m_pParser == NULL) { | 337 if (m_pParser == NULL) { |
| 338 return TRUE; | 338 return TRUE; |
| 339 } | 339 } |
| 340 return m_pParser->IsOwner(); | 340 return m_pParser->IsOwner(); |
| 341 } | 341 } |
| 342 FX_BOOL CPDF_Document::IsFormStream(FX_DWORD objnum, FX_BOOL& bForm) const | 342 FX_BOOL CPDF_Document::IsFormStream(FX_DWORD objnum, FX_BOOL& bForm) const |
| 343 { | 343 { |
| 344 { | 344 { |
| 345 CPDF_Object* pObj; | 345 CPDF_Object* pObj; |
| 346 if (m_IndirectObjs.Lookup((FX_LPVOID)(FX_UINTPTR)objnum, (FX_LPVOID&)pOb
j)) { | 346 if (m_IndirectObjs.Lookup((FX_LPVOID)(uintptr_t)objnum, (FX_LPVOID&)pObj
)) { |
| 347 bForm = pObj->GetType() == PDFOBJ_STREAM && | 347 bForm = pObj->GetType() == PDFOBJ_STREAM && |
| 348 ((CPDF_Stream*)pObj)->GetDict()->GetString(FX_BSTRC("Subtype
")) == FX_BSTRC("Form"); | 348 ((CPDF_Stream*)pObj)->GetDict()->GetString(FX_BSTRC("Subtype
")) == FX_BSTRC("Form"); |
| 349 return TRUE; | 349 return TRUE; |
| 350 } | 350 } |
| 351 } | 351 } |
| 352 if (m_pParser == NULL) { | 352 if (m_pParser == NULL) { |
| 353 bForm = FALSE; | 353 bForm = FALSE; |
| 354 return TRUE; | 354 return TRUE; |
| 355 } | 355 } |
| 356 return m_pParser->IsFormStream(objnum, bForm); | 356 return m_pParser->IsFormStream(objnum, bForm); |
| 357 } | 357 } |
| 358 void CPDF_Document::ClearPageData() | 358 void CPDF_Document::ClearPageData() |
| 359 { | 359 { |
| 360 if (m_pDocPage) { | 360 if (m_pDocPage) { |
| 361 CPDF_ModuleMgr::Get()->GetPageModule()->ClearDoc(this); | 361 CPDF_ModuleMgr::Get()->GetPageModule()->ClearDoc(this); |
| 362 } | 362 } |
| 363 } | 363 } |
| 364 void CPDF_Document::ClearRenderData() | 364 void CPDF_Document::ClearRenderData() |
| 365 { | 365 { |
| 366 if (m_pDocRender) { | 366 if (m_pDocRender) { |
| 367 CPDF_ModuleMgr::Get()->GetRenderModule()->ClearDocData(m_pDocRender); | 367 CPDF_ModuleMgr::Get()->GetRenderModule()->ClearDocData(m_pDocRender); |
| 368 } | 368 } |
| 369 } | 369 } |
| OLD | NEW |