Chromium Code Reviews| Index: core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp |
| diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp |
| index 1c4cc24208f70579e0d5fe8b4d9b613bb1220a7a..be17ca10573bc97b9a4e8a208082afd9eb1ed472 100644 |
| --- a/core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp |
| +++ b/core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp |
| @@ -12,6 +12,7 @@ |
| #include "core/include/fpdfapi/fpdf_page.h" |
| #include "core/include/fxcodec/fx_codec.h" |
| #include "core/include/fxcrt/fx_ext.h" |
| +#include "core/src/fpdfapi/fpdf_page/pageint.h" |
| namespace { |
| @@ -72,7 +73,7 @@ FX_DWORD CPDF_StreamContentParser::Parse(const uint8_t* pData, |
| } |
| return m_pSyntax->GetPos(); |
| } |
| -void _PDF_ReplaceAbbr(CPDF_Object* pObj); |
| + |
| void CPDF_StreamContentParser::Handle_BeginImage() { |
| FX_FILESIZE savePos = m_pSyntax->GetPos(); |
| CPDF_Dictionary* pDict = new CPDF_Dictionary; |
| @@ -102,7 +103,7 @@ void CPDF_StreamContentParser::Handle_BeginImage() { |
| pDict->SetAt(key, pObj.release()); |
| } |
| } |
| - _PDF_ReplaceAbbr(pDict); |
| + PDF_ReplaceAbbr(pDict); |
| CPDF_Object* pCSObj = NULL; |
| if (pDict->KeyExist("ColorSpace")) { |
| pCSObj = pDict->GetElementValue("ColorSpace"); |
| @@ -933,6 +934,7 @@ void CPDF_ContentParser::Start(CPDF_Page* pPage, CPDF_ParseOptions* pOptions) { |
| m_Status = ToBeContinued; |
| m_InternalStage = PAGEPARSE_STAGE_GETCONTENT; |
| m_CurrentOffset = 0; |
| + |
| CPDF_Object* pContent = pPage->m_pFormDict->GetElementValue("Contents"); |
| if (!pContent) { |
| m_Status = Done; |
| @@ -951,7 +953,6 @@ void CPDF_ContentParser::Start(CPDF_Page* pPage, CPDF_ParseOptions* pOptions) { |
| m_pStreamArray = FX_Alloc(CPDF_StreamAcc*, m_nStreams); |
| } else { |
| m_Status = Done; |
| - return; |
| } |
| } |
| void CPDF_ContentParser::Start(CPDF_Form* pForm, |
| @@ -1006,11 +1007,7 @@ void CPDF_ContentParser::Start(CPDF_Form* pForm, |
| } |
| m_nStreams = 0; |
| m_pSingleStream = new CPDF_StreamAcc; |
| - if (pForm->m_pDocument) { |
| - m_pSingleStream->LoadAllData(pForm->m_pFormStream, FALSE); |
| - } else { |
| - m_pSingleStream->LoadAllData(pForm->m_pFormStream, FALSE); |
|
Tom Sepez
2016/01/07 17:27:02
Are we sure one of these didn't mean to pass TRUE?
Lei Zhang
2016/01/08 02:54:30
Dunno what Foxit had in mind when they changed thi
|
| - } |
| + m_pSingleStream->LoadAllData(pForm->m_pFormStream, FALSE); |
| m_pData = (uint8_t*)m_pSingleStream->GetData(); |
| m_Size = m_pSingleStream->GetSize(); |
| m_Status = ToBeContinued; |