From 07401bae6d9f95911b144e6fabb42f19e40def49 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Mon, 11 Dec 2017 22:12:08 +0000 Subject: Remove default arguments to CPDF_StreamAcc::LoadAllData(). Add LoadAllDataFiltered() and LoadAllDataRaw() and update callers. Change-Id: I9b80ee34a358db204968acdc8b1adc9db0b6b83f Reviewed-on: https://pdfium-review.googlesource.com/20810 Commit-Queue: Lei Zhang Reviewed-by: Henrique Nakashima --- core/fpdfapi/page/cpdf_colorspace.cpp | 2 +- core/fpdfapi/page/cpdf_contentparser.cpp | 6 +++--- core/fpdfapi/page/cpdf_docpagedata.cpp | 4 ++-- core/fpdfapi/page/cpdf_meshstream.cpp | 2 +- core/fpdfapi/page/cpdf_psfunc.cpp | 2 +- core/fpdfapi/page/cpdf_sampledfunc.cpp | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) (limited to 'core/fpdfapi/page') diff --git a/core/fpdfapi/page/cpdf_colorspace.cpp b/core/fpdfapi/page/cpdf_colorspace.cpp index f9214c75d6..c09562ce52 100644 --- a/core/fpdfapi/page/cpdf_colorspace.cpp +++ b/core/fpdfapi/page/cpdf_colorspace.cpp @@ -1031,7 +1031,7 @@ bool CPDF_IndexedCS::v_Load(CPDF_Document* pDoc, m_Table = pString->GetString(); } else if (CPDF_Stream* pStream = pTableObj->AsStream()) { auto pAcc = pdfium::MakeRetain(pStream); - pAcc->LoadAllData(false); + pAcc->LoadAllDataFiltered(); m_Table = ByteStringView(pAcc->GetData(), pAcc->GetSize()); } return true; diff --git a/core/fpdfapi/page/cpdf_contentparser.cpp b/core/fpdfapi/page/cpdf_contentparser.cpp index cc93b4df9e..93151af305 100644 --- a/core/fpdfapi/page/cpdf_contentparser.cpp +++ b/core/fpdfapi/page/cpdf_contentparser.cpp @@ -37,7 +37,7 @@ CPDF_ContentParser::CPDF_ContentParser(CPDF_Page* pPage) CPDF_Stream* pStream = pContent->AsStream(); if (pStream) { m_pSingleStream = pdfium::MakeRetain(pStream); - m_pSingleStream->LoadAllData(false); + m_pSingleStream->LoadAllDataFiltered(); return; } CPDF_Array* pArray = pContent->AsArray(); @@ -102,7 +102,7 @@ CPDF_ContentParser::CPDF_ContentParser(CPDF_Form* pForm, } m_pSingleStream = pdfium::MakeRetain(pForm->m_pFormStream.Get()); - m_pSingleStream->LoadAllData(false); + m_pSingleStream->LoadAllDataFiltered(); m_pData.Reset(m_pSingleStream->GetData()); m_Size = m_pSingleStream->GetSize(); } @@ -149,7 +149,7 @@ bool CPDF_ContentParser::Continue(IFX_PauseIndicator* pPause) { pContent ? pContent->GetDirectObjectAt(m_CurrentOffset) : nullptr); m_StreamArray[m_CurrentOffset] = pdfium::MakeRetain(pStreamObj); - m_StreamArray[m_CurrentOffset]->LoadAllData(false); + m_StreamArray[m_CurrentOffset]->LoadAllDataFiltered(); m_CurrentOffset++; } } diff --git a/core/fpdfapi/page/cpdf_docpagedata.cpp b/core/fpdfapi/page/cpdf_docpagedata.cpp index 31d6bae63f..dc2554f92d 100644 --- a/core/fpdfapi/page/cpdf_docpagedata.cpp +++ b/core/fpdfapi/page/cpdf_docpagedata.cpp @@ -417,7 +417,7 @@ RetainPtr CPDF_DocPageData::GetIccProfile( return it->second; auto pAccessor = pdfium::MakeRetain(pProfileStream); - pAccessor->LoadAllData(false); + pAccessor->LoadAllDataFiltered(); uint8_t digest[20]; CRYPT_SHA1Generate(pAccessor->GetData(), pAccessor->GetSize(), digest); @@ -457,7 +457,7 @@ RetainPtr CPDF_DocPageData::GetFontFileStreamAcc( org_size = std::max(org_size, 0); auto pFontAcc = pdfium::MakeRetain(pFontStream); - pFontAcc->LoadAllData(false, org_size); + pFontAcc->LoadAllData(false, org_size, false); m_FontFileMap[pFontStream] = pFontAcc; return pFontAcc; } diff --git a/core/fpdfapi/page/cpdf_meshstream.cpp b/core/fpdfapi/page/cpdf_meshstream.cpp index 1850efde9c..083acce68a 100644 --- a/core/fpdfapi/page/cpdf_meshstream.cpp +++ b/core/fpdfapi/page/cpdf_meshstream.cpp @@ -116,7 +116,7 @@ CPDF_MeshStream::CPDF_MeshStream( CPDF_MeshStream::~CPDF_MeshStream() {} bool CPDF_MeshStream::Load() { - m_pStream->LoadAllData(); + m_pStream->LoadAllDataFiltered(); m_BitStream = pdfium::MakeUnique(m_pStream->GetData(), m_pStream->GetSize()); CPDF_Dictionary* pDict = m_pShadingStream->GetDict(); diff --git a/core/fpdfapi/page/cpdf_psfunc.cpp b/core/fpdfapi/page/cpdf_psfunc.cpp index debbbd6e6d..9f101eb91b 100644 --- a/core/fpdfapi/page/cpdf_psfunc.cpp +++ b/core/fpdfapi/page/cpdf_psfunc.cpp @@ -15,7 +15,7 @@ CPDF_PSFunc::~CPDF_PSFunc() {} bool CPDF_PSFunc::v_Init(CPDF_Object* pObj) { auto pAcc = pdfium::MakeRetain(pObj->AsStream()); - pAcc->LoadAllData(false); + pAcc->LoadAllDataFiltered(); return m_PS.Parse(reinterpret_cast(pAcc->GetData()), pAcc->GetSize()); } diff --git a/core/fpdfapi/page/cpdf_sampledfunc.cpp b/core/fpdfapi/page/cpdf_sampledfunc.cpp index 91c6b5a70a..98e1fd03e0 100644 --- a/core/fpdfapi/page/cpdf_sampledfunc.cpp +++ b/core/fpdfapi/page/cpdf_sampledfunc.cpp @@ -51,7 +51,7 @@ bool CPDF_SampledFunc::v_Init(CPDF_Object* pObj) { m_SampleMax = 0xffffffff >> (32 - m_nBitsPerSample); m_pSampleStream = pdfium::MakeRetain(pStream); - m_pSampleStream->LoadAllData(false); + m_pSampleStream->LoadAllDataFiltered(); FX_SAFE_UINT32 nTotalSampleBits = 1; m_EncodeInfo.resize(m_nInputs); for (uint32_t i = 0; i < m_nInputs; i++) { -- cgit v1.2.3