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_page/pageint.h" | 7 #include "core/fpdfapi/fpdf_page/pageint.h" |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
597 pDict->Release(); | 597 pDict->Release(); |
598 return; | 598 return; |
599 } | 599 } |
600 } | 600 } |
601 if (type != CPDF_StreamParser::Name) { | 601 if (type != CPDF_StreamParser::Name) { |
602 break; | 602 break; |
603 } | 603 } |
604 CFX_ByteString key((const FX_CHAR*)m_pSyntax->GetWordBuf() + 1, | 604 CFX_ByteString key((const FX_CHAR*)m_pSyntax->GetWordBuf() + 1, |
605 m_pSyntax->GetWordSize() - 1); | 605 m_pSyntax->GetWordSize() - 1); |
606 std::unique_ptr<CPDF_Object, ReleaseDeleter<CPDF_Object>> pObj( | 606 std::unique_ptr<CPDF_Object, ReleaseDeleter<CPDF_Object>> pObj( |
607 m_pSyntax->ReadNextObject()); | 607 m_pSyntax->ReadNextObject(false, 0)); |
608 if (!key.IsEmpty()) { | 608 if (!key.IsEmpty()) { |
609 uint32_t dwObjNum = pObj ? pObj->GetObjNum() : 0; | 609 uint32_t dwObjNum = pObj ? pObj->GetObjNum() : 0; |
610 if (dwObjNum) | 610 if (dwObjNum) |
611 pDict->SetAtReference(key, m_pDocument, dwObjNum); | 611 pDict->SetAtReference(key, m_pDocument, dwObjNum); |
612 else | 612 else |
613 pDict->SetAt(key, pObj.release()); | 613 pDict->SetAt(key, pObj.release()); |
614 } | 614 } |
615 } | 615 } |
616 PDF_ReplaceAbbr(pDict); | 616 PDF_ReplaceAbbr(pDict); |
617 CPDF_Object* pCSObj = NULL; | 617 CPDF_Object* pCSObj = NULL; |
(...skipping 1092 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1710 } else { | 1710 } else { |
1711 PDF_ReplaceAbbr(pElement); | 1711 PDF_ReplaceAbbr(pElement); |
1712 } | 1712 } |
1713 } | 1713 } |
1714 break; | 1714 break; |
1715 } | 1715 } |
1716 default: | 1716 default: |
1717 break; | 1717 break; |
1718 } | 1718 } |
1719 } | 1719 } |
OLD | NEW |