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

Unified Diff: xfa/src/fdp/src/fde/fde_gedevice.cpp

Issue 1411833003: XFA: Manually apply changes to fpdf_text.h and fx_font.h from master (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Fix NULL comparisons. Created 5 years, 2 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 | « core/src/fxge/ge/fx_ge_font.cpp ('k') | xfa/src/fgas/src/font/fx_gefont.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/src/fdp/src/fde/fde_gedevice.cpp
diff --git a/xfa/src/fdp/src/fde/fde_gedevice.cpp b/xfa/src/fdp/src/fde/fde_gedevice.cpp
index c50fcca1c6f99a21213856adc83eb92f3a37c0a5..f357f50ce5bc1be58db252651cf86fdb783847f2 100644
--- a/xfa/src/fdp/src/fde/fde_gedevice.cpp
+++ b/xfa/src/fdp/src/fde/fde_gedevice.cpp
@@ -165,7 +165,7 @@ FX_BOOL CFDE_FxgeDevice::DrawString(IFDE_Brush* pBrush,
FX_DWORD dwFontStyle = pFont->GetFontStyles();
CFX_Font FxFont;
CFX_SubstFont SubstFxFont;
- FxFont.m_pSubstFont = &SubstFxFont;
+ FxFont.SetSubstFont(&SubstFxFont);
SubstFxFont.m_Weight = dwFontStyle & FX_FONTSTYLE_Bold ? 700 : 400;
SubstFxFont.m_WeightCJK = SubstFxFont.m_Weight;
SubstFxFont.m_ItalicAngle = dwFontStyle & FX_FONTSTYLE_Italic ? -12 : 0;
@@ -179,7 +179,7 @@ FX_BOOL CFDE_FxgeDevice::DrawString(IFDE_Brush* pBrush,
if (pCurFont != NULL) {
pFxFont = (CFX_Font*)pCurFont->GetDevFont();
#if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_
- FxFont.m_Face = pFxFont->m_Face;
+ FxFont.SetFace(pFxFont->GetFace());
m_pDevice->DrawNormalText(
iCurCount, pCurCP, &FxFont, pCache, -fFontSize,
(const CFX_AffineMatrix*)pMatrix, argb, FXTEXT_CLEARTYPE);
@@ -200,12 +200,12 @@ FX_BOOL CFDE_FxgeDevice::DrawString(IFDE_Brush* pBrush,
if (pCurFont != NULL && iCurCount) {
pFxFont = (CFX_Font*)pCurFont->GetDevFont();
#if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_
- FxFont.m_Face = pFxFont->m_Face;
+ FxFont.SetFace(pFxFont->GetFace());
FX_BOOL bRet = m_pDevice->DrawNormalText(
iCurCount, pCurCP, &FxFont, pCache, -fFontSize,
(const CFX_AffineMatrix*)pMatrix, argb, FXTEXT_CLEARTYPE);
- FxFont.m_pSubstFont = NULL;
- FxFont.m_Face = NULL;
+ FxFont.SetSubstFont(nullptr);
+ FxFont.SetFace(nullptr);
return bRet;
#else
return m_pDevice->DrawNormalText(
@@ -214,8 +214,8 @@ FX_BOOL CFDE_FxgeDevice::DrawString(IFDE_Brush* pBrush,
#endif
}
#if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_
- FxFont.m_pSubstFont = NULL;
- FxFont.m_Face = NULL;
+ FxFont.SetSubstFont(nullptr);
+ FxFont.SetFace(nullptr);
#endif
return TRUE;
} break;
« no previous file with comments | « core/src/fxge/ge/fx_ge_font.cpp ('k') | xfa/src/fgas/src/font/fx_gefont.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698