From 144107d3ca6ddd2724a460c4da4a20e6e1b7f1b7 Mon Sep 17 00:00:00 2001 From: Henrique Nakashima Date: Tue, 10 Jul 2018 21:04:05 +0000 Subject: Create API for adding content marks and setting their params. This CL creates the following new functions in the public API: - FPDFPageObj_AddMark - FPDFPageObjMark_SetIntParam - FPDFPageObjMark_SetStringParam Bug: pdfium:1037 Change-Id: Icabf3fdd8e8153b9156bab807a3708d38a9365d8 Reviewed-on: https://pdfium-review.googlesource.com/37330 Commit-Queue: Henrique Nakashima Reviewed-by: Lei Zhang --- core/fpdfdoc/cpdf_occontext.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'core/fpdfdoc') diff --git a/core/fpdfdoc/cpdf_occontext.cpp b/core/fpdfdoc/cpdf_occontext.cpp index 2aac2131a1..727696bdae 100644 --- a/core/fpdfdoc/cpdf_occontext.cpp +++ b/core/fpdfdoc/cpdf_occontext.cpp @@ -182,10 +182,10 @@ bool CPDF_OCContext::GetOCGVisible(const CPDF_Dictionary* pOCGDict) { bool CPDF_OCContext::CheckObjectVisible(const CPDF_PageObject* pObj) { for (size_t i = 0; i < pObj->m_ContentMark.CountItems(); ++i) { - const CPDF_ContentMarkItem& item = pObj->m_ContentMark.GetItem(i); - if (item.GetName() == "OC" && - item.GetParamType() == CPDF_ContentMarkItem::PropertiesDict && - !CheckOCGVisible(item.GetParam())) { + const CPDF_ContentMarkItem* item = pObj->m_ContentMark.GetItem(i); + if (item->GetName() == "OC" && + item->GetParamType() == CPDF_ContentMarkItem::PropertiesDict && + !CheckOCGVisible(item->GetParam())) { return false; } } -- cgit v1.2.3