summaryrefslogtreecommitdiff
path: root/core/fpdfapi/parser/cpdf_parser.cpp
diff options
context:
space:
mode:
authorArtem Strygin <art-snake@yandex-team.ru>2017-07-28 19:05:55 +0300
committerChromium commit bot <commit-bot@chromium.org>2017-08-01 23:08:16 +0000
commit33dd830890d38f9083b732cd908ef082f1d89d65 (patch)
tree7035019c33cbbc65811fad9e09652844762bb8ac /core/fpdfapi/parser/cpdf_parser.cpp
parent07a71da70e7d52dbc65cd184edec3c45e1e8567e (diff)
downloadpdfium-33dd830890d38f9083b732cd908ef082f1d89d65.tar.xz
Add public access for read stream into CPDF_SyntaxParser
Change-Id: I5deb6049db41387ac030a6ba5296ee6187120190 Reviewed-on: https://pdfium-review.googlesource.com/9470 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fpdfapi/parser/cpdf_parser.cpp')
-rw-r--r--core/fpdfapi/parser/cpdf_parser.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/core/fpdfapi/parser/cpdf_parser.cpp b/core/fpdfapi/parser/cpdf_parser.cpp
index 657d0e0865..2ca820eb98 100644
--- a/core/fpdfapi/parser/cpdf_parser.cpp
+++ b/core/fpdfapi/parser/cpdf_parser.cpp
@@ -126,7 +126,7 @@ CFX_RetainPtr<CPDF_CryptoHandler> CPDF_Parser::GetCryptoHandler() const {
}
CFX_RetainPtr<IFX_SeekableReadStream> CPDF_Parser::GetFileAccess() const {
- return m_pSyntax->m_pFileAccess;
+ return m_pSyntax->GetFileAccess();
}
void CPDF_Parser::ShrinkObjectMap(uint32_t objnum) {
@@ -615,7 +615,7 @@ bool CPDF_Parser::RebuildCrossRef() {
bool bOverFlow = false;
uint32_t size =
std::min((uint32_t)(m_pSyntax->m_FileLen - pos), kBufferSize);
- if (!m_pSyntax->m_pFileAccess->ReadBlock(buffer.data(), pos, size))
+ if (!m_pSyntax->GetFileAccess()->ReadBlock(buffer.data(), pos, size))
break;
for (uint32_t i = 0; i < size; i++) {
@@ -1506,7 +1506,6 @@ CPDF_Parser::Error CPDF_Parser::StartLinearizedParse(
return FORMAT_ERROR;
if (!IsLinearizedFile(pFileAccess, offset)) {
- m_pSyntax->m_pFileAccess = nullptr;
return StartParse(pFileAccess, std::move(pDocument));
}
m_bHasParsed = true;