From 8e753ca397ea332b29d65736b0e0bf9ad466df56 Mon Sep 17 00:00:00 2001 From: dan sinclair Date: Tue, 17 Apr 2018 18:45:50 +0000 Subject: Convert CFX_XMLParser to take a IFX_SeekableStream This CL changes the CFX_XMLParser to accept an IFX_SeekableStream intead of a CFX_SeekableStreamProxy. Change-Id: I3534288a8a00095acd78a60bf6b925c6a0357892 Reviewed-on: https://pdfium-review.googlesource.com/30856 Reviewed-by: Tom Sepez Commit-Queue: dsinclair --- xfa/fxfa/parser/cxfa_xmllocale.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'xfa/fxfa/parser/cxfa_xmllocale.cpp') diff --git a/xfa/fxfa/parser/cxfa_xmllocale.cpp b/xfa/fxfa/parser/cxfa_xmllocale.cpp index 4354ed98de..ffb4cd9dde 100644 --- a/xfa/fxfa/parser/cxfa_xmllocale.cpp +++ b/xfa/fxfa/parser/cxfa_xmllocale.cpp @@ -8,6 +8,7 @@ #include +#include "core/fxcrt/cfx_memorystream.h" #include "core/fxcrt/fx_codepage.h" #include "core/fxcrt/xml/cfx_xmlelement.h" #include "core/fxcrt/xml/cfx_xmlparser.h" @@ -30,11 +31,9 @@ constexpr wchar_t kCurrencySymbol[] = L"currencySymbol"; std::unique_ptr CXFA_XMLLocale::Create( pdfium::span data) { auto root = pdfium::MakeUnique(L"root"); - auto proxy = - pdfium::MakeRetain(data.data(), data.size()); - proxy->SetCodePage(FX_CODEPAGE_UTF8); - - CFX_XMLParser parser(root.get(), proxy); + auto stream = + pdfium::MakeRetain(data.data(), data.size(), false); + CFX_XMLParser parser(root.get(), stream); if (!parser.Parse()) return nullptr; -- cgit v1.2.3