summaryrefslogtreecommitdiff
path: root/core/fpdfdoc/cpdf_occontext.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-05-28 17:51:28 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-05-28 17:51:28 +0000
commitfffdeebfd0ed9806d32eb5609e0fdd015c25c5ac (patch)
tree7461043e508179a7d33b850486f312c58048e4a8 /core/fpdfdoc/cpdf_occontext.cpp
parent45a55241d315d25067582d29fcdc1ff8b818965f (diff)
downloadpdfium-fffdeebfd0ed9806d32eb5609e0fdd015c25c5ac.tar.xz
Add const/non-const versions of remaining CPDF_Dictionary methods.
GetObjectFor() and GetDirectObjectFor(). Change-Id: I588cd994dfccf0ffd4c8f91362a4806dc109251e Reviewed-on: https://pdfium-review.googlesource.com/32991 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'core/fpdfdoc/cpdf_occontext.cpp')
-rw-r--r--core/fpdfdoc/cpdf_occontext.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/core/fpdfdoc/cpdf_occontext.cpp b/core/fpdfdoc/cpdf_occontext.cpp
index 192a254329..2aac2131a1 100644
--- a/core/fpdfdoc/cpdf_occontext.cpp
+++ b/core/fpdfdoc/cpdf_occontext.cpp
@@ -26,12 +26,12 @@ int32_t FindGroup(const CPDF_Array* pArray, const CPDF_Dictionary* pGroupDict) {
bool HasIntent(const CPDF_Dictionary* pDict,
const ByteStringView& csElement,
const ByteStringView& csDef) {
- CPDF_Object* pIntent = pDict->GetDirectObjectFor("Intent");
+ const CPDF_Object* pIntent = pDict->GetDirectObjectFor("Intent");
if (!pIntent)
return csElement == csDef;
ByteString bsIntent;
- if (CPDF_Array* pArray = pIntent->AsArray()) {
+ if (const CPDF_Array* pArray = pIntent->AsArray()) {
for (size_t i = 0; i < pArray->GetCount(); i++) {
bsIntent = pArray->GetStringAt(i);
if (bsIntent == "All" || bsIntent == csElement)
@@ -242,14 +242,14 @@ bool CPDF_OCContext::LoadOCMDState(const CPDF_Dictionary* pOCMDDict) {
return GetOCGVE(pVE, 0);
ByteString csP = pOCMDDict->GetStringFor("P", "AnyOn");
- CPDF_Object* pOCGObj = pOCMDDict->GetDirectObjectFor("OCGs");
+ const CPDF_Object* pOCGObj = pOCMDDict->GetDirectObjectFor("OCGs");
if (!pOCGObj)
return true;
if (const CPDF_Dictionary* pDict = pOCGObj->AsDictionary())
return GetOCGVisible(pDict);
- CPDF_Array* pArray = pOCGObj->AsArray();
+ const CPDF_Array* pArray = pOCGObj->AsArray();
if (!pArray)
return true;
@@ -259,7 +259,7 @@ bool CPDF_OCContext::LoadOCMDState(const CPDF_Dictionary* pOCMDDict) {
bool bValidEntrySeen = false;
for (size_t i = 0; i < pArray->GetCount(); i++) {
bool bItem = true;
- CPDF_Dictionary* pItemDict = pArray->GetDictAt(i);
+ const CPDF_Dictionary* pItemDict = pArray->GetDictAt(i);
if (!pItemDict)
continue;