diff options
Diffstat (limited to 'xfa/fxfa')
-rw-r--r-- | xfa/fxfa/cxfa_ffdoc.cpp | 6 | ||||
-rw-r--r-- | xfa/fxfa/cxfa_ffwidget.cpp | 9 | ||||
-rw-r--r-- | xfa/fxfa/parser/cxfa_dataexporter.cpp | 4 | ||||
-rw-r--r-- | xfa/fxfa/parser/cxfa_node.cpp | 4 |
4 files changed, 14 insertions, 9 deletions
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<CFX_DIBitmap> CXFA_FFDoc::GetPDFNamedImage( auto pAcc = pdfium::MakeRetain<CPDF_StreamAcc>(pStream); pAcc->LoadAllData(); - CFX_RetainPtr<IFX_SeekableStream> pImageFileRead = IFX_MemoryStream::Create( - const_cast<uint8_t*>(pAcc->GetData()), pAcc->GetSize()); + CFX_RetainPtr<IFX_SeekableStream> pImageFileRead = + pdfium::MakeRetain<CFX_MemoryStream>( + const_cast<uint8_t*>(pAcc->GetData()), pAcc->GetSize(), false); CFX_RetainPtr<CFX_DIBitmap> pDibSource = XFA_LoadImageFromBuffer( pImageFileRead, FXCODEC_IMAGE_UNKNOWN, iImageXDpi, iImageYDpi); 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; diff --git a/xfa/fxfa/parser/cxfa_dataexporter.cpp b/xfa/fxfa/parser/cxfa_dataexporter.cpp index 0c702fe53c..70748f2666 100644 --- a/xfa/fxfa/parser/cxfa_dataexporter.cpp +++ b/xfa/fxfa/parser/cxfa_dataexporter.cpp @@ -8,6 +8,7 @@ #include <vector> +#include "core/fxcrt/cfx_memorystream.h" #include "core/fxcrt/fx_basic.h" #include "core/fxcrt/fx_codepage.h" #include "core/fxcrt/xml/cfx_xmldoc.h" @@ -224,8 +225,7 @@ void RegenerateFormFile_Changed(CXFA_Node* pNode, if (!pRichTextXML) break; - CFX_RetainPtr<IFX_MemoryStream> pMemStream = - IFX_MemoryStream::Create(true); + auto pMemStream = pdfium::MakeRetain<CFX_MemoryStream>(true); auto pTempStream = pdfium::MakeRetain<CFX_SeekableStreamProxy>(pMemStream, true); diff --git a/xfa/fxfa/parser/cxfa_node.cpp b/xfa/fxfa/parser/cxfa_node.cpp index a3c9ee42e0..d6d2ece428 100644 --- a/xfa/fxfa/parser/cxfa_node.cpp +++ b/xfa/fxfa/parser/cxfa_node.cpp @@ -13,6 +13,7 @@ #include <vector> #include "core/fxcrt/cfx_decimal.h" +#include "core/fxcrt/cfx_memorystream.h" #include "core/fxcrt/fx_codepage.h" #include "core/fxcrt/fx_extension.h" #include "core/fxcrt/xml/cfx_xmlelement.h" @@ -1406,8 +1407,7 @@ void CXFA_Node::Script_NodeClass_SaveXML(CFXJSE_Arguments* pArguments) { } XFA_DataExporter_DealWithDataGroupNode(this); } - CFX_RetainPtr<IFX_MemoryStream> pMemoryStream = - IFX_MemoryStream::Create(true); + auto pMemoryStream = pdfium::MakeRetain<CFX_MemoryStream>(true); auto pStream = pdfium::MakeRetain<CFX_SeekableStreamProxy>(pMemoryStream, true); pStream->SetCodePage(FX_CODEPAGE_UTF8); |