summaryrefslogtreecommitdiff
path: root/xfa/fgas/font
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-04-19 08:58:54 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-04-19 13:16:57 +0000
commit3b71d26f092ebc86ca9177fbbe89d83caa67ae1b (patch)
treea81ab092972ab8a2ce474d8d53984bfe9b6887a8 /xfa/fgas/font
parent5af27b63bf94e7f60212f6759c8342ce02da5ad2 (diff)
downloadpdfium-3b71d26f092ebc86ca9177fbbe89d83caa67ae1b.tar.xz
Move CFGAS_Stream to CFX_SeekableStreamProxy
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 <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org>
Diffstat (limited to 'xfa/fgas/font')
-rw-r--r--xfa/fgas/font/cfgas_fontmgr.cpp2
-rw-r--r--xfa/fgas/font/cfgas_fontmgr.h2
-rw-r--r--xfa/fgas/font/cfgas_gefont.cpp2
-rw-r--r--xfa/fgas/font/cfgas_gefont.h7
-rw-r--r--xfa/fgas/font/fgas_fontutils.cpp2
5 files changed, 8 insertions, 7 deletions
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 <memory>
#include <utility>
+#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 <vector>
#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 <memory>
#include <utility>
+#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<CFGAS_Stream>& pFontStream,
- bool bSaveStream);
+ bool LoadFontInternal(
+ const CFX_RetainPtr<CFX_SeekableStreamProxy>& pFontStream,
+ bool bSaveStream);
#endif
bool LoadFontInternal(CFX_Font* pExternalFont);
bool LoadFontInternal(std::unique_ptr<CFX_Font> pInternalFont);
@@ -95,7 +96,7 @@ class CFGAS_GEFont : public CFX_Retainable {
CFX_RetainPtr<CFGAS_GEFont> m_pSrcFont; // Only set by ctor, so no cycles.
CFGAS_FontMgr* const m_pFontMgr;
bool m_bExternalFont;
- CFX_RetainPtr<CFGAS_Stream> m_pStream;
+ CFX_RetainPtr<CFX_SeekableStreamProxy> m_pStream;
CFX_RetainPtr<IFX_SeekableReadStream> m_pFileRead;
std::unique_ptr<CFX_UnicodeEncoding> m_pFontEncoding;
std::map<wchar_t, int32_t> 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 {