summaryrefslogtreecommitdiff
path: root/core/fpdfdoc/cpdf_metadata.cpp
diff options
context:
space:
mode:
authordan sinclair <dsinclair@chromium.org>2018-04-17 18:45:50 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-04-17 18:45:50 +0000
commit8e753ca397ea332b29d65736b0e0bf9ad466df56 (patch)
treed8a53c3c3852ec6c4dd66dc69ce2b04f69d61742 /core/fpdfdoc/cpdf_metadata.cpp
parent5925398cc46eccdec720166c1b6bbb87cfb19564 (diff)
downloadpdfium-8e753ca397ea332b29d65736b0e0bf9ad466df56.tar.xz
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 <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fpdfdoc/cpdf_metadata.cpp')
-rw-r--r--core/fpdfdoc/cpdf_metadata.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/core/fpdfdoc/cpdf_metadata.cpp b/core/fpdfdoc/cpdf_metadata.cpp
index 56f8c64c0e..161fc93edd 100644
--- a/core/fpdfdoc/cpdf_metadata.cpp
+++ b/core/fpdfdoc/cpdf_metadata.cpp
@@ -8,6 +8,7 @@
#include "core/fpdfapi/parser/cpdf_stream.h"
#include "core/fpdfapi/parser/cpdf_stream_acc.h"
+#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"
@@ -68,11 +69,9 @@ std::vector<UnsupportedFeature> CPDF_Metadata::CheckForSharedForm() const {
pAcc->LoadAllDataFiltered();
auto root = pdfium::MakeUnique<CFX_XMLElement>(L"root");
- auto proxy = pdfium::MakeRetain<CFX_SeekableStreamProxy>(pAcc->GetData(),
- pAcc->GetSize());
- proxy->SetCodePage(FX_CODEPAGE_UTF8);
-
- CFX_XMLParser parser(root.get(), proxy);
+ auto stream = pdfium::MakeRetain<CFX_MemoryStream>(pAcc->GetData(),
+ pAcc->GetSize(), false);
+ CFX_XMLParser parser(root.get(), stream);
if (!parser.Parse())
return {};