summaryrefslogtreecommitdiff
path: root/core/fpdfdoc/cpdf_structelement.cpp
diff options
context:
space:
mode:
authordan sinclair <dsinclair@chromium.org>2017-04-06 14:44:02 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-04-08 01:38:54 +0000
commitd9dad3a1915973d113f1f8685474a5a8c1f4faac (patch)
treebd34c61ace230963b1c7f92b30cf025cdd16f380 /core/fpdfdoc/cpdf_structelement.cpp
parent746c28772e01675096800d8853aae33f94ed3d55 (diff)
downloadpdfium-d9dad3a1915973d113f1f8685474a5a8c1f4faac.tar.xz
Add title (/T) extraction for PDF tagged structureschromium/3067chromium/3066
This CL adds the ability to extract the title from a tagged structure element if one exists. Bug: pdfium:672 Change-Id: I22e2a8371db4f08b8a70dd77002f1befab97f530 Reviewed-on: https://pdfium-review.googlesource.com/3819 Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fpdfdoc/cpdf_structelement.cpp')
-rw-r--r--core/fpdfdoc/cpdf_structelement.cpp3
1 files changed, 2 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())