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

Unified Diff: fpdfsdk/src/fpdf_flatten.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/formfiller/FFL_Utils.cpp ('k') | fpdfsdk/src/fpdf_transformpage.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/fpdf_flatten.cpp
diff --git a/fpdfsdk/src/fpdf_flatten.cpp b/fpdfsdk/src/fpdf_flatten.cpp
index b2303f36aa0758f87b9a0e7177a1a5495fbf1800..fee93f2663023cc9735b65a90bf5e11c34378ff3 100644
--- a/fpdfsdk/src/fpdf_flatten.cpp
+++ b/fpdfsdk/src/fpdf_flatten.cpp
@@ -94,11 +94,10 @@ int ParserAnnots(CPDF_Document* pSourceDoc,
FX_DWORD dwSize = pAnnots->GetCount();
for (int i = 0; i < (int)dwSize; i++) {
- CPDF_Object* pObj = pAnnots->GetElementValue(i);
- if (!pObj || pObj->GetType() != PDFOBJ_DICTIONARY)
+ CPDF_Dictionary* pAnnotDic = ToDictionary(pAnnots->GetElementValue(i));
+ if (!pAnnotDic)
continue;
- CPDF_Dictionary* pAnnotDic = (CPDF_Dictionary*)pObj;
CFX_ByteString sSubtype = pAnnotDic->GetString("Subtype");
if (sSubtype == "Popup")
continue;
« no previous file with comments | « fpdfsdk/src/formfiller/FFL_Utils.cpp ('k') | fpdfsdk/src/fpdf_transformpage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698