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

Unified Diff: fpdfsdk/formfiller/cba_fontmap.cpp

Issue 2083943003: Use FXFONT defines in place of integers. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: nits Created 4 years, 6 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/cfx_systemhandler.cpp ('k') | fpdfsdk/formfiller/cffl_combobox.cpp » ('j') | 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 9102b7bf9a1ad23d2bf0b1bbc1272646feb0f5e4..b8c8865d44c83d0e3e4660d41b1694521babe73a 100644
--- a/fpdfsdk/formfiller/cba_fontmap.cpp
+++ b/fpdfsdk/formfiller/cba_fontmap.cpp
@@ -79,24 +79,23 @@ void CBA_FontMap::SetDefaultFont(CPDF_Font* pFont,
CPDF_Font* CBA_FontMap::FindFontSameCharset(CFX_ByteString& sFontAlias,
int32_t nCharset) {
- if (m_pAnnotDict->GetStringBy("Subtype") == "Widget") {
- CPDF_Document* pDocument = GetDocument();
- CPDF_Dictionary* pRootDict = pDocument->GetRoot();
- if (!pRootDict)
- return nullptr;
+ if (m_pAnnotDict->GetStringBy("Subtype") != "Widget")
+ return nullptr;
- CPDF_Dictionary* pAcroFormDict = pRootDict->GetDictBy("AcroForm");
- if (!pAcroFormDict)
- return nullptr;
+ CPDF_Document* pDocument = GetDocument();
+ CPDF_Dictionary* pRootDict = pDocument->GetRoot();
+ if (!pRootDict)
+ return nullptr;
- CPDF_Dictionary* pDRDict = pAcroFormDict->GetDictBy("DR");
- if (!pDRDict)
- return nullptr;
+ CPDF_Dictionary* pAcroFormDict = pRootDict->GetDictBy("AcroForm");
+ if (!pAcroFormDict)
+ return nullptr;
- return FindResFontSameCharset(pDRDict, sFontAlias, nCharset);
- }
+ CPDF_Dictionary* pDRDict = pAcroFormDict->GetDictBy("DR");
+ if (!pDRDict)
+ return nullptr;
- return nullptr;
+ return FindResFontSameCharset(pDRDict, sFontAlias, nCharset);
}
CPDF_Document* CBA_FontMap::GetDocument() {
« no previous file with comments | « fpdfsdk/cfx_systemhandler.cpp ('k') | fpdfsdk/formfiller/cffl_combobox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698