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

Unified Diff: fpdfsdk/src/fsdk_baseform.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
« no previous file with comments | « fpdfsdk/src/fpdfview.cpp ('k') | fpdfsdk/src/fsdk_mgr.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/fsdk_baseform.cpp
diff --git a/fpdfsdk/src/fsdk_baseform.cpp b/fpdfsdk/src/fsdk_baseform.cpp
index 3dc48dab53f26dfcd8972dd0c55ae07c91b9422b..d7374a6f18db5b38b2bfdeaab95af2cecd336029 100644
--- a/fpdfsdk/src/fsdk_baseform.cpp
+++ b/fpdfsdk/src/fsdk_baseform.cpp
@@ -538,8 +538,7 @@ FX_BOOL CPDFSDK_Widget::IsWidgetAppearanceValid(
return psub->GetType() == PDFOBJ_STREAM;
case FIELDTYPE_CHECKBOX:
case FIELDTYPE_RADIOBUTTON:
- if (psub->GetType() == PDFOBJ_DICTIONARY) {
- CPDF_Dictionary* pSubDict = (CPDF_Dictionary*)psub;
+ if (CPDF_Dictionary* pSubDict = psub->AsDictionary()) {
return pSubDict->GetStream(GetAppState()) != NULL;
}
return FALSE;
« no previous file with comments | « fpdfsdk/src/fpdfview.cpp ('k') | fpdfsdk/src/fsdk_mgr.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698