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

Unified Diff: xfa/fde/fde_gedevice.cpp

Issue 2033243004: Make GetDevFont() return a CFX_Font* instead of void* (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: One more file. 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 | « no previous file | xfa/fgas/font/fgas_font.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fde/fde_gedevice.cpp
diff --git a/xfa/fde/fde_gedevice.cpp b/xfa/fde/fde_gedevice.cpp
index 8834bd89226fbdf72c49fba60049a47dda44b67c..8370b2fbefadf9cf3443869f313f775a8380c7f5 100644
--- a/xfa/fde/fde_gedevice.cpp
+++ b/xfa/fde/fde_gedevice.cpp
@@ -110,10 +110,9 @@ FX_BOOL CFDE_RenderDevice::DrawString(CFDE_Brush* pBrush,
int32_t iCount,
FX_FLOAT fFontSize,
const CFX_Matrix* pMatrix) {
- ASSERT(pBrush != NULL && pFont != NULL && pCharPos != NULL && iCount > 0);
+ ASSERT(pBrush && pFont && pCharPos && iCount > 0);
CFX_FontCache* pCache = CFX_GEModule::Get()->GetFontCache();
- CFX_Font* pFxFont = (CFX_Font*)pFont->GetDevFont();
-
+ CFX_Font* pFxFont = pFont->GetDevFont();
FX_ARGB argb = pBrush->GetColor();
if ((pFont->GetFontStyles() & FX_FONTSTYLE_Italic) != 0 &&
!pFxFont->IsItalic()) {
@@ -149,9 +148,8 @@ FX_BOOL CFDE_RenderDevice::DrawString(CFDE_Brush* pBrush,
pCP->m_GlyphIndex &= 0x00FFFFFF;
pCP->m_bFontStyle = FALSE;
if (pCurFont != pSTFont) {
- if (pCurFont != NULL) {
- pFxFont = (CFX_Font*)pCurFont->GetDevFont();
-
+ if (pCurFont) {
+ pFxFont = pCurFont->GetDevFont();
#if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_
FxFont.SetFace(pFxFont->GetFace());
m_pDevice->DrawNormalText(iCurCount, pCurCP, &FxFont, pCache,
@@ -171,9 +169,8 @@ FX_BOOL CFDE_RenderDevice::DrawString(CFDE_Brush* pBrush,
}
pCP++;
}
- if (pCurFont != NULL && iCurCount) {
- pFxFont = (CFX_Font*)pCurFont->GetDevFont();
-
+ if (pCurFont && iCurCount) {
+ pFxFont = pCurFont->GetDevFont();
#if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_
FxFont.SetFace(pFxFont->GetFace());
FX_BOOL bRet = m_pDevice->DrawNormalText(
« no previous file with comments | « no previous file | xfa/fgas/font/fgas_font.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698