summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/cxfa_simple_parser.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-04-18 16:35:55 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-04-18 20:50:08 +0000
commitbf510b7c520bccbd2edf5bb3e2f91b125ebfd6d7 (patch)
tree6ffafd1e5fcc767f5a4160d290e0b5f72d2ce271 /xfa/fxfa/parser/cxfa_simple_parser.cpp
parentfdf7d4092a5fa9c79bbb4a626a4d3d087053ae2c (diff)
downloadpdfium-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_simple_parser.cpp')
-rw-r--r--xfa/fxfa/parser/cxfa_simple_parser.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/xfa/fxfa/parser/cxfa_simple_parser.cpp b/xfa/fxfa/parser/cxfa_simple_parser.cpp
index 1ebed10b4d..92196ec957 100644
--- a/xfa/fxfa/parser/cxfa_simple_parser.cpp
+++ b/xfa/fxfa/parser/cxfa_simple_parser.cpp
@@ -19,8 +19,8 @@
#include "xfa/fde/xml/cfde_xmlnode.h"
#include "xfa/fde/xml/cfde_xmlparser.h"
#include "xfa/fde/xml/cfde_xmltext.h"
+#include "xfa/fgas/crt/cfgas_stream.h"
#include "xfa/fgas/crt/fgas_codepage.h"
-#include "xfa/fgas/crt/ifgas_stream.h"
#include "xfa/fxfa/fxfa.h"
#include "xfa/fxfa/parser/cxfa_document.h"
#include "xfa/fxfa/parser/cxfa_node.h"
@@ -277,10 +277,7 @@ int32_t CXFA_SimpleParser::StartParse(
XFA_XDPPACKET ePacketID) {
CloseParser();
m_pFileRead = pStream;
- m_pStream = IFGAS_Stream::CreateReadStream(pStream);
- if (!m_pStream)
- return XFA_PARSESTATUS_StreamErr;
-
+ m_pStream = pdfium::MakeRetain<CFGAS_Stream>(pStream, false);
uint16_t wCodePage = m_pStream->GetCodePage();
if (wCodePage != FX_CODEPAGE_UTF16LE && wCodePage != FX_CODEPAGE_UTF16BE &&
wCodePage != FX_CODEPAGE_UTF8) {
@@ -322,9 +319,8 @@ CFDE_XMLNode* CXFA_SimpleParser::ParseXMLData(const CFX_ByteString& wsXML,
CloseParser();
m_pXMLDoc = pdfium::MakeUnique<CFDE_XMLDoc>();
- CFX_RetainPtr<IFGAS_Stream> pStream =
- IFGAS_Stream::CreateReadStream(IFX_MemoryStream::Create(
- const_cast<uint8_t*>(wsXML.raw_str()), wsXML.GetLength()));
+ auto pStream = pdfium::MakeRetain<CFGAS_Stream>(
+ const_cast<uint8_t*>(wsXML.raw_str()), wsXML.GetLength());
auto pParser =
pdfium::MakeUnique<CFDE_XMLParser>(m_pXMLDoc->GetRoot(), pStream);
pParser->m_dwCheckStatus = 0x03;