summaryrefslogtreecommitdiff
path: root/xfa/fxfa/app/xfa_fontmgr.cpp
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-06-09 11:46:16 -0700
committerCommit bot <commit-bot@chromium.org>2016-06-09 11:46:16 -0700
commit20d6b76d82a762e75e8c2a89976f93acd9af7467 (patch)
tree9142c0179606d9909158678559e0adcac8b9991f /xfa/fxfa/app/xfa_fontmgr.cpp
parente64c3c60bdc1ca2e937e4317a9238ab4c210dfe5 (diff)
downloadpdfium-20d6b76d82a762e75e8c2a89976f93acd9af7467.tar.xz
Use static_cast<CXFA_WidgetAcc*> in xfa.
Remove a few other unused casts, simplify. Review-Url: https://codereview.chromium.org/2052593003
Diffstat (limited to 'xfa/fxfa/app/xfa_fontmgr.cpp')
-rw-r--r--xfa/fxfa/app/xfa_fontmgr.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/xfa/fxfa/app/xfa_fontmgr.cpp b/xfa/fxfa/app/xfa_fontmgr.cpp
index 17d600dfa0..f50bf5bf86 100644
--- a/xfa/fxfa/app/xfa_fontmgr.cpp
+++ b/xfa/fxfa/app/xfa_fontmgr.cpp
@@ -1840,7 +1840,7 @@ CFGAS_GEFont* CXFA_PDFFontMgr::FindFont(CFX_ByteString strPsName,
if (!pFontSetDict) {
return NULL;
}
- pFontSetDict = (CPDF_Dictionary*)pFontSetDict->GetDictBy("Font");
+ pFontSetDict = pFontSetDict->GetDictBy("Font");
if (!pFontSetDict) {
return NULL;
}
@@ -1853,12 +1853,8 @@ CFGAS_GEFont* CXFA_PDFFontMgr::FindFont(CFX_ByteString strPsName,
bStrictMatch)) {
continue;
}
- CPDF_Object* pDirect = pObj->GetDirect();
- if (!pDirect || !pDirect->IsDictionary()) {
- return NULL;
- }
- CPDF_Dictionary* pFontDict = (CPDF_Dictionary*)pDirect;
- if (pFontDict->GetStringBy("Type") != "Font") {
+ CPDF_Dictionary* pFontDict = ToDictionary(pObj->GetDirect());
+ if (!pFontDict || pFontDict->GetStringBy("Type") != "Font") {
return NULL;
}
CPDF_Font* pPDFFont = pDoc->LoadFont(pFontDict);