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

Unified Diff: fpdfsdk/src/fpdf_transformpage.cpp

Issue 1420583003: Revert "Revert "Add type cast definitions for CPDF_Dictionary."" (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: 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
« no previous file with comments | « fpdfsdk/src/fpdf_flatten.cpp ('k') | fpdfsdk/src/fpdfdoc.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/fpdf_transformpage.cpp
diff --git a/fpdfsdk/src/fpdf_transformpage.cpp b/fpdfsdk/src/fpdf_transformpage.cpp
index cdc646ae7e140a9559b1d721fb6dbe9f733db187..1e24b68f08b7e30feff504a9d70d68489b0fc11c 100644
--- a/fpdfsdk/src/fpdf_transformpage.cpp
+++ b/fpdfsdk/src/fpdf_transformpage.cpp
@@ -166,8 +166,8 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFPage_TransFormWithClip(FPDF_PAGE page,
CPDF_Object* pObj = pPattenDict->GetNextElement(pos, key);
if (pObj->GetType() == PDFOBJ_REFERENCE)
pObj = pObj->GetDirect();
- if (pObj->GetType() == PDFOBJ_DICTIONARY) {
- pDict = (CPDF_Dictionary*)pObj;
+ if (pObj->IsDictionary()) {
+ pDict = pObj->AsDictionary();
} else if (pObj->GetType() == PDFOBJ_STREAM) {
pDict = ((CPDF_Stream*)pObj)->GetDict();
} else
« no previous file with comments | « fpdfsdk/src/fpdf_flatten.cpp ('k') | fpdfsdk/src/fpdfdoc.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698