diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-04-20 14:11:21 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-04-20 18:38:55 +0000 |
commit | 283a0433b081f88275b2f7e8c04d3c41b9187ca6 (patch) | |
tree | 4f6ff921e8a7de9b7922369c97731e54f647ea33 /xfa/fxfa/cxfa_ffwidget.cpp | |
parent | 03f5bab415cda066855e2672154358056649c584 (diff) | |
download | pdfium-283a0433b081f88275b2f7e8c04d3c41b9187ca6.tar.xz |
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 <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/cxfa_ffwidget.cpp')
-rw-r--r-- | xfa/fxfa/cxfa_ffwidget.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/xfa/fxfa/cxfa_ffwidget.cpp b/xfa/fxfa/cxfa_ffwidget.cpp index 18d6f94bc7..bdadba7c85 100644 --- a/xfa/fxfa/cxfa_ffwidget.cpp +++ b/xfa/fxfa/cxfa_ffwidget.cpp @@ -14,6 +14,7 @@ #include "core/fxcodec/codec/ccodec_progressivedecoder.h" #include "core/fxcodec/fx_codec.h" #include "core/fxcrt/cfx_maybe_owned.h" +#include "core/fxcrt/cfx_memorystream.h" #include "core/fxge/cfx_gemodule.h" #include "core/fxge/cfx_pathdata.h" #include "core/fxge/cfx_renderdevice.h" @@ -1062,12 +1063,14 @@ CFX_RetainPtr<CFX_DIBitmap> XFA_LoadImageData(CXFA_FFDoc* pDoc, pImageBuffer = FX_Alloc(uint8_t, iLength); int32_t iRead = XFA_Base64Decode(bsData.c_str(), pImageBuffer); if (iRead > 0) { - pImageFileRead = IFX_MemoryStream::Create(pImageBuffer, iRead); + pImageFileRead = + pdfium::MakeRetain<CFX_MemoryStream>(pImageBuffer, iRead, false); } } else { bsContent = CFX_ByteString::FromUnicode(wsImage); - pImageFileRead = IFX_MemoryStream::Create( - const_cast<uint8_t*>(bsContent.raw_str()), bsContent.GetLength()); + pImageFileRead = pdfium::MakeRetain<CFX_MemoryStream>( + const_cast<uint8_t*>(bsContent.raw_str()), bsContent.GetLength(), + false); } } else { CFX_WideString wsURL = wsHref; |