diff options
Diffstat (limited to 'core/fpdfapi/parser/cpdf_object.cpp')
-rw-r--r-- | core/fpdfapi/parser/cpdf_object.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/core/fpdfapi/parser/cpdf_object.cpp b/core/fpdfapi/parser/cpdf_object.cpp index 8190d3429f..6fedd25242 100644 --- a/core/fpdfapi/parser/cpdf_object.cpp +++ b/core/fpdfapi/parser/cpdf_object.cpp @@ -12,6 +12,7 @@ #include "core/fpdfapi/parser/cpdf_dictionary.h" #include "core/fpdfapi/parser/cpdf_indirect_object_holder.h" #include "core/fpdfapi/parser/cpdf_parser.h" +#include "core/fpdfapi/parser/cpdf_reference.h" #include "core/fpdfapi/parser/fpdf_parser_decode.h" #include "core/fxcrt/fx_string.h" #include "third_party/base/logging.h" @@ -170,3 +171,12 @@ CPDF_String* CPDF_Object::AsString() { const CPDF_String* CPDF_Object::AsString() const { return nullptr; } + +std::unique_ptr<CPDF_Object> CPDF_Object::MakeReference( + CPDF_IndirectObjectHolder* holder) const { + if (IsInline()) { + NOTREACHED(); + return nullptr; + } + return pdfium::MakeUnique<CPDF_Reference>(holder, GetObjNum()); +} |