From 3b71d26f092ebc86ca9177fbbe89d83caa67ae1b Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Wed, 19 Apr 2017 08:58:54 -0400 Subject: Move CFGAS_Stream to CFX_SeekableStreamProxy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This CL moves the FGAS stream code into core/fxcrt and renames to CFX_SeekableStreamProxy. Change-Id: I6641fe0cca45a128ef3ec281b0b40f8d60296387 Reviewed-on: https://pdfium-review.googlesource.com/4311 Commit-Queue: dsinclair Reviewed-by: Tom Sepez Reviewed-by: Nicolás Peña --- xfa/fgas/font/cfgas_fontmgr.cpp | 2 +- xfa/fgas/font/cfgas_fontmgr.h | 2 +- xfa/fgas/font/cfgas_gefont.cpp | 2 +- xfa/fgas/font/cfgas_gefont.h | 7 ++++--- xfa/fgas/font/fgas_fontutils.cpp | 2 +- 5 files changed, 8 insertions(+), 7 deletions(-) (limited to 'xfa/fgas/font') diff --git a/xfa/fgas/font/cfgas_fontmgr.cpp b/xfa/fgas/font/cfgas_fontmgr.cpp index 8cd799e37a..d1c4b3d580 100644 --- a/xfa/fgas/font/cfgas_fontmgr.cpp +++ b/xfa/fgas/font/cfgas_fontmgr.cpp @@ -10,6 +10,7 @@ #include #include +#include "core/fxcrt/fx_codepage.h" #include "core/fxcrt/fx_stream.h" #include "core/fxge/cfx_fontmapper.h" #include "core/fxge/cfx_fontmgr.h" @@ -17,7 +18,6 @@ #include "core/fxge/ifx_systemfontinfo.h" #include "third_party/base/ptr_util.h" #include "third_party/base/stl_util.h" -#include "xfa/fgas/crt/fgas_codepage.h" #include "xfa/fgas/font/cfgas_gefont.h" #include "xfa/fgas/font/fgas_fontutils.h" diff --git a/xfa/fgas/font/cfgas_fontmgr.h b/xfa/fgas/font/cfgas_fontmgr.h index 8a3705335e..cca999a869 100644 --- a/xfa/fgas/font/cfgas_fontmgr.h +++ b/xfa/fgas/font/cfgas_fontmgr.h @@ -14,11 +14,11 @@ #include #include "core/fxcrt/cfx_retain_ptr.h" +#include "core/fxcrt/cfx_seekablestreamproxy.h" #include "core/fxcrt/fx_ext.h" #include "core/fxge/cfx_fontmapper.h" #include "core/fxge/fx_freetype.h" #include "core/fxge/ifx_systemfontinfo.h" -#include "xfa/fgas/crt/cfgas_stream.h" #define FX_FONTSTYLE_Normal 0x00 #define FX_FONTSTYLE_FixedPitch 0x01 diff --git a/xfa/fgas/font/cfgas_gefont.cpp b/xfa/fgas/font/cfgas_gefont.cpp index fdeb2ce533..ab773698e7 100644 --- a/xfa/fgas/font/cfgas_gefont.cpp +++ b/xfa/fgas/font/cfgas_gefont.cpp @@ -9,11 +9,11 @@ #include #include +#include "core/fxcrt/fx_codepage.h" #include "core/fxge/cfx_substfont.h" #include "core/fxge/cfx_unicodeencoding.h" #include "core/fxge/cfx_unicodeencodingex.h" #include "third_party/base/ptr_util.h" -#include "xfa/fgas/crt/fgas_codepage.h" #include "xfa/fgas/font/fgas_fontutils.h" #include "xfa/fxfa/cxfa_fontmgr.h" diff --git a/xfa/fgas/font/cfgas_gefont.h b/xfa/fgas/font/cfgas_gefont.h index 6c9f2a168d..ba2e6e69a5 100644 --- a/xfa/fgas/font/cfgas_gefont.h +++ b/xfa/fgas/font/cfgas_gefont.h @@ -67,8 +67,9 @@ class CFGAS_GEFont : public CFX_Retainable { uint32_t dwFontStyles, uint16_t wCodePage); bool LoadFontInternal(const uint8_t* pBuffer, int32_t length); - bool LoadFontInternal(const CFX_RetainPtr& pFontStream, - bool bSaveStream); + bool LoadFontInternal( + const CFX_RetainPtr& pFontStream, + bool bSaveStream); #endif bool LoadFontInternal(CFX_Font* pExternalFont); bool LoadFontInternal(std::unique_ptr pInternalFont); @@ -95,7 +96,7 @@ class CFGAS_GEFont : public CFX_Retainable { CFX_RetainPtr m_pSrcFont; // Only set by ctor, so no cycles. CFGAS_FontMgr* const m_pFontMgr; bool m_bExternalFont; - CFX_RetainPtr m_pStream; + CFX_RetainPtr m_pStream; CFX_RetainPtr m_pFileRead; std::unique_ptr m_pFontEncoding; std::map m_CharWidthMap; diff --git a/xfa/fgas/font/fgas_fontutils.cpp b/xfa/fgas/font/fgas_fontutils.cpp index 4dc599cd4b..f5673de56b 100644 --- a/xfa/fgas/font/fgas_fontutils.cpp +++ b/xfa/fgas/font/fgas_fontutils.cpp @@ -6,8 +6,8 @@ #include "xfa/fgas/font/fgas_fontutils.h" +#include "core/fxcrt/fx_codepage.h" #include "core/fxcrt/fx_ext.h" -#include "xfa/fgas/crt/fgas_codepage.h" #include "xfa/fgas/font/cfgas_fontmgr.h" namespace { -- cgit v1.2.3