diff options
Diffstat (limited to 'core/fpdfapi/parser')
-rw-r--r-- | core/fpdfapi/parser/cpdf_dictionary.cpp | 6 | ||||
-rw-r--r-- | core/fpdfapi/parser/cpdf_dictionary.h | 3 |
2 files changed, 7 insertions, 2 deletions
diff --git a/core/fpdfapi/parser/cpdf_dictionary.cpp b/core/fpdfapi/parser/cpdf_dictionary.cpp index 29571d6c51..0bdb8a8b16 100644 --- a/core/fpdfapi/parser/cpdf_dictionary.cpp +++ b/core/fpdfapi/parser/cpdf_dictionary.cpp @@ -145,7 +145,11 @@ CPDF_Array* CPDF_Dictionary::GetArrayFor(const ByteString& key) const { return ToArray(GetDirectObjectFor(key)); } -CPDF_Stream* CPDF_Dictionary::GetStreamFor(const ByteString& key) const { +const CPDF_Stream* CPDF_Dictionary::GetStreamFor(const ByteString& key) const { + return ToStream(GetDirectObjectFor(key)); +} + +CPDF_Stream* CPDF_Dictionary::GetStreamFor(const ByteString& key) { return ToStream(GetDirectObjectFor(key)); } diff --git a/core/fpdfapi/parser/cpdf_dictionary.h b/core/fpdfapi/parser/cpdf_dictionary.h index 8ecbe2d6fc..f2ee588dab 100644 --- a/core/fpdfapi/parser/cpdf_dictionary.h +++ b/core/fpdfapi/parser/cpdf_dictionary.h @@ -52,7 +52,8 @@ class CPDF_Dictionary : public CPDF_Object { bool GetBooleanFor(const ByteString& key, bool bDefault = false) const; float GetNumberFor(const ByteString& key) const; CPDF_Dictionary* GetDictFor(const ByteString& key) const; - CPDF_Stream* GetStreamFor(const ByteString& key) const; + const CPDF_Stream* GetStreamFor(const ByteString& key) const; + CPDF_Stream* GetStreamFor(const ByteString& key); CPDF_Array* GetArrayFor(const ByteString& key) const; CFX_FloatRect GetRectFor(const ByteString& key) const; CFX_Matrix GetMatrixFor(const ByteString& key) const; |