diff options
Diffstat (limited to 'core/fpdfapi/parser/cpdf_reference.cpp')
-rw-r--r-- | core/fpdfapi/parser/cpdf_reference.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/core/fpdfapi/parser/cpdf_reference.cpp b/core/fpdfapi/parser/cpdf_reference.cpp index 3f45a96c6b..0f3b7627d6 100644 --- a/core/fpdfapi/parser/cpdf_reference.cpp +++ b/core/fpdfapi/parser/cpdf_reference.cpp @@ -103,3 +103,11 @@ bool CPDF_Reference::WriteTo(IFX_ArchiveStream* archive) const { return archive->WriteString(" ") && archive->WriteDWord(GetRefObjNum()) && archive->WriteString(" 0 R "); } + +std::unique_ptr<CPDF_Object> CPDF_Reference::MakeReference( + CPDF_IndirectObjectHolder* holder) const { + ASSERT(holder == m_pObjList.Get()); + // Do not allow reference to reference, just create other reference for same + // object. + return pdfium::MakeUnique<CPDF_Reference>(holder, GetRefObjNum()); +} |