| 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 "core/fpdfapi/fpdf_parser/include/cpdf_document.h" | 7 #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h" |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 476 // This page is a leaf node. | 476 // This page is a leaf node. |
| 477 count++; | 477 count++; |
| 478 } | 478 } |
| 479 } | 479 } |
| 480 pPages->SetAtInteger("Count", count); | 480 pPages->SetAtInteger("Count", count); |
| 481 return count; | 481 return count; |
| 482 } | 482 } |
| 483 | 483 |
| 484 } // namespace | 484 } // namespace |
| 485 | 485 |
| 486 CPDF_Document::CPDF_Document(CPDF_Parser* pParser) | 486 CPDF_Document::CPDF_Document(std::unique_ptr<CPDF_Parser> pParser) |
| 487 : CPDF_IndirectObjectHolder(), | 487 : CPDF_IndirectObjectHolder(), |
| 488 m_pParser(pParser), | 488 m_pParser(std::move(pParser)), |
| 489 m_pRootDict(nullptr), | 489 m_pRootDict(nullptr), |
| 490 m_pInfoDict(nullptr), | 490 m_pInfoDict(nullptr), |
| 491 m_bLinearized(false), | 491 m_bLinearized(false), |
| 492 m_iFirstPageNo(0), | 492 m_iFirstPageNo(0), |
| 493 m_dwFirstPageObjNum(0), | 493 m_dwFirstPageObjNum(0), |
| 494 m_pDocPage(new CPDF_DocPageData(this)), | 494 m_pDocPage(new CPDF_DocPageData(this)), |
| 495 m_pDocRender(new CPDF_DocRenderData(this)) { | 495 m_pDocRender(new CPDF_DocRenderData(this)) { |
| 496 if (pParser) | 496 if (pParser) |
| 497 SetLastObjNum(m_pParser->GetLastObjNum()); | 497 SetLastObjNum(m_pParser->GetLastObjNum()); |
| 498 } | 498 } |
| (...skipping 952 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1451 } | 1451 } |
| 1452 } | 1452 } |
| 1453 pFontDesc->SetAtInteger("StemV", fStemV); | 1453 pFontDesc->SetAtInteger("StemV", fStemV); |
| 1454 AddIndirectObject(pFontDesc); | 1454 AddIndirectObject(pFontDesc); |
| 1455 pFontDict->SetAtReference("FontDescriptor", this, pFontDesc); | 1455 pFontDict->SetAtReference("FontDescriptor", this, pFontDesc); |
| 1456 CFRelease(traits); | 1456 CFRelease(traits); |
| 1457 CFRelease(languages); | 1457 CFRelease(languages); |
| 1458 return LoadFont(pBaseDict); | 1458 return LoadFont(pBaseDict); |
| 1459 } | 1459 } |
| 1460 #endif // _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ | 1460 #endif // _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ |
| OLD | NEW |