From a4fdfc5ed0e8d2e6acc52cc34eac42c6072f0ccc Mon Sep 17 00:00:00 2001 From: thestig Date: Tue, 7 Jun 2016 17:33:37 -0700 Subject: Replace IFGAS_Font with underlying concrete type Review-Url: https://codereview.chromium.org/2037563002 --- xfa/fde/cfde_txtedttextset.cpp | 2 +- xfa/fde/cfde_txtedttextset.h | 2 +- xfa/fde/fde_gedevice.cpp | 7 ++++--- xfa/fde/fde_gedevice.h | 8 ++++---- xfa/fde/fde_render.cpp | 2 +- xfa/fde/fde_visualset.h | 2 +- xfa/fde/ifde_txtedtengine.h | 2 +- xfa/fde/tto/fde_textout.cpp | 2 +- xfa/fde/tto/fde_textout.h | 4 ++-- 9 files changed, 16 insertions(+), 15 deletions(-) (limited to 'xfa/fde') diff --git a/xfa/fde/cfde_txtedttextset.cpp b/xfa/fde/cfde_txtedttextset.cpp index b06e430b1d..9213d650f3 100644 --- a/xfa/fde/cfde_txtedttextset.cpp +++ b/xfa/fde/cfde_txtedttextset.cpp @@ -32,7 +32,7 @@ int32_t CFDE_TxtEdtTextSet::GetString(FDE_TEXTEDITPIECE* pPiece, return pPiece->nCount; } -IFGAS_Font* CFDE_TxtEdtTextSet::GetFont() { +CFGAS_GEFont* CFDE_TxtEdtTextSet::GetFont() { return m_pPage->GetEngine()->GetEditParams()->pFont; } diff --git a/xfa/fde/cfde_txtedttextset.h b/xfa/fde/cfde_txtedttextset.h index 78a9aabfd4..a2121659ba 100644 --- a/xfa/fde/cfde_txtedttextset.h +++ b/xfa/fde/cfde_txtedttextset.h @@ -22,7 +22,7 @@ class CFDE_TxtEdtTextSet : public IFDE_TextSet { // IFDE_TextSet int32_t GetString(FDE_TEXTEDITPIECE* pPiece, CFX_WideString& wsText) override; - IFGAS_Font* GetFont() override; + CFGAS_GEFont* GetFont() override; FX_FLOAT GetFontSize() override; FX_ARGB GetFontColor() override; int32_t GetDisplayPos(FDE_TEXTEDITPIECE* pPiece, diff --git a/xfa/fde/fde_gedevice.cpp b/xfa/fde/fde_gedevice.cpp index 005387f83a..03065d751c 100644 --- a/xfa/fde/fde_gedevice.cpp +++ b/xfa/fde/fde_gedevice.cpp @@ -11,6 +11,7 @@ #include "xfa/fde/cfde_path.h" #include "xfa/fde/fde_object.h" #include "xfa/fgas/font/fgas_font.h" +#include "xfa/fgas/font/fgas_gefont.h" CFDE_RenderDevice::CFDE_RenderDevice(CFX_RenderDevice* pDevice, FX_BOOL bOwnerDevice) @@ -104,7 +105,7 @@ FX_BOOL CFDE_RenderDevice::DrawImage(CFX_DIBSource* pDib, return handle != NULL; } FX_BOOL CFDE_RenderDevice::DrawString(CFDE_Brush* pBrush, - IFGAS_Font* pFont, + CFGAS_GEFont* pFont, const FXTEXT_CHARPOS* pCharPos, int32_t iCount, FX_FLOAT fFontSize, @@ -126,8 +127,8 @@ FX_BOOL CFDE_RenderDevice::DrawString(CFDE_Brush* pBrush, } } FXTEXT_CHARPOS* pCP = (FXTEXT_CHARPOS*)pCharPos; - IFGAS_Font* pCurFont = NULL; - IFGAS_Font* pSTFont = NULL; + CFGAS_GEFont* pCurFont = NULL; + CFGAS_GEFont* pSTFont = NULL; FXTEXT_CHARPOS* pCurCP = NULL; int32_t iCurCount = 0; diff --git a/xfa/fde/fde_gedevice.h b/xfa/fde/fde_gedevice.h index 4f30bd57a4..debb69115c 100644 --- a/xfa/fde/fde_gedevice.h +++ b/xfa/fde/fde_gedevice.h @@ -13,7 +13,7 @@ class CFDE_Brush; class CFDE_Path; class CFDE_Pen; -class IFGAS_Font; +class CFGAS_GEFont; class CFDE_RenderDevice : public CFX_Target { public: @@ -38,7 +38,7 @@ class CFDE_RenderDevice : public CFX_Target { const CFX_Matrix* pImgMatrix = NULL, const CFX_Matrix* pDevMatrix = NULL); FX_BOOL DrawString(CFDE_Brush* pBrush, - IFGAS_Font* pFont, + CFGAS_GEFont* pFont, const FXTEXT_CHARPOS* pCharPos, int32_t iCount, FX_FLOAT fFontSize, @@ -99,13 +99,13 @@ class CFDE_RenderDevice : public CFX_Target { const CFX_Matrix* pMatrix = NULL); FX_BOOL DrawSolidString(CFDE_Brush* pBrush, - IFGAS_Font* pFont, + CFGAS_GEFont* pFont, const FXTEXT_CHARPOS* pCharPos, int32_t iCount, FX_FLOAT fFontSize, const CFX_Matrix* pMatrix); FX_BOOL DrawStringPath(CFDE_Brush* pBrush, - IFGAS_Font* pFont, + CFGAS_GEFont* pFont, const FXTEXT_CHARPOS* pCharPos, int32_t iCount, FX_FLOAT fFontSize, diff --git a/xfa/fde/fde_render.cpp b/xfa/fde/fde_render.cpp index 6e6d739cf9..04d52549c6 100644 --- a/xfa/fde/fde_render.cpp +++ b/xfa/fde/fde_render.cpp @@ -111,7 +111,7 @@ void CFDE_RenderContext::RenderText(IFDE_TextSet* pTextSet, ASSERT(m_pRenderDevice); ASSERT(pTextSet && pText); - IFGAS_Font* pFont = pTextSet->GetFont(); + CFGAS_GEFont* pFont = pTextSet->GetFont(); if (!pFont) return; diff --git a/xfa/fde/fde_visualset.h b/xfa/fde/fde_visualset.h index e6898d83fa..2005f73f84 100644 --- a/xfa/fde/fde_visualset.h +++ b/xfa/fde/fde_visualset.h @@ -46,7 +46,7 @@ class IFDE_TextSet : public IFDE_VisualSet { public: virtual int32_t GetString(FDE_TEXTEDITPIECE* hText, CFX_WideString& wsText) = 0; - virtual IFGAS_Font* GetFont() = 0; + virtual CFGAS_GEFont* GetFont() = 0; virtual FX_FLOAT GetFontSize() = 0; virtual FX_ARGB GetFontColor() = 0; virtual int32_t GetDisplayPos(FDE_TEXTEDITPIECE* hText, diff --git a/xfa/fde/ifde_txtedtengine.h b/xfa/fde/ifde_txtedtengine.h index b13dc593b3..8ecf46e5c8 100644 --- a/xfa/fde/ifde_txtedtengine.h +++ b/xfa/fde/ifde_txtedtengine.h @@ -109,7 +109,7 @@ struct FDE_TXTEDTPARAMS { uint32_t dwLayoutStyles; uint32_t dwAlignment; uint32_t dwMode; - IFGAS_Font* pFont; + CFGAS_GEFont* pFont; FX_FLOAT fFontSize; FX_ARGB dwFontColor; FX_FLOAT fLineSpace; diff --git a/xfa/fde/tto/fde_textout.cpp b/xfa/fde/tto/fde_textout.cpp index d9ada61d77..6b9f8522b5 100644 --- a/xfa/fde/tto/fde_textout.cpp +++ b/xfa/fde/tto/fde_textout.cpp @@ -53,7 +53,7 @@ CFDE_TextOut::~CFDE_TextOut() { FX_Free(m_pCharPos); m_ttoLines.RemoveAll(); } -void CFDE_TextOut::SetFont(IFGAS_Font* pFont) { +void CFDE_TextOut::SetFont(CFGAS_GEFont* pFont) { ASSERT(pFont); m_pFont = pFont; m_pTxtBreak->SetFont(pFont); diff --git a/xfa/fde/tto/fde_textout.h b/xfa/fde/tto/fde_textout.h index e08a1487bb..4959f2bc69 100644 --- a/xfa/fde/tto/fde_textout.h +++ b/xfa/fde/tto/fde_textout.h @@ -75,7 +75,7 @@ class CFDE_TextOut : public CFX_Target { CFDE_TextOut(); ~CFDE_TextOut() override; - void SetFont(IFGAS_Font* pFont); + void SetFont(CFGAS_GEFont* pFont); void SetFontSize(FX_FLOAT fFontSize); void SetTextColor(FX_ARGB color); void SetStyles(uint32_t dwStyles); @@ -151,7 +151,7 @@ class CFDE_TextOut : public CFX_Target { void DrawLine(const FDE_TTOPIECE* pPiece, CFDE_Pen*& pPen); CFX_TxtBreak* m_pTxtBreak; - IFGAS_Font* m_pFont; + CFGAS_GEFont* m_pFont; FX_FLOAT m_fFontSize; FX_FLOAT m_fLineSpace; FX_FLOAT m_fLinePos; -- cgit v1.2.3