summaryrefslogtreecommitdiff
path: root/core/fpdfapi/parser
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/parser')
-rw-r--r--core/fpdfapi/parser/cpdf_array.cpp6
-rw-r--r--core/fpdfapi/parser/cpdf_array.h1
2 files changed, 7 insertions, 0 deletions
diff --git a/core/fpdfapi/parser/cpdf_array.cpp b/core/fpdfapi/parser/cpdf_array.cpp
index ea4ca7eaeb..1f2740ea9c 100644
--- a/core/fpdfapi/parser/cpdf_array.cpp
+++ b/core/fpdfapi/parser/cpdf_array.cpp
@@ -105,6 +105,12 @@ CFX_ByteString CPDF_Array::GetStringAt(size_t i) const {
return m_Objects[i]->GetString();
}
+CFX_WideString CPDF_Array::GetUnicodeTextAt(size_t i) const {
+ if (i >= m_Objects.size())
+ return CFX_WideString();
+ return m_Objects[i]->GetUnicodeText();
+}
+
int CPDF_Array::GetIntegerAt(size_t i) const {
if (i >= m_Objects.size())
return 0;
diff --git a/core/fpdfapi/parser/cpdf_array.h b/core/fpdfapi/parser/cpdf_array.h
index bb17c0a427..2590971d80 100644
--- a/core/fpdfapi/parser/cpdf_array.h
+++ b/core/fpdfapi/parser/cpdf_array.h
@@ -41,6 +41,7 @@ class CPDF_Array : public CPDF_Object {
CPDF_Object* GetObjectAt(size_t index) const;
CPDF_Object* GetDirectObjectAt(size_t index) const;
CFX_ByteString GetStringAt(size_t index) const;
+ CFX_WideString GetUnicodeTextAt(size_t index) const;
int GetIntegerAt(size_t index) const;
float GetNumberAt(size_t index) const;
CPDF_Dictionary* GetDictAt(size_t index) const;