summaryrefslogtreecommitdiff
path: root/core/fpdfapi/page
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2017-12-11 22:12:08 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-12-11 22:12:08 +0000
commit07401bae6d9f95911b144e6fabb42f19e40def49 (patch)
tree4c7aa56beadf3bc1540ecad781e62ec8b84be4e0 /core/fpdfapi/page
parent4412f3d87441c135ef56420f18d9229fbe247c3e (diff)
downloadpdfium-07401bae6d9f95911b144e6fabb42f19e40def49.tar.xz
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 <thestig@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Diffstat (limited to 'core/fpdfapi/page')
-rw-r--r--core/fpdfapi/page/cpdf_colorspace.cpp2
-rw-r--r--core/fpdfapi/page/cpdf_contentparser.cpp6
-rw-r--r--core/fpdfapi/page/cpdf_docpagedata.cpp4
-rw-r--r--core/fpdfapi/page/cpdf_meshstream.cpp2
-rw-r--r--core/fpdfapi/page/cpdf_psfunc.cpp2
-rw-r--r--core/fpdfapi/page/cpdf_sampledfunc.cpp2
6 files changed, 9 insertions, 9 deletions
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<CPDF_StreamAcc>(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<CPDF_StreamAcc>(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<CPDF_StreamAcc>(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<CPDF_StreamAcc>(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_IccProfile> CPDF_DocPageData::GetIccProfile(
return it->second;
auto pAccessor = pdfium::MakeRetain<CPDF_StreamAcc>(pProfileStream);
- pAccessor->LoadAllData(false);
+ pAccessor->LoadAllDataFiltered();
uint8_t digest[20];
CRYPT_SHA1Generate(pAccessor->GetData(), pAccessor->GetSize(), digest);
@@ -457,7 +457,7 @@ RetainPtr<CPDF_StreamAcc> CPDF_DocPageData::GetFontFileStreamAcc(
org_size = std::max(org_size, 0);
auto pFontAcc = pdfium::MakeRetain<CPDF_StreamAcc>(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<CFX_BitStream>(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<CPDF_StreamAcc>(pObj->AsStream());
- pAcc->LoadAllData(false);
+ pAcc->LoadAllDataFiltered();
return m_PS.Parse(reinterpret_cast<const char*>(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<CPDF_StreamAcc>(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++) {