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

Unified Diff: fpdfsdk/formfiller/cba_fontmap.cpp

Issue 2337673002: Annotations and fields do not have DR (Closed)
Patch Set: Created 4 years, 3 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
« core/fpdfdoc/cpvt_generateap.cpp ('K') | « core/fpdfdoc/cpvt_generateap.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/formfiller/cba_fontmap.cpp
diff --git a/fpdfsdk/formfiller/cba_fontmap.cpp b/fpdfsdk/formfiller/cba_fontmap.cpp
index a816e2ce7fe42f95a0ded5587249d626b6feaa1a..36a653b5b397b3e9f2c3b9ca5d01f4af94738feb 100644
--- a/fpdfsdk/formfiller/cba_fontmap.cpp
+++ b/fpdfsdk/formfiller/cba_fontmap.cpp
@@ -228,18 +228,12 @@ CPDF_Font* CBA_FontMap::GetAnnotDefaultFont(CFX_ByteString& sAlias) {
CFX_ByteString sFontName(syntax.GetWord());
sAlias = PDF_NameDecode(sFontName).Mid(1);
- if (CPDF_Dictionary* pDRDict = m_pAnnotDict->GetDictBy("DR"))
- if (CPDF_Dictionary* pDRFontDict = pDRDict->GetDictBy("Font"))
- pFontDict = pDRFontDict->GetDictBy(sAlias);
-
- if (!pFontDict)
- if (CPDF_Dictionary* pAPDict = m_pAnnotDict->GetDictBy("AP"))
- if (CPDF_Dictionary* pNormalDict = pAPDict->GetDictBy("N"))
- if (CPDF_Dictionary* pNormalResDict =
- pNormalDict->GetDictBy("Resources"))
- if (CPDF_Dictionary* pResFontDict =
- pNormalResDict->GetDictBy("Font"))
- pFontDict = pResFontDict->GetDictBy(sAlias);
+ if (CPDF_Dictionary* pAPDict = m_pAnnotDict->GetDictBy("AP"))
dsinclair 2016/09/12 20:51:49 These need {}'s added.
npm 2016/09/12 21:40:12 Done.
+ if (CPDF_Dictionary* pNormalDict = pAPDict->GetDictBy("N"))
+ if (CPDF_Dictionary* pNormalResDict =
+ pNormalDict->GetDictBy("Resources"))
+ if (CPDF_Dictionary* pResFontDict = pNormalResDict->GetDictBy("Font"))
+ pFontDict = pResFontDict->GetDictBy(sAlias);
if (bWidget) {
if (!pFontDict) {
« core/fpdfdoc/cpvt_generateap.cpp ('K') | « core/fpdfdoc/cpvt_generateap.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698