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

Unified Diff: xfa/src/fxfa/src/app/xfa_fontmgr.cpp

Issue 1740613002: Remove set but unsed variables. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: rebase Created 4 years, 10 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 | « xfa/src/fxfa/src/app/xfa_fftextedit.cpp ('k') | xfa/src/fxfa/src/fm2js/xfa_fm2jscontext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/src/fxfa/src/app/xfa_fontmgr.cpp
diff --git a/xfa/src/fxfa/src/app/xfa_fontmgr.cpp b/xfa/src/fxfa/src/app/xfa_fontmgr.cpp
index 3474e0aa90573a7632e166402f76942312c5b62a..c5d175abec2201a1dc908a8eb9709b8579a6c4c4 100644
--- a/xfa/src/fxfa/src/app/xfa_fontmgr.cpp
+++ b/xfa/src/fxfa/src/app/xfa_fontmgr.cpp
@@ -7,7 +7,6 @@
#include <algorithm>
#include "xfa/src/foxitlib.h"
-#include "xfa/src/fxfa/src/app/xfa_ffConfigAcc.h"
#include "xfa/src/fxfa/src/app/xfa_ffapp.h"
#include "xfa/src/fxfa/src/app/xfa_ffdoc.h"
#include "xfa/src/fxfa/src/app/xfa_fontmgr.h"
@@ -1759,20 +1758,17 @@ CXFA_DefFontMgr::~CXFA_DefFontMgr() {
}
m_CacheFonts.RemoveAll();
}
+
IFX_Font* CXFA_DefFontMgr::GetFont(IXFA_Doc* hDoc,
const CFX_WideStringC& wsFontFamily,
FX_DWORD dwFontStyles,
FX_WORD wCodePage) {
CFX_WideString wsFontName = wsFontFamily;
- IFX_FontMgr* pFDEFontMgr = ((CXFA_FFDoc*)hDoc)->GetApp()->GetFDEFontMgr();
- const XFA_FONTINFO* pCurFont = NULL;
- FX_BOOL bGetFontInfo = TRUE;
- IFX_Font* pFont = pFDEFontMgr->LoadFont((const FX_WCHAR*)wsFontName,
- dwFontStyles, wCodePage);
- if (!pFont && hDoc) {
- if (bGetFontInfo) {
- pCurFont = XFA_GetFontINFOByFontName(wsFontName);
- }
+ IFX_FontMgr* pFDEFontMgr =
+ static_cast<CXFA_FFDoc*>(hDoc)->GetApp()->GetFDEFontMgr();
+ IFX_Font* pFont = pFDEFontMgr->LoadFont(wsFontName, dwFontStyles, wCodePage);
+ if (!pFont) {
+ const XFA_FONTINFO* pCurFont = XFA_GetFontINFOByFontName(wsFontName);
if (pCurFont && pCurFont->pReplaceFont) {
FX_DWORD dwStyle = 0;
if (dwFontStyles & FX_FONTSTYLE_Bold) {
@@ -1806,6 +1802,7 @@ IFX_Font* CXFA_DefFontMgr::GetFont(IXFA_Doc* hDoc,
}
return pFont;
}
+
IFX_Font* CXFA_DefFontMgr::GetDefaultFont(IXFA_Doc* hDoc,
const CFX_WideStringC& wsFontFamily,
FX_DWORD dwFontStyles,
« no previous file with comments | « xfa/src/fxfa/src/app/xfa_fftextedit.cpp ('k') | xfa/src/fxfa/src/fm2js/xfa_fm2jscontext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698