Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1044)

Unified Diff: core/src/fpdfapi/fpdf_render/fpdf_render.cpp

Issue 1410343003: [Merge to XFA] Revert "Revert "Add type cast definitions for CPDF_Dictionary."" (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Rebase to origin/xfa Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: core/src/fpdfapi/fpdf_render/fpdf_render.cpp
diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render.cpp
index 9db35068f95d70ffd77c6ddb408917d5f8d08ff0..99835a3b94daa71eacf296082701898bd5b65622 100644
--- a/core/src/fpdfapi/fpdf_render/fpdf_render.cpp
+++ b/core/src/fpdfapi/fpdf_render/fpdf_render.cpp
@@ -738,7 +738,7 @@ FX_BOOL CPDF_RenderStatus::ProcessTransparency(
return TRUE;
}
CPDF_Dictionary* pSMaskDict =
- pGeneralState ? (CPDF_Dictionary*)pGeneralState->m_pSoftMask : NULL;
+ pGeneralState ? ToDictionary(pGeneralState->m_pSoftMask) : NULL;
if (pSMaskDict) {
if (pPageObj->m_Type == PDFPAGE_IMAGE &&
((CPDF_ImageObject*)pPageObj)
@@ -1438,7 +1438,8 @@ FX_BOOL IPDF_OCContext::CheckObjectVisible(const CPDF_PageObject* pObj) {
CPDF_ContentMarkItem& item = pData->GetItem(i);
if (item.GetName() == FX_BSTRC("OC") &&
item.GetParamType() == CPDF_ContentMarkItem::PropertiesDict) {
- CPDF_Dictionary* pOCG = (CPDF_Dictionary*)item.GetParam();
+ CPDF_Dictionary* pOCG =
+ ToDictionary(static_cast<CPDF_Object*>(item.GetParam()));
if (!CheckOCGVisible(pOCG)) {
return FALSE;
}
« no previous file with comments | « core/src/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp ('k') | core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698