summaryrefslogtreecommitdiff
path: root/core/fpdfapi/parser/cpdf_array.cpp
diff options
context:
space:
mode:
authorArtem Strygin <art-snake@yandex-team.ru>2018-07-23 19:54:34 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-07-23 19:54:34 +0000
commit2bfa78540c375916ec9973f0ae11271b098180bd (patch)
tree4ec0b11e0014c95acda8a2e0b54e1bacd9f349d1 /core/fpdfapi/parser/cpdf_array.cpp
parent9f53dc093a9d00342ea76ecc0b4c8c84357ffd6e (diff)
downloadpdfium-2bfa78540c375916ec9973f0ae11271b098180bd.tar.xz
Rework of CPDF_Object writing.
Move writing logic into implementation of related clases. Change-Id: If70dc418b352b562ee681ea34fa6595d6f52eee3 Reviewed-on: https://pdfium-review.googlesource.com/36350 Commit-Queue: Art Snake <art-snake@yandex-team.ru> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fpdfapi/parser/cpdf_array.cpp')
-rw-r--r--core/fpdfapi/parser/cpdf_array.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/fpdfapi/parser/cpdf_array.cpp b/core/fpdfapi/parser/cpdf_array.cpp
index d53476d1c2..68b301e283 100644
--- a/core/fpdfapi/parser/cpdf_array.cpp
+++ b/core/fpdfapi/parser/cpdf_array.cpp
@@ -230,12 +230,13 @@ CPDF_Object* CPDF_Array::Add(std::unique_ptr<CPDF_Object> pObj) {
return pRet;
}
-bool CPDF_Array::WriteTo(IFX_ArchiveStream* archive) const {
+bool CPDF_Array::WriteTo(IFX_ArchiveStream* archive,
+ const CPDF_Encryptor* encryptor) const {
if (!archive->WriteString("["))
return false;
for (size_t i = 0; i < GetCount(); ++i) {
- if (!GetObjectAt(i)->WriteTo(archive))
+ if (!GetObjectAt(i)->WriteTo(archive, encryptor))
return false;
}
return archive->WriteString("]");