summaryrefslogtreecommitdiff
path: root/core/fpdfdoc/cpdf_structelement.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfdoc/cpdf_structelement.cpp')
-rw-r--r--core/fpdfdoc/cpdf_structelement.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/core/fpdfdoc/cpdf_structelement.cpp b/core/fpdfdoc/cpdf_structelement.cpp
index ed5c8c7366..24c028fb61 100644
--- a/core/fpdfdoc/cpdf_structelement.cpp
+++ b/core/fpdfdoc/cpdf_structelement.cpp
@@ -59,15 +59,15 @@ void CPDF_StructElement::LoadKids(const CPDF_Dictionary* pDict) {
if (const CPDF_Reference* pRef = ToReference(pObj))
PageObjNum = pRef->GetRefObjNum();
- CPDF_Object* pKids = pDict->GetDirectObjectFor("K");
+ const CPDF_Object* pKids = pDict->GetDirectObjectFor("K");
if (!pKids)
return;
m_Kids.clear();
- if (CPDF_Array* pArray = pKids->AsArray()) {
+ if (const CPDF_Array* pArray = pKids->AsArray()) {
m_Kids.resize(pArray->GetCount());
for (uint32_t i = 0; i < pArray->GetCount(); i++) {
- CPDF_Object* pKid = pArray->GetDirectObjectAt(i);
+ const CPDF_Object* pKid = pArray->GetDirectObjectAt(i);
LoadKid(PageObjNum, pKid, &m_Kids[i]);
}
return;
@@ -78,7 +78,7 @@ void CPDF_StructElement::LoadKids(const CPDF_Dictionary* pDict) {
}
void CPDF_StructElement::LoadKid(uint32_t PageObjNum,
- CPDF_Object* pKidObj,
+ const CPDF_Object* pKidObj,
CPDF_StructKid* pKid) {
pKid->m_Type = CPDF_StructKid::Invalid;
if (!pKidObj)
@@ -94,10 +94,10 @@ void CPDF_StructElement::LoadKid(uint32_t PageObjNum,
return;
}
- CPDF_Dictionary* pKidDict = pKidObj->AsDictionary();
+ const CPDF_Dictionary* pKidDict = pKidObj->AsDictionary();
if (!pKidDict)
return;
- if (CPDF_Reference* pRef = ToReference(pKidDict->GetObjectFor("Pg")))
+ if (const CPDF_Reference* pRef = ToReference(pKidDict->GetObjectFor("Pg")))
PageObjNum = pRef->GetRefObjNum();
ByteString type = pKidDict->GetStringFor("Type");
@@ -108,7 +108,7 @@ void CPDF_StructElement::LoadKid(uint32_t PageObjNum,
if (type == "MCR") {
pKid->m_Type = CPDF_StructKid::StreamContent;
- CPDF_Reference* pRef = ToReference(pKidDict->GetObjectFor("Stm"));
+ const CPDF_Reference* pRef = ToReference(pKidDict->GetObjectFor("Stm"));
pKid->m_RefObjNum = pRef ? pRef->GetRefObjNum() : 0;
pKid->m_PageObjNum = PageObjNum;
pKid->m_ContentId = pKidDict->GetIntegerFor("MCID");
@@ -117,7 +117,7 @@ void CPDF_StructElement::LoadKid(uint32_t PageObjNum,
if (type == "OBJR") {
pKid->m_Type = CPDF_StructKid::Object;
- CPDF_Reference* pObj = ToReference(pKidDict->GetObjectFor("Obj"));
+ const CPDF_Reference* pObj = ToReference(pKidDict->GetObjectFor("Obj"));
pKid->m_RefObjNum = pObj ? pObj->GetRefObjNum() : 0;
pKid->m_PageObjNum = PageObjNum;
return;