diff options
author | tsepez <tsepez@chromium.org> | 2016-06-09 11:46:16 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-06-09 11:46:16 -0700 |
commit | 20d6b76d82a762e75e8c2a89976f93acd9af7467 (patch) | |
tree | 9142c0179606d9909158678559e0adcac8b9991f /xfa/fxfa/app/xfa_fontmgr.cpp | |
parent | e64c3c60bdc1ca2e937e4317a9238ab4c210dfe5 (diff) | |
download | pdfium-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.cpp | 10 |
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); |