diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-04-18 16:35:55 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-04-18 20:50:08 +0000 |
commit | bf510b7c520bccbd2edf5bb3e2f91b125ebfd6d7 (patch) | |
tree | 6ffafd1e5fcc767f5a4160d290e0b5f72d2ce271 /xfa/fxfa/parser/cxfa_dataexporter.cpp | |
parent | fdf7d4092a5fa9c79bbb4a626a4d3d087053ae2c (diff) | |
download | pdfium-bf510b7c520bccbd2edf5bb3e2f91b125ebfd6d7.tar.xz |
Rename IFGAS_Stream to CFGAS_Stream
This CL replaces IFGAS_Stream with the only implementation CFGAS_Stream.
The CreateReadStream and CreateWriteStream methods are removed in favour
of calling MakeRetain directly.
Change-Id: I882a89258f642e24fc3d631587db05652bd53ded
Reviewed-on: https://pdfium-review.googlesource.com/4210
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser/cxfa_dataexporter.cpp')
-rw-r--r-- | xfa/fxfa/parser/cxfa_dataexporter.cpp | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/xfa/fxfa/parser/cxfa_dataexporter.cpp b/xfa/fxfa/parser/cxfa_dataexporter.cpp index 4e3b0b3ffa..442195b1dd 100644 --- a/xfa/fxfa/parser/cxfa_dataexporter.cpp +++ b/xfa/fxfa/parser/cxfa_dataexporter.cpp @@ -226,8 +226,7 @@ void RegenerateFormFile_Changed(CXFA_Node* pNode, CFX_RetainPtr<IFX_MemoryStream> pMemStream = IFX_MemoryStream::Create(true); - CFX_RetainPtr<IFGAS_Stream> pTempStream = - IFGAS_Stream::CreateWriteStream(pMemStream); + auto pTempStream = pdfium::MakeRetain<CFGAS_Stream>(pMemStream, true); pTempStream->SetCodePage(FX_CODEPAGE_UTF8); pRichTextXML->SaveXMLNode(pTempStream); @@ -343,8 +342,8 @@ void RegenerateFormFile_Changed(CXFA_Node* pNode, } void RegenerateFormFile_Container(CXFA_Node* pNode, - const CFX_RetainPtr<IFGAS_Stream>& pStream, - bool bSaveXML = false) { + const CFX_RetainPtr<CFGAS_Stream>& pStream, + bool bSaveXML) { XFA_Element eType = pNode->GetElementType(); if (eType == XFA_Element::Field || eType == XFA_Element::Draw || !pNode->IsContainerNode()) { @@ -400,7 +399,7 @@ void RegenerateFormFile_Container(CXFA_Node* pNode, void XFA_DataExporter_RegenerateFormFile( CXFA_Node* pNode, - const CFX_RetainPtr<IFGAS_Stream>& pStream, + const CFX_RetainPtr<CFGAS_Stream>& pStream, const char* pChecksum, bool bSaveXML) { if (pNode->IsModelNode()) { @@ -428,7 +427,7 @@ void XFA_DataExporter_RegenerateFormFile( CXFA_Node* pChildNode = pNode->GetNodeItem(XFA_NODEITEM_FirstChild); while (pChildNode) { - RegenerateFormFile_Container(pChildNode, pStream); + RegenerateFormFile_Container(pChildNode, pStream, false); pChildNode = pChildNode->GetNodeItem(XFA_NODEITEM_NextSibling); } pStream->WriteString(L"</form\n>"); @@ -486,15 +485,12 @@ bool CXFA_DataExporter::Export(const CFX_RetainPtr<IFX_SeekableStream>& pWrite, if (!pWrite) return false; - CFX_RetainPtr<IFGAS_Stream> pStream = IFGAS_Stream::CreateWriteStream(pWrite); - if (!pStream) - return false; - + auto pStream = pdfium::MakeRetain<CFGAS_Stream>(pWrite, true); pStream->SetCodePage(FX_CODEPAGE_UTF8); return Export(pStream, pNode, dwFlag, pChecksum); } -bool CXFA_DataExporter::Export(const CFX_RetainPtr<IFGAS_Stream>& pStream, +bool CXFA_DataExporter::Export(const CFX_RetainPtr<CFGAS_Stream>& pStream, CXFA_Node* pNode, uint32_t dwFlag, const char* pChecksum) { |