summaryrefslogtreecommitdiff
path: root/xfa/fgas/font/cfgas_fontmgr.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-04-20 13:13:04 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-04-20 17:49:41 +0000
commitcfb1944e245e20fe2ce0e94feebc06526db34fa1 (patch)
tree6728e3ebca9e53dc97a18e1f5f37c3d53d9bb404 /xfa/fgas/font/cfgas_fontmgr.cpp
parent6864bf8c4fbcac0833a77d044f17f4100d504f2a (diff)
downloadpdfium-cfb1944e245e20fe2ce0e94feebc06526db34fa1.tar.xz
Cleanup the fx_extension code.
This CL cleans up the fx_extension file. The stream code was moved to fx_stream. IFX_FileAccess was removed and CFX_CRTFileAccess split to its own file. Code shuffled from header to cpp file. Change-Id: I700fdfcc9797cf4e8050cd9ba010ad8854feefbf Reviewed-on: https://pdfium-review.googlesource.com/4371 Reviewed-by: Nicolás Peña <npm@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fgas/font/cfgas_fontmgr.cpp')
-rw-r--r--xfa/fgas/font/cfgas_fontmgr.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/xfa/fgas/font/cfgas_fontmgr.cpp b/xfa/fgas/font/cfgas_fontmgr.cpp
index e0b71118d9..74c284012f 100644
--- a/xfa/fgas/font/cfgas_fontmgr.cpp
+++ b/xfa/fgas/font/cfgas_fontmgr.cpp
@@ -678,12 +678,11 @@ bool CFX_FontSourceEnum_File::HasStartPosition() {
return m_wsNext.GetLength() != 0;
}
-CFX_RetainPtr<IFX_FileAccess> CFX_FontSourceEnum_File::GetNext() {
+CFX_RetainPtr<CFX_CRTFileAccess> CFX_FontSourceEnum_File::GetNext() {
if (m_wsNext.GetLength() == 0)
return nullptr;
- CFX_RetainPtr<IFX_FileAccess> pAccess =
- IFX_FileAccess::CreateDefault(m_wsNext.AsStringC());
+ auto pAccess = pdfium::MakeRetain<CFX_CRTFileAccess>(m_wsNext.AsStringC());
m_wsNext = GetNextFile().UTF8Decode();
return pAccess;
}
@@ -733,7 +732,8 @@ bool CFGAS_FontMgr::EnumFontsFromFiles() {
if (!m_pFontSource->HasStartPosition())
return !m_InstalledFonts.empty();
- while (CFX_RetainPtr<IFX_FileAccess> pFontSource = m_pFontSource->GetNext()) {
+ while (CFX_RetainPtr<CFX_CRTFileAccess> pFontSource =
+ m_pFontSource->GetNext()) {
CFX_RetainPtr<IFX_SeekableReadStream> pFontStream =
pFontSource->CreateFileStream(FX_FILEMODE_ReadOnly);
if (pFontStream)