summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/fpdfdoc/cpdf_structelement.cpp3
-rw-r--r--core/fpdfdoc/cpdf_structelement.h2
2 files changed, 4 insertions, 1 deletions
diff --git a/core/fpdfdoc/cpdf_structelement.cpp b/core/fpdfdoc/cpdf_structelement.cpp
index 137d5b32e4..c85ae0dd42 100644
--- a/core/fpdfdoc/cpdf_structelement.cpp
+++ b/core/fpdfdoc/cpdf_structelement.cpp
@@ -33,7 +33,8 @@ CPDF_StructElement::CPDF_StructElement(CPDF_StructTree* pTree,
: m_pTree(pTree),
m_pParent(pParent),
m_pDict(pDict),
- m_Type(pDict->GetStringFor("S")) {
+ m_Type(pDict->GetStringFor("S")),
+ m_Title(pDict->GetStringFor("T")) {
if (pTree->GetRoleMap()) {
CFX_ByteString mapped = pTree->GetRoleMap()->GetStringFor(m_Type);
if (!mapped.IsEmpty())
diff --git a/core/fpdfdoc/cpdf_structelement.h b/core/fpdfdoc/cpdf_structelement.h
index ba0685e895..c65363db53 100644
--- a/core/fpdfdoc/cpdf_structelement.h
+++ b/core/fpdfdoc/cpdf_structelement.h
@@ -39,6 +39,7 @@ class CPDF_StructElement : public CFX_Retainable {
friend CFX_RetainPtr<T> pdfium::MakeRetain(Args&&... args);
const CFX_ByteString& GetType() const { return m_Type; }
+ const CFX_ByteString& GetTitle() const { return m_Title; }
CPDF_Dictionary* GetDict() const { return m_pDict; }
int CountKids() const;
@@ -58,6 +59,7 @@ class CPDF_StructElement : public CFX_Retainable {
CPDF_StructElement* const m_pParent;
CPDF_Dictionary* const m_pDict;
CFX_ByteString m_Type;
+ CFX_ByteString m_Title;
std::vector<CPDF_StructKid> m_Kids;
};