From 283a0433b081f88275b2f7e8c04d3c41b9187ca6 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Thu, 20 Apr 2017 14:11:21 -0400 Subject: Convert IFX_MemoryStream to CFX_MemoryStream The CFX_MemoryStream is the only implementation of IFX_MemoryStream. This CL removes the interfaces and uses CFX_MemoryStream directly. Change-Id: I2f43fa39e82dafa7673517d214ae15fd2d0df331 Reviewed-on: https://pdfium-review.googlesource.com/4391 Reviewed-by: Tom Sepez Commit-Queue: dsinclair --- xfa/fxfa/cxfa_ffdoc.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'xfa/fxfa/cxfa_ffdoc.cpp') diff --git a/xfa/fxfa/cxfa_ffdoc.cpp b/xfa/fxfa/cxfa_ffdoc.cpp index 5e36c08ff0..228c4948b6 100644 --- a/xfa/fxfa/cxfa_ffdoc.cpp +++ b/xfa/fxfa/cxfa_ffdoc.cpp @@ -15,6 +15,7 @@ #include "core/fpdfapi/parser/fpdf_parser_decode.h" #include "core/fpdfdoc/cpdf_nametree.h" #include "core/fxcrt/cfx_checksumcontext.h" +#include "core/fxcrt/cfx_memorystream.h" #include "core/fxcrt/fx_extension.h" #include "core/fxcrt/fx_memory.h" #include "core/fxcrt/xml/cfx_xmlelement.h" @@ -389,8 +390,9 @@ CFX_RetainPtr CXFA_FFDoc::GetPDFNamedImage( auto pAcc = pdfium::MakeRetain(pStream); pAcc->LoadAllData(); - CFX_RetainPtr pImageFileRead = IFX_MemoryStream::Create( - const_cast(pAcc->GetData()), pAcc->GetSize()); + CFX_RetainPtr pImageFileRead = + pdfium::MakeRetain( + const_cast(pAcc->GetData()), pAcc->GetSize(), false); CFX_RetainPtr pDibSource = XFA_LoadImageFromBuffer( pImageFileRead, FXCODEC_IMAGE_UNKNOWN, iImageXDpi, iImageYDpi); -- cgit v1.2.3